diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-02-04 15:25:46 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-02-04 15:25:46 +0100 |
commit | ebdaa81b017726b7d7bd6407c77bcbb1dd97702f (patch) | |
tree | 54d703e76707252f2b3c71da82620899bd029943 | |
parent | 029ce7a26d8b23eee3096ff9f8424480c7dae6dd (diff) | |
download | gcc-ebdaa81b017726b7d7bd6407c77bcbb1dd97702f.zip gcc-ebdaa81b017726b7d7bd6407c77bcbb1dd97702f.tar.gz gcc-ebdaa81b017726b7d7bd6407c77bcbb1dd97702f.tar.bz2 |
[multiple changes]
2014-02-04 Gary Dismukes <dismukes@adacore.com>
* g-comlin.adb: Minor typo fix.
2014-02-04 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Freeze_All): Types derived from a formal
access_to_classwide type do not have a finalization master.
2014-02-04 Robert Dewar <dewar@adacore.com>
* sprint.adb: Minor reformatting.
2014-02-04 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
cases where Actions is a null list.
* sinfo.ads (N_Expression_With_Actions): Actions can be
temporarily empty during semantic analysis, but must be non-empty
in the final expanded tree.
From-SVN: r207466
-rw-r--r-- | gcc/ada/ChangeLog | 21 | ||||
-rw-r--r-- | gcc/ada/exp_ch4.adb | 20 | ||||
-rw-r--r-- | gcc/ada/freeze.adb | 8 | ||||
-rw-r--r-- | gcc/ada/g-comlin.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sinfo.ads | 7 | ||||
-rw-r--r-- | gcc/ada/sprint.adb | 2 |
6 files changed, 48 insertions, 12 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d17dbbc..507b318 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,24 @@ +2014-02-04 Gary Dismukes <dismukes@adacore.com> + + * g-comlin.adb: Minor typo fix. + +2014-02-04 Ed Schonberg <schonberg@adacore.com> + + * freeze.adb (Freeze_All): Types derived from a formal + access_to_classwide type do not have a finalization master. + +2014-02-04 Robert Dewar <dewar@adacore.com> + + * sprint.adb: Minor reformatting. + +2014-02-04 Robert Dewar <dewar@adacore.com> + + * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate + cases where Actions is a null list. + * sinfo.ads (N_Expression_With_Actions): Actions can be + temporarily empty during semantic analysis, but must be non-empty + in the final expanded tree. + 2014-01-31 Robert Dewar <dewar@adacore.com> * exp_ch9.adb: Minor reformatting. diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 06c69b1..39a80d3 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -5111,11 +5111,23 @@ package body Exp_Ch4 is begin Act := First (Actions (N)); - while Present (Act) loop - Process_Single_Action (Act); - Next (Act); - end loop; + -- Deal with case where there are no actions. In this case we simply + -- replace the node by its expression since we don't need the actions + -- and the specification of this node does not allow a null action list. + + if No (Act) then + Replace (N, Relocate_Node (Expression (N))); + + -- Otherwise process the actions as described above + + else + loop + Process_Single_Action (Act); + Next (Act); + exit when No (Act); + end loop; + end if; end Expand_N_Expression_With_Actions; ---------------------------- diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 3b5f01b..440d562 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -1647,13 +1647,13 @@ package body Freeze is -- where a component type is private and the controlled full type -- occurs after the access type is frozen. Cases that don't need a -- finalization master are generic formal types (the actual type will - -- have it) and types with Java and CIL conventions, since those are - -- used for API bindings. (Are there any other cases that should be - -- excluded here???) + -- have it) and types derived from them, and types with Java and CIL + -- conventions, since those are used for API bindings. + -- (Are there any other cases that should be excluded here???) elsif Is_Access_Type (E) and then Comes_From_Source (E) - and then not Is_Generic_Type (E) + and then not Is_Generic_Type (Root_Type (E)) and then Needs_Finalization (Designated_Type (E)) then Build_Finalization_Master (E); diff --git a/gcc/ada/g-comlin.adb b/gcc/ada/g-comlin.adb index 4f84bd9e..0f74bbf 100644 --- a/gcc/ada/g-comlin.adb +++ b/gcc/ada/g-comlin.adb @@ -1683,7 +1683,7 @@ package body GNAT.Command_Line is -- Note: When a Command_Line object is associated with a -- Command_Line_Config (which is mostly the case for tools - -- that let users chose the command line before spawning + -- that let users choose the command line before spawning -- other tools, for instance IDEs), the configuration of -- the switches must be taken from the Command_Line_Config. diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index 6aa28f2..2885523 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -7355,8 +7355,11 @@ package Sinfo is -- Expression (Node3) -- plus fields for expression - -- Note: the actions list is always non-null, since we would never have - -- created this node if there weren't some actions. + -- Note: In the final generated tree presented to the code generator, + -- the actions list is always non-null, since there is no point in this + -- node if the actions are Empty. During semantic analysis there are + -- cases where it is convenient to temporarily generate an empty actions + -- list, but the Expander removes such cases. -- Note: Expression may be a Null_Statement, in which case the -- N_Expression_With_Actions has type Standard_Void_Type. However some diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb index 1f88158..e909474 100644 --- a/gcc/ada/sprint.adb +++ b/gcc/ada/sprint.adb @@ -1131,7 +1131,7 @@ package body Sprint is if Present (Identifier (Node)) and then (not Has_Created_Identifier (Node) - or else not Dump_Original_Only) + or else not Dump_Original_Only) then Write_Rewrite_Str ("<<<"); Write_Id (Identifier (Node)); |