summaryrefslogtreecommitdiffstats
path: root/gcc/ada/sem_intr.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_intr.adb')
-rw-r--r--gcc/ada/sem_intr.adb15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/ada/sem_intr.adb b/gcc/ada/sem_intr.adb
index 26f9ff4a74b..f650be9c579 100644
--- a/gcc/ada/sem_intr.adb
+++ b/gcc/ada/sem_intr.adb
@@ -455,12 +455,14 @@ package body Sem_Intr is
return;
end if;
- Size := UI_To_Int (Esize (Typ1));
+ -- type'Size (not 'Object_Size!) must be one of the allowed values
- if Size /= 8
- and then Size /= 16
- and then Size /= 32
- and then Size /= 64
+ Size := UI_To_Int (RM_Size (Typ1));
+
+ if Size /= 8 and then
+ Size /= 16 and then
+ Size /= 32 and then
+ Size /= 64
then
Errint
("first argument for shift must have size 8, 16, 32 or 64",
@@ -469,8 +471,7 @@ package body Sem_Intr is
elsif Non_Binary_Modulus (Typ1) then
Errint
- ("shifts not allowed for non-binary modular types",
- Ptyp1, N);
+ ("shifts not allowed for non-binary modular types", Ptyp1, N);
elsif Etype (Arg1) /= Etype (E) then
Errint
OpenPOWER on IntegriCloud