diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-01-10 11:35:38 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-01-10 11:35:38 +0100 |
commit | 72348e26a5b81571cf11491569d5487203425a0c (patch) | |
tree | b77b2038989d2dc9139ce86712170793b691c18d /gcc/ada/sem_intr.adb | |
parent | cba300dd7dfadf5069d9943c6a54c65a34614d20 (diff) | |
download | gcc-72348e26a5b81571cf11491569d5487203425a0c.zip gcc-72348e26a5b81571cf11491569d5487203425a0c.tar.gz gcc-72348e26a5b81571cf11491569d5487203425a0c.tar.bz2 |
[multiple changes]
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.
From-SVN: r183059
Diffstat (limited to 'gcc/ada/sem_intr.adb')
-rw-r--r-- | gcc/ada/sem_intr.adb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/ada/sem_intr.adb b/gcc/ada/sem_intr.adb index 26f9ff4..f650be9 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 |