From 24d14b918a541a2903c940dd26ad1d16a2d1d987 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 29 Jul 2014 15:43:43 +0200 Subject: [PATCH] [multiple changes] 2014-07-29 Robert Dewar * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address): Fix incorrect RTE call which caused bomb if pragma was in configuration pragma file. 2014-07-29 Jerome Lambourg * expect.c (__gnat_expect_poll): Fix typo in previous change. * g-expect.adb: Update comments. 2014-07-29 Arnaud Charlet * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads (Default_Attribute_Count): Bump to 16 on native platforms. 2014-07-29 Ed Schonberg * sem_res.adb: Add guard to front-end inlining for SPARK. From-SVN: r213185 --- gcc/ada/ChangeLog | 20 ++++++++++++++++++++ gcc/ada/expect.c | 11 ++++++----- gcc/ada/g-expect.adb | 7 ++++--- gcc/ada/s-parame-hpux.ads | 4 ++-- gcc/ada/s-parame-vms-ia64.ads | 4 ++-- gcc/ada/s-parame.ads | 4 ++-- gcc/ada/sem_prag.adb | 10 +--------- gcc/ada/sem_res.adb | 2 ++ 8 files changed, 39 insertions(+), 23 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 78d81fdd1fa9..4c9777915532 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,23 @@ +2014-07-29 Robert Dewar + + * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address): + Fix incorrect RTE call which caused bomb if pragma was in + configuration pragma file. + +2014-07-29 Jerome Lambourg + + * expect.c (__gnat_expect_poll): Fix typo in previous change. + * g-expect.adb: Update comments. + +2014-07-29 Arnaud Charlet + + * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads + (Default_Attribute_Count): Bump to 16 on native platforms. + +2014-07-29 Ed Schonberg + + * sem_res.adb: Add guard to front-end inlining for SPARK. + 2014-07-29 Robert Dewar * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb: diff --git a/gcc/ada/expect.c b/gcc/ada/expect.c index ce03224e9cf9..45e0540e839e 100644 --- a/gcc/ada/expect.c +++ b/gcc/ada/expect.c @@ -180,9 +180,10 @@ __gnat_expect_poll (int *fd, for (i = 0; i < num_fd; i++) { if (!PeekNamedPipe (handles [i], NULL, 0, NULL, &avail, NULL)) - *dead_process = i + 1; - return -1; - + { + *dead_process = i + 1; + return -1; + } if (avail > 0) { is_set[i] = 1; @@ -292,9 +293,9 @@ __gnat_expect_poll (int *fd, if ((status & 1) != 1) { - ready = -1; + ready = -1; dead_process = i + 1; - return ready; + return ready; } } } diff --git a/gcc/ada/g-expect.adb b/gcc/ada/g-expect.adb index af2f0dc1bba8..94f80e92263d 100644 --- a/gcc/ada/g-expect.adb +++ b/gcc/ada/g-expect.adb @@ -110,9 +110,10 @@ package body GNAT.Expect is Dead_Process : access Integer; Is_Set : System.Address) return Integer; pragma Import (C, Poll, "__gnat_expect_poll"); - -- Check whether there is any data waiting on the file descriptors Fds, and - -- wait if there is none, at most Timeout milliseconds Returns -1 in case - -- of error, 0 if the timeout expired before data became available. + -- Check whether there is any data waiting on the file descriptors + -- Fds, and wait if there is none, at most Timeout milliseconds + -- Returns -1 in case of error, 0 if the timeout expired before + -- data became available. -- -- Is_Set is an array of the same size as FDs and elements are set to 1 if -- data is available for the corresponding File Descriptor, 0 otherwise. diff --git a/gcc/ada/s-parame-hpux.ads b/gcc/ada/s-parame-hpux.ads index b8511162fff7..1b3142ca789d 100644 --- a/gcc/ada/s-parame-hpux.ads +++ b/gcc/ada/s-parame-hpux.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -180,7 +180,7 @@ package System.Parameters is -- Task Attributes -- --------------------- - Default_Attribute_Count : constant := 4; + Default_Attribute_Count : constant := 16; -- Number of pre-allocated Address-sized task attributes stored in the -- task control block. diff --git a/gcc/ada/s-parame-vms-ia64.ads b/gcc/ada/s-parame-vms-ia64.ads index 2726f34b2c4f..ed3cd6c9157a 100644 --- a/gcc/ada/s-parame-vms-ia64.ads +++ b/gcc/ada/s-parame-vms-ia64.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -183,7 +183,7 @@ package System.Parameters is -- Task Attributes -- --------------------- - Default_Attribute_Count : constant := 4; + Default_Attribute_Count : constant := 16; -- Number of pre-allocated Address-sized task attributes stored in the -- task control block. diff --git a/gcc/ada/s-parame.ads b/gcc/ada/s-parame.ads index 4ebfc5cd8779..a0b87fd831e0 100644 --- a/gcc/ada/s-parame.ads +++ b/gcc/ada/s-parame.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -182,7 +182,7 @@ package System.Parameters is -- Task Attributes -- --------------------- - Default_Attribute_Count : constant := 4; + Default_Attribute_Count : constant := 16; -- Number of pre-allocated Address-sized task attributes stored in the -- task control block. diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index c7967ca58042..9f69c00cd123 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -11012,15 +11012,7 @@ package body Sem_Prag is -- VMS, where it is an integer type), then this pragma has no -- purpose, so it is simply ignored. - -- If Allow_Integer_Address is already set do nothing, otherwise - -- calling RTE on RE_Address would cause a crash when loading - -- system.ads. ??? same will happen if Allow_Integer_Address is - -- not set actually, to be fixed and then the guard on - -- not Opt.Allow_Integer_Address should be removed. - - if not Opt.Allow_Integer_Address - and then Is_Private_Type (RTE (RE_Address)) - then + if Opt.Address_Is_Private then Opt.Allow_Integer_Address := True; end if; diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 221d15b0ccf0..168cfb32c454 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -6127,8 +6127,10 @@ package body Sem_Res is -- In GNATprove_Mode expansion is disabled, but we want to inline -- subprograms that are marked Inline_Always, since the inlining -- is useful in making it easier to prove things about the inlined body. + -- Indirect calls, through a subprogram type, cannot be inlined. if GNATprove_Mode + and then Is_Overloadable (Nam) and then Nkind (Unit_Declaration_Node (Nam)) = N_Subprogram_Declaration and then Present (Body_To_Inline (Unit_Declaration_Node (Nam))) then -- 2.47.3