diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2025-03-26 00:37:22 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2025-06-10 10:59:43 +0200 |
commit | e249cec1ac9957a1e0d064104014f9c4c339d2d6 (patch) | |
tree | 8228c134e26f36124771b1197a0b9fdba43e530e | |
parent | d02a2fe99f895f7c8cf969b618a51700e61c69ac (diff) | |
download | gcc-e249cec1ac9957a1e0d064104014f9c4c339d2d6.zip gcc-e249cec1ac9957a1e0d064104014f9c4c339d2d6.tar.gz gcc-e249cec1ac9957a1e0d064104014f9c4c339d2d6.tar.bz2 |
ada: Fix fallout of latest change
Freeze_Static_Object needs to deal with the objects that have been created
by Insert_Conditional_Object_Declaration.
gcc/ada/ChangeLog:
* freeze.adb (Freeze_Static_Object): Do not issue any error message
for compiler-generated entities.
-rw-r--r-- | gcc/ada/freeze.adb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 93ba3d0..eb751e1 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -10231,11 +10231,17 @@ package body Freeze is -- issue an error message saying that this object cannot be imported -- or exported. If it has an address clause it is an overlay in the -- current partition and the static requirement is not relevant. - -- Do not issue any error message when ignoring rep clauses. + -- Do not issue any error message when ignoring rep clauses or for + -- compiler-generated entities. if Ignore_Rep_Clauses then null; + elsif not Comes_From_Source (E) then + pragma + Assert (Nkind (Parent (Declaration_Node (E))) in N_Case_Statement + | N_If_Statement); + elsif Is_Imported (E) then if No (Address_Clause (E)) then Error_Msg_N |