diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-11-18 11:03:44 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-11-18 11:03:44 +0100 |
commit | 5904016a5c1d7df58877678583a3f65ebecc052d (patch) | |
tree | 51c383861941a122ba6296c8658ad90d4501fb03 /gcc/ada/checks.adb | |
parent | 287aa0ed9267e7afe6d9350a6b5b95f271db28ce (diff) | |
download | gcc-5904016a5c1d7df58877678583a3f65ebecc052d.zip gcc-5904016a5c1d7df58877678583a3f65ebecc052d.tar.gz gcc-5904016a5c1d7df58877678583a3f65ebecc052d.tar.bz2 |
[multiple changes]
2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_util.adb (Has_Full_Default_Initialization):
Perform the test for the presence of pragma
Default_Initial_Condition prior to the specialized type
checks. Add a missing case where the lack of a pragma argument
yields full default initialization.
2015-11-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Resolve_Entity_Name): Do not check
for elaboration issues when a variable appears as the name of
an object renaming declaration as this constitutes an aliasing,
not a read.
2015-11-18 Ed Schonberg <schonberg@adacore.com>
* checks.adb (Overlap_Check): An actual that is an aggregate
cannot overlap with another actual, and no check should be
generated for it.
* targparm.ads: Fix typos.
2015-11-18 Pascal Obry <obry@adacore.com>
* adaint.c: Routine __gnat_killprocesstree only implemented on
Linux and Windows.
2015-11-18 Pascal Obry <obry@adacore.com>
* g-ctrl_c.adb: Minor style fixes.
From-SVN: r230523
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r-- | gcc/ada/checks.adb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index b5086cc..64dcf57 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -2359,9 +2359,19 @@ package body Checks is -- Ensure that the actual is an object that is not passed by value. -- Elementary types are always passed by value, therefore actuals of - -- such types cannot lead to aliasing. + -- such types cannot lead to aliasing. An aggregate is an object in + -- Ada 2012, but an actual that is an aggregate cannot overlap with + -- another actual. - if Is_Object_Reference (Original_Actual (Actual_1)) + if Nkind (Original_Actual (Actual_1)) = N_Aggregate + or else + (Nkind (Original_Actual (Actual_1)) = N_Qualified_Expression + and then Nkind (Expression (Original_Actual (Actual_1))) = + N_Aggregate) + then + null; + + elsif Is_Object_Reference (Original_Actual (Actual_1)) and then not Is_Elementary_Type (Etype (Original_Actual (Actual_1))) then Actual_2 := Next_Actual (Actual_1); |