From 7c323fbe3bdff58d4081e4706d24c17f4bb36f8a Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 19 Jan 2017 14:13:19 +0100 Subject: [PATCH] [multiple changes] 2017-01-19 Javier Miranda * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the identifier attribute of a block-statement node. Required to avoid assertion failure when building the new containers library. 2017-01-19 Bob Duff * exp_ch3.adb: Update comment. 2017-01-19 Vincent Celier * gprep.adb (Gnatprep): Parse the definition file without "replace in comments" even when switch -C is used. From-SVN: r244633 --- gcc/ada/ChangeLog | 15 +++++++++++++++ gcc/ada/exp_ch3.adb | 2 +- gcc/ada/ghost.adb | 4 +++- gcc/ada/gprep.adb | 10 +++++++++- 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 0b0888a..4553f1c 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,18 @@ +2017-01-19 Javier Miranda + + * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the + identifier attribute of a block-statement node. Required to avoid + assertion failure when building the new containers library. + +2017-01-19 Bob Duff + + * exp_ch3.adb: Update comment. + +2017-01-19 Vincent Celier + + * gprep.adb (Gnatprep): Parse the definition file without + "replace in comments" even when switch -C is used. + 2017-01-19 Justin Squirek * exp_ch9.adb (Is_Pure_Barrier): Create function diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 0acd94f..4c34eb9 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -5901,7 +5901,7 @@ package body Exp_Ch3 is -- would otherwise make two copies. The RM allows removing redunant -- Adjust/Finalize calls, but does not allow insertion of extra ones. - -- This part is disabled for now, because it breaks GPS builds + -- This part is disabled for now, because it breaks CodePeer runs return (False -- ??? and then Nkind (Expr_Q) = N_Explicit_Dereference diff --git a/gcc/ada/ghost.adb b/gcc/ada/ghost.adb index b55cff6..fadb891 100644 --- a/gcc/ada/ghost.adb +++ b/gcc/ada/ghost.adb @@ -1490,7 +1490,9 @@ package body Ghost is while Present (Nod) loop Scop := Empty; - if Nkind (Nod) = N_Block_Statement then + if Nkind (Nod) = N_Block_Statement + and then Present (Identifier (Nod)) + then Scop := Entity (Identifier (Nod)); elsif Nkind_In (Nod, N_Package_Body, diff --git a/gcc/ada/gprep.adb b/gcc/ada/gprep.adb index 666d0ae..cc7e243 100644 --- a/gcc/ada/gprep.adb +++ b/gcc/ada/gprep.adb @@ -253,7 +253,15 @@ package body GPrep is Scanner.Initialize_Scanner (Deffile); - Prep.Parse_Def_File; + -- Parse the definition file without "replace in comments" + + declare + Replace : constant Boolean := Opt.Replace_In_Comments; + begin + Opt.Replace_In_Comments := False; + Prep.Parse_Def_File; + Opt.Replace_In_Comments := Replace; + end; end; end if; -- 2.7.4