aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch13.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-07-09 15:14:52 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2012-07-09 15:14:52 +0200
commit22a83cea153e34e826ed42afd56334be89a9ad8e (patch)
tree9fbb4905b777da0e0b7e9948da3632d61fee8a40 /gcc/ada/sem_ch13.adb
parenta2c1791d894d8d421bda4344219bc971ec7faa30 (diff)
downloadgcc-22a83cea153e34e826ed42afd56334be89a9ad8e.zip
gcc-22a83cea153e34e826ed42afd56334be89a9ad8e.tar.gz
gcc-22a83cea153e34e826ed42afd56334be89a9ad8e.tar.bz2
[multiple changes]
2012-07-09 Thomas Quinot <quinot@adacore.com> * einfo.adb (Set_Reverse_Storage_Order): Update assertion, flag is now valid for array types as well. 2012-07-09 Tristan Gingold <gingold@adacore.com> * tracebak.c: Implement __gnat_backtrace for Win64 SEH. 2012-07-09 Robert Dewar <dewar@adacore.com> * einfo.ads: Minor reformatting. 2012-07-09 Javier Miranda <miranda@adacore.com> * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): Handle as renaming_as_body renamings of predefined dispatching equality and unequality operators. 2012-07-09 Robert Dewar <dewar@adacore.com> * rident.ads: Do not instantiate r-ident.ads, this is now an independent unit. 2012-07-09 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Write_DT): Avoid runtime crash of this debugging routine. * sem_disp.adb (Find_Dispatching_Time): Protect this routine against partially decorated entities. 2012-07-09 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Check_Size): Reject a size clause that specifies a value greater than Int'Last for a scalar type. 2012-07-09 Vincent Pucci <pucci@adacore.com> * sem_ch9.adb (Allows_Lock_Free_Implementation): type must support atomic operation moved to the protected body case. No non-elementary out parameter moved to the protected declaration case. Functions have only one lock-free restriction. (Analyze_Protected_Type_Declaration): Issue a warning when Priority given with Lock_Free. 2012-07-09 Vincent Pucci <pucci@adacore.com> * sem_dim.adb: Grammar of aspect Dimension fixed. 2012-07-09 Vincent Pucci <pucci@adacore.com> * freeze.adb (Freeze_Record_Type): Code reorg in order to avoid pushing and popping the scope stack whenever a delayed aspect occurs. 2012-07-09 Gary Dismukes <dismukes@adacore.com> * s-os_lib.ads: Remove pragma Elaborate_Body, as this is now unnecessary due to recently added pragma Preelaborate. 2012-07-09 Jose Ruiz <ruiz@adacore.com> * s-taprop-mingw.adb (Set_Priority): Remove the code that was previously in place to reorder the ready queue when a task drops its priority due to the loss of inherited priority. From-SVN: r189377
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r--gcc/ada/sem_ch13.adb12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 3b5b203..e475000 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -7735,6 +7735,18 @@ package body Sem_Ch13 is
begin
Biased := False;
+ -- Reject patently improper size values.
+
+ if Is_Scalar_Type (T)
+ and then Siz > UI_From_Int (Int'Last)
+ then
+ Error_Msg_N ("Size value too large for scalar type", N);
+ if Nkind (Original_Node (N)) = N_Op_Expon then
+ Error_Msg_N
+ ("\maybe '* was meant, rather than '*'*", Original_Node (N));
+ end if;
+ end if;
+
-- Dismiss cases for generic types or types with previous errors
if No (UT)