projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c06148
)
[Ada] Unique itypes names for unconstrained array object declaration
author
Piotr Trojanek
<trojanek@adacore.com>
Thu, 25 Jun 2020 19:48:51 +0000
(21:48 +0200)
committer
Pierre-Marie de Rodat
<derodat@adacore.com>
Fri, 16 Oct 2020 07:31:21 +0000
(
03:31
-0400)
gcc/ada/
* sem_ch3.adb (Array_Type_Declaration): Create itype with unique
name.
gcc/ada/sem_ch3.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/sem_ch3.adb
b/gcc/ada/sem_ch3.adb
index dc276df7972ef8716b882ed5637ff3b47f106b07..8fe118b078eb128765063b9ea5e8fc655d8489ff 100644
(file)
--- a/
gcc/ada/sem_ch3.adb
+++ b/
gcc/ada/sem_ch3.adb
@@
-6141,7
+6141,12
@@
package body Sem_Ch3 is
-- Constrained array case
if No (T) then
- T := Create_Itype (E_Void, P, Related_Id, 'T');
+ -- We might be creating more than one itype with the same Related_Id,
+ -- e.g. for an array object definition and its initial value. Give
+ -- them unique suffixes, because GNATprove require distinct types to
+ -- have different names.
+
+ T := Create_Itype (E_Void, P, Related_Id, 'T', Suffix_Index => -1);
end if;
if Nkind (Def) = N_Constrained_Array_Definition then