summaryrefslogtreecommitdiffstats
path: root/gcc/ada/sem_intr.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-10 10:35:38 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-10 10:35:38 +0000
commit43537c9651f05e0ad6ba2c752dcfdfb762ef8376 (patch)
treeb77b2038989d2dc9139ce86712170793b691c18d /gcc/ada/sem_intr.adb
parented2541eafbb29793692821d4798a69bc734dc0e0 (diff)
downloadppe42-gcc-43537c9651f05e0ad6ba2c752dcfdfb762ef8376.tar.gz
ppe42-gcc-43537c9651f05e0ad6ba2c752dcfdfb762ef8376.zip
2012-01-10 Bob Duff <duff@adacore.com>
* sem_intr.adb (Check_Shift): Use RM_Size instead of Esize, when checking that the 'Size is correct. If the type is "mod 2**12", for example, it's illegal, but Esize is the 'Object_Size, which will be something like 16 or 32, so the error ('Size = 12) was not detected. * gnat_rm.texi: Improve documentation of shift and rotate intrinsics. 2012-01-10 Pascal Obry <obry@adacore.com> * prj.adb (For_Every_Project_Imported): Fix implementation to make sure we return each project only once for aggragte libraries. It is fine to return a project twice for aggregate projects, this was the case as a Project_Id is different in each project tree. The new implementation use a table based on the project name to ensure proper detection of duplicate project in aggregate library. A new context is then created to continue retrurning duplicate project for aggregate libraries. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183059 138bc75d-0d04-0410-961f-82ee72b054a4
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