2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-04-13 14:01:26 +08:00

[multiple changes]

2014-08-04  Robert Dewar  <dewar@adacore.com>

	* exp_ch4.adb: Minor reformatting.

2014-08-04  Olivier Hainque  <hainque@adacore.com>

	* link.c: remove const on __gnat_objlist_file_supported for AIX

2014-08-04  Robert Dewar  <dewar@adacore.com>

	* sem_util.ads: Minor addition of comment.

2014-08-04  Vincent Celier  <celier@adacore.com>

	* prj-dect.adb (Check_Package_Allowed): Allow package IDE in
	all projects, including aggregate and aggregate library projects.

2014-08-04  Yannick Moy  <moy@adacore.com>

	* back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.

2014-08-04  Robert Dewar  <dewar@adacore.com>

	* sem_eval.adb (Test_In_Range): Always in range for
	Is_Known_Valid target type, where input type has smaller or
	equal size and does not have biased rep.

2014-08-04  Ed Schonberg  <schonberg@adacore.com>

	* sem_attr.adb (Eval_Attribute): Constrained is not treated as
	a static attribute, and the Static flag must not be set on it
	during resolution. It may be constant-folded during expansion,
	but if expansion is disabled it is not a static expression.

From-SVN: r213535
This commit is contained in:
Arnaud Charlet 2014-08-04 10:00:05 +02:00
parent ad5edba5ce
commit 6c56d9b8a6
8 changed files with 86 additions and 18 deletions

@ -1,3 +1,37 @@
2014-08-04 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb: Minor reformatting.
2014-08-04 Olivier Hainque <hainque@adacore.com>
* link.c: remove const on __gnat_objlist_file_supported for AIX
2014-08-04 Robert Dewar <dewar@adacore.com>
* sem_util.ads: Minor addition of comment.
2014-08-04 Vincent Celier <celier@adacore.com>
* prj-dect.adb (Check_Package_Allowed): Allow package IDE in
all projects, including aggregate and aggregate library projects.
2014-08-04 Yannick Moy <moy@adacore.com>
* back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
2014-08-04 Robert Dewar <dewar@adacore.com>
* sem_eval.adb (Test_In_Range): Always in range for
Is_Known_Valid target type, where input type has smaller or
equal size and does not have biased rep.
2014-08-04 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Eval_Attribute): Constrained is not treated as
a static attribute, and the Static flag must not be set on it
during resolution. It may be constant-folded during expansion,
but if expansion is disabled it is not a static expression.
2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as

@ -126,7 +126,8 @@ package body Back_End is
Nat (Physical_To_Logical (Last_Source_Line (J), J));
end loop;
-- Deal with case of generating SCIL, we should not be here!
-- Deal with case of generating SCIL, we should not be here unless
-- debugging CodePeer mode in GNAT.
if Generate_SCIL then
Error_Msg_N ("'S'C'I'L generation not available", Cunit (Main_Unit));
@ -139,6 +140,14 @@ package body Back_End is
end if;
end if;
-- We should be here in GNATprove mode only when debugging GNAT. Do not
-- call gigi in that case, as it is not prepared to handle the special
-- form of the tree obtained in GNATprove mode.
if GNATprove_Mode then
return;
end if;
-- The actual call to the back end
gigi

@ -10416,18 +10416,22 @@ package body Exp_Ch4 is
-- If the level of the operand type is statically deeper than the
-- level of the target type, then force Program_Error. Note that this
-- can only occur for cases where the attribute is within the body of
-- an instantiation (otherwise the conversion will already have been
-- rejected as illegal). (Note: warnings are issued by the analyzer
-- for the instance cases.) The case where the target type is an
-- anonymous access type of a discriminant is excluded, because the
-- level of such a type depends on the context and currently the
-- level returned for such types is zero, resulting in warnings about
-- about check failures in certain legal cases involving class-wide
-- interfaces as the designated type (some cases, such as return
-- statements, are checked at run time, but not clear if these are
-- handled right in general, see 3.10.2(12/2-12.5/3) ???).
-- an instantiation, otherwise the conversion will already have been
-- rejected as illegal.
-- Note: warnings are issued by the analyzer for the instance cases
elsif In_Instance_Body
-- The case where the target type is an anonymous access type of
-- a discriminant is excluded, because the level of such a type
-- depends on the context and currently the level returned for such
-- types is zero, resulting in warnings about about check failures
-- in certain legal cases involving class-wide interfaces as the
-- designated type (some cases, such as return statements, are
-- checked at run time, but not clear if these are handled right
-- in general, see 3.10.2(12/2-12.5/3) ???).
and then
not (Ekind (Target_Type) = E_Anonymous_Access_Type
and then Present (Associated_Node_For_Itype (Target_Type))

@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
* Copyright (C) 1992-2012, Free Software Foundation, Inc. *
* Copyright (C) 1992-2014, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
@ -153,7 +153,7 @@ const char *__gnat_run_path_option = "";
char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
int __gnat_link_max = 15000;
const unsigned char __gnat_objlist_file_supported = 1;
unsigned char __gnat_objlist_file_supported = 1;
const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 0;
const char *__gnat_default_libgcc_subdir = "lib";

@ -214,10 +214,12 @@ package body Prj.Dect is
Project_Qualifier_Of (Project, In_Tree);
Name : constant Name_Id := Name_Of (Current_Package, In_Tree);
begin
if (Qualif = Aggregate and then Name /= Snames.Name_Builder)
or else (Qualif = Aggregate_Library
and then Name /= Snames.Name_Builder
and then Name /= Snames.Name_Install)
if Name /= Snames.Name_Ide
and then
((Qualif = Aggregate and then Name /= Snames.Name_Builder)
or else
(Qualif = Aggregate_Library and then Name /= Snames.Name_Builder
and then Name /= Snames.Name_Install))
then
Error_Msg_Name_1 := Name;
Error_Msg

@ -7775,6 +7775,12 @@ package body Sem_Attr is
-- could be handled at compile time. To be looked at later.
when Attribute_Constrained =>
-- The expander might fold it and set the static flag accordingly,
-- but with expansion disabled (as in ASIS), it remains as an
-- attribute reference, and this reference is not static.
Set_Is_Static_Expression (N, False);
null;
---------------

@ -6193,6 +6193,18 @@ package body Sem_Eval is
then
return In_Range;
-- Another special case. For signed integer types, if the target type
-- has Is_Known_Valid set, and the source type does not have a larger
-- size, then the source value must be in range. We exclude biased
-- types, because they bizarrely can generate out of range values.
elsif Is_Signed_Integer_Type (Etype (N))
and then Is_Known_Valid (Typ)
and then Esize (Etype (N)) <= Esize (Typ)
and then not Has_Biased_Representation (Etype (N))
then
return In_Range;
-- For all other cases, result is unknown
else

@ -1318,7 +1318,8 @@ package Sem_Util is
-- declaration.
function Is_SPARK_Object_Reference (N : Node_Id) return Boolean;
-- Determines if the tree referenced by N represents an object in SPARK
-- Determines if the tree referenced by N represents an object in SPARK.
-- This differs from Is_Object_Reference in that ???
function Is_Statement (N : Node_Id) return Boolean;
pragma Inline (Is_Statement);