projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6d844c
)
[Ada] Fix detection of slices that denote the same object
author
Piotr Trojanek
<trojanek@adacore.com>
Tue, 9 Mar 2021 21:22:19 +0000
(22:22 +0100)
committer
Pierre-Marie de Rodat
<derodat@adacore.com>
Thu, 17 Jun 2021 14:32:13 +0000
(10:32 -0400)
gcc/ada/
* sem_util.adb (Denotes_Same_Object): Call Get_Index_Bounds with
the range of a slice object, not its type.
gcc/ada/sem_util.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/sem_util.adb
b/gcc/ada/sem_util.adb
index
6481d86
..
c9d97a9
100644
(file)
--- a/
gcc/ada/sem_util.adb
+++ b/
gcc/ada/sem_util.adb
@@
-7482,8
+7482,8
@@
package body Sem_Util is
Lo1, Lo2, Hi1, Hi2 : Node_Id;
begin
- Get_Index_Bounds (
Etyp
e (Obj1), Lo1, Hi1);
- Get_Index_Bounds (
Etyp
e (Obj2), Lo2, Hi2);
+ Get_Index_Bounds (
Discrete_Rang
e (Obj1), Lo1, Hi1);
+ Get_Index_Bounds (
Discrete_Rang
e (Obj2), Lo2, Hi2);
-- Check whether bounds are statically identical. There is no
-- attempt to detect partial overlap of slices.