mirror of git://gcc.gnu.org/git/gcc.git
[multiple changes]
2010-10-11 Robert Dewar <dewar@adacore.com> * debug.adb: Remove d.A flag to delay address clause (not needed any more). Add d.A flag to enable tree read/write of aspect spec hash table * sem_ch13.adb (Analyze_Aspect_Specifications): Properly delay address clause. (Rep_Item_Too_Late): No need for special processing for delayed rep items (and it caused difficulties in the address case). * tree_gen.adb: Only write aspect spec hash table if -gnatd.A is set * tree_in.adb: Only write aspect spec hash table if -gnatd.A is set 2010-10-11 Pat Rogers <rogers@adacore.com> * gnat_ugn.texi: Minor editing. From-SVN: r165316
This commit is contained in:
parent
40b7ae584b
commit
1928f45020
|
@ -1,3 +1,18 @@
|
|||
2010-10-11 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* debug.adb: Remove d.A flag to delay address clause (not needed any
|
||||
more). Add d.A flag to enable tree read/write of aspect spec hash table
|
||||
* sem_ch13.adb (Analyze_Aspect_Specifications): Properly delay address
|
||||
clause.
|
||||
(Rep_Item_Too_Late): No need for special processing for delayed rep
|
||||
items (and it caused difficulties in the address case).
|
||||
* tree_gen.adb: Only write aspect spec hash table if -gnatd.A is set
|
||||
* tree_in.adb: Only write aspect spec hash table if -gnatd.A is set
|
||||
|
||||
2010-10-11 Pat Rogers <rogers@adacore.com>
|
||||
|
||||
* gnat_ugn.texi: Minor editing.
|
||||
|
||||
2010-10-11 Nathan Froyd <froydnj@codesourcery.com>
|
||||
|
||||
* gcc-interface/utils2.c (gnat_build_constructor): Use VEC_qsort.
|
||||
|
|
|
@ -118,7 +118,7 @@ package body Debug is
|
|||
-- d.y
|
||||
-- d.z
|
||||
|
||||
-- d.A Properly defer address aspect
|
||||
-- d.A Read/write Aspect_Specifications hash table to tree
|
||||
-- d.B
|
||||
-- d.C Generate concatenation call, do not generate inline code
|
||||
-- d.D
|
||||
|
@ -558,11 +558,10 @@ package body Debug is
|
|||
-- d.w This flag turns off the scanning of loops to detect possible
|
||||
-- infinite loops.
|
||||
|
||||
-- d.A Properly defer address aspect. In the case where the expression
|
||||
-- of an address aspect is non-static, we should defer the evaluation
|
||||
-- of the expression till the freeze point, but this does not seem to
|
||||
-- work properly. So we have this debug switch temporarily so that we
|
||||
-- can easily investigate this problem.
|
||||
-- d.A There seems to be a problem with ASIS if we activate the circuit
|
||||
-- for reading and writing the aspect specification hash table, so
|
||||
-- for now, this is controlled by the debug flag d.A. The hash table
|
||||
-- is only written and read if this flag is set.
|
||||
|
||||
-- d.x No exception handlers in generated code. This causes exception
|
||||
-- handlers to be eliminated from the generated code. They are still
|
||||
|
|
|
@ -5048,9 +5048,9 @@ gnat_rm, GNAT Reference manual}.
|
|||
@table @option
|
||||
@c !sort!
|
||||
@item -gnatwa
|
||||
@emph{Activate all optional errors.}
|
||||
@emph{Activate most optional warnings.}
|
||||
@cindex @option{-gnatwa} (@command{gcc})
|
||||
This switch activates most optional warning messages, see remaining list
|
||||
This switch activates most optional warning messages. See the remaining list
|
||||
in this section for details on optional warning messages that can be
|
||||
individually controlled. The warnings that are not turned on by this
|
||||
switch are
|
||||
|
@ -10409,11 +10409,11 @@ subprograms.
|
|||
@item
|
||||
@cindex pragma Inline
|
||||
@findex Inline
|
||||
Either @code{pragma Inline} applies to the subprogram and the
|
||||
@option{^-gnatn^/INLINE^} switch is used on the command line, or it is local
|
||||
to the unit and called once from within it, or it is small and optimization
|
||||
level @option{-O2} is specified, or automatic inlining (optimization level
|
||||
@option{-O3}) is specified.
|
||||
Any one of the following applies: @code{pragma Inline} is applied to the
|
||||
subprogram and the @option{^-gnatn^/INLINE^} switch is specified; the
|
||||
subprogram is local to the unit and called once from within it; the
|
||||
subprogram is small and optimization level @option{-O2} is specified;
|
||||
optimization level @option{-O3}) is specified.
|
||||
@end itemize
|
||||
|
||||
@noindent
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
with Aspects; use Aspects;
|
||||
with Atree; use Atree;
|
||||
with Checks; use Checks;
|
||||
with Debug; use Debug;
|
||||
with Einfo; use Einfo;
|
||||
with Elists; use Elists;
|
||||
with Errout; use Errout;
|
||||
|
@ -765,7 +764,8 @@ package body Sem_Ch13 is
|
|||
-- Aspects corresponding to attribute definition clauses with
|
||||
-- the exception of Address which is treated specially.
|
||||
|
||||
when Aspect_Alignment |
|
||||
when Aspect_Address |
|
||||
Aspect_Alignment |
|
||||
Aspect_Bit_Order |
|
||||
Aspect_Component_Size |
|
||||
Aspect_External_Tag |
|
||||
|
@ -780,6 +780,8 @@ package body Sem_Ch13 is
|
|||
-- Preanalyze the expression with the appropriate type
|
||||
|
||||
case A_Id is
|
||||
when Aspect_Address =>
|
||||
T := RTE (RE_Address);
|
||||
when Aspect_Bit_Order =>
|
||||
T := RTE (RE_Bit_Order);
|
||||
when Aspect_External_Tag =>
|
||||
|
@ -811,38 +813,6 @@ package body Sem_Ch13 is
|
|||
Delay_Required := True;
|
||||
end if;
|
||||
|
||||
-- Address aspect, treated specially because we have some
|
||||
-- strange problem in the back end if we try to delay ???
|
||||
|
||||
when Aspect_Address =>
|
||||
|
||||
-- Construct the attribute definition clause
|
||||
|
||||
Aitem :=
|
||||
Make_Attribute_Definition_Clause (Sloc (Aspect),
|
||||
Name => Ent,
|
||||
Chars => Chars (Id),
|
||||
Expression => Relocate_Node (Expr));
|
||||
|
||||
-- If -gnatd.A is set, do the delay if needed (this is
|
||||
-- so we can debug the relevant problem).
|
||||
|
||||
if Debug_Flag_Dot_AA then
|
||||
Preanalyze_Spec_Expression
|
||||
(Expression (Aitem), RTE (RE_Address));
|
||||
|
||||
if Is_OK_Static_Expression (Expression (Aitem)) then
|
||||
Delay_Required := False;
|
||||
else
|
||||
Delay_Required := True;
|
||||
end if;
|
||||
|
||||
-- Here if -gnatd.A not set, never do the delay
|
||||
|
||||
else
|
||||
Delay_Required := False;
|
||||
end if;
|
||||
|
||||
-- Aspects corresponding to pragmas with two arguments, where
|
||||
-- the first argument is a local name referring to the entity,
|
||||
-- and the second argument is the aspect definition expression.
|
||||
|
@ -1190,8 +1160,8 @@ package body Sem_Ch13 is
|
|||
A : Node_Id;
|
||||
|
||||
begin
|
||||
-- Nothing to do if this attribute definition clause comes from an
|
||||
-- aspect specification, since we could not be duplicating an
|
||||
-- Nothing to do if this attribute definition clause comes from
|
||||
-- an aspect specification, since we could not be duplicating an
|
||||
-- explicit clause, and we dealt with the case of duplicated aspects
|
||||
-- in Analyze_Aspect_Specifications.
|
||||
|
||||
|
@ -5022,17 +4992,6 @@ package body Sem_Ch13 is
|
|||
-- Start of processing for Rep_Item_Too_Late
|
||||
|
||||
begin
|
||||
-- If this is from an aspect that was delayed till the freeze point,
|
||||
-- then we skip this check entirely, since it is not required and
|
||||
-- furthermore can generate false errors. Also we don't need to chain
|
||||
-- the item into the rep item chain in that case, it is already there!
|
||||
|
||||
if Nkind_In (N, N_Attribute_Definition_Clause, N_Pragma)
|
||||
and then Is_Delayed_Aspect (N)
|
||||
then
|
||||
return False;
|
||||
end if;
|
||||
|
||||
-- First make sure entity is not frozen (RM 13.1(9)). Exclude imported
|
||||
-- types, which may be frozen if they appear in a representation clause
|
||||
-- for a local type.
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
with Aspects;
|
||||
with Atree;
|
||||
with Debug;
|
||||
with Elists;
|
||||
with Fname;
|
||||
with Lib;
|
||||
|
@ -51,7 +52,13 @@ begin
|
|||
if Opt.Tree_Output then
|
||||
Osint.C.Tree_Create;
|
||||
Opt.Tree_Write;
|
||||
Aspects.Tree_Write;
|
||||
|
||||
-- For now, only write aspect specifications hash table if -gnatd.A set
|
||||
|
||||
if Debug.Debug_Flag_Dot_AA then
|
||||
Aspects.Tree_Write;
|
||||
end if;
|
||||
|
||||
Atree.Tree_Write;
|
||||
Elists.Tree_Write;
|
||||
Fname.Tree_Write;
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
with Aspects;
|
||||
with Atree;
|
||||
with Csets;
|
||||
with Debug;
|
||||
with Elists;
|
||||
with Fname;
|
||||
with Lib;
|
||||
|
@ -51,7 +52,13 @@ procedure Tree_In (Desc : File_Descriptor) is
|
|||
begin
|
||||
Tree_IO.Tree_Read_Initialize (Desc);
|
||||
Opt.Tree_Read;
|
||||
Aspects.Tree_Read;
|
||||
|
||||
-- For now, only read aspect specifications hash table if -gnatd.A is set
|
||||
|
||||
if Debug.Debug_Flag_Dot_AA then
|
||||
Aspects.Tree_Read;
|
||||
end if;
|
||||
|
||||
Atree.Tree_Read;
|
||||
Elists.Tree_Read;
|
||||
Fname.Tree_Read;
|
||||
|
|
Loading…
Reference in New Issue