projects
/
test_jj.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
303bd2a
)
[Ada] Fix check for implicit allocation of dynamic objects
author
Etienne Servais
<servais@adacore.com>
Tue, 4 Jan 2022 11:41:02 +0000
(12:41 +0100)
committer
Pierre-Marie de Rodat
<derodat@adacore.com>
Tue, 11 Jan 2022 13:24:47 +0000
(13:24 +0000)
gcc/ada/
* sem_ch3.adb (Check_Dynamic_Object): Swap check order.
gcc/ada/sem_ch3.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/sem_ch3.adb
b/gcc/ada/sem_ch3.adb
index
3fc2051
..
06b8cc4
100644
(file)
--- a/
gcc/ada/sem_ch3.adb
+++ b/
gcc/ada/sem_ch3.adb
@@
-3831,6
+3831,9
@@
package body Sem_Ch3 is
then
null;
+ elsif Is_Record_Type (Etype (Comp)) then
+ Check_Dynamic_Object (Etype (Comp));
+
elsif not Discriminated_Size (Comp)
and then Comes_From_Source (Comp)
then
@@
-3838,8
+3841,6
@@
package body Sem_Ch3 is
("component& of non-static size will violate restriction "
& "No_Implicit_Heap_Allocation?", N, Comp);
- elsif Is_Record_Type (Etype (Comp)) then
- Check_Dynamic_Object (Etype (Comp));
end if;
Next_Component (Comp);