Commit 24d14b91 by Arnaud Charlet

[multiple changes]

2014-07-29  Robert Dewar  <dewar@adacore.com>

	* 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  <lambourg@adacore.com>

	* expect.c (__gnat_expect_poll): Fix typo in previous change.
	* g-expect.adb: Update comments.

2014-07-29  Arnaud Charlet  <charlet@adacore.com>

	* 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  <schonberg@adacore.com>

	* sem_res.adb: Add guard to front-end inlining for SPARK.

From-SVN: r213185
parent b94b6c56
2014-07-29 Robert Dewar <dewar@adacore.com> 2014-07-29 Robert Dewar <dewar@adacore.com>
* 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 <lambourg@adacore.com>
* expect.c (__gnat_expect_poll): Fix typo in previous change.
* g-expect.adb: Update comments.
2014-07-29 Arnaud Charlet <charlet@adacore.com>
* 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 <schonberg@adacore.com>
* sem_res.adb: Add guard to front-end inlining for SPARK.
2014-07-29 Robert Dewar <dewar@adacore.com>
* sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb: * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
Minor reformatting. Minor reformatting.
......
...@@ -180,9 +180,10 @@ __gnat_expect_poll (int *fd, ...@@ -180,9 +180,10 @@ __gnat_expect_poll (int *fd,
for (i = 0; i < num_fd; i++) for (i = 0; i < num_fd; i++)
{ {
if (!PeekNamedPipe (handles [i], NULL, 0, NULL, &avail, NULL)) if (!PeekNamedPipe (handles [i], NULL, 0, NULL, &avail, NULL))
*dead_process = i + 1; {
return -1; *dead_process = i + 1;
return -1;
}
if (avail > 0) if (avail > 0)
{ {
is_set[i] = 1; is_set[i] = 1;
...@@ -292,9 +293,9 @@ __gnat_expect_poll (int *fd, ...@@ -292,9 +293,9 @@ __gnat_expect_poll (int *fd,
if ((status & 1) != 1) if ((status & 1) != 1)
{ {
ready = -1; ready = -1;
dead_process = i + 1; dead_process = i + 1;
return ready; return ready;
} }
} }
} }
......
...@@ -110,9 +110,10 @@ package body GNAT.Expect is ...@@ -110,9 +110,10 @@ package body GNAT.Expect is
Dead_Process : access Integer; Dead_Process : access Integer;
Is_Set : System.Address) return Integer; Is_Set : System.Address) return Integer;
pragma Import (C, Poll, "__gnat_expect_poll"); pragma Import (C, Poll, "__gnat_expect_poll");
-- Check whether there is any data waiting on the file descriptors Fds, and -- Check whether there is any data waiting on the file descriptors
-- wait if there is none, at most Timeout milliseconds Returns -1 in case -- Fds, and wait if there is none, at most Timeout milliseconds
-- of error, 0 if the timeout expired before data became available. -- 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 -- 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. -- data is available for the corresponding File Descriptor, 0 otherwise.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -180,7 +180,7 @@ package System.Parameters is ...@@ -180,7 +180,7 @@ package System.Parameters is
-- Task Attributes -- -- Task Attributes --
--------------------- ---------------------
Default_Attribute_Count : constant := 4; Default_Attribute_Count : constant := 16;
-- Number of pre-allocated Address-sized task attributes stored in the -- Number of pre-allocated Address-sized task attributes stored in the
-- task control block. -- task control block.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -183,7 +183,7 @@ package System.Parameters is ...@@ -183,7 +183,7 @@ package System.Parameters is
-- Task Attributes -- -- Task Attributes --
--------------------- ---------------------
Default_Attribute_Count : constant := 4; Default_Attribute_Count : constant := 16;
-- Number of pre-allocated Address-sized task attributes stored in the -- Number of pre-allocated Address-sized task attributes stored in the
-- task control block. -- task control block.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -182,7 +182,7 @@ package System.Parameters is ...@@ -182,7 +182,7 @@ package System.Parameters is
-- Task Attributes -- -- Task Attributes --
--------------------- ---------------------
Default_Attribute_Count : constant := 4; Default_Attribute_Count : constant := 16;
-- Number of pre-allocated Address-sized task attributes stored in the -- Number of pre-allocated Address-sized task attributes stored in the
-- task control block. -- task control block.
......
...@@ -11012,15 +11012,7 @@ package body Sem_Prag is ...@@ -11012,15 +11012,7 @@ package body Sem_Prag is
-- VMS, where it is an integer type), then this pragma has no -- VMS, where it is an integer type), then this pragma has no
-- purpose, so it is simply ignored. -- purpose, so it is simply ignored.
-- If Allow_Integer_Address is already set do nothing, otherwise if Opt.Address_Is_Private then
-- 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
Opt.Allow_Integer_Address := True; Opt.Allow_Integer_Address := True;
end if; end if;
......
...@@ -6127,8 +6127,10 @@ package body Sem_Res is ...@@ -6127,8 +6127,10 @@ package body Sem_Res is
-- In GNATprove_Mode expansion is disabled, but we want to inline -- In GNATprove_Mode expansion is disabled, but we want to inline
-- subprograms that are marked Inline_Always, since the inlining -- subprograms that are marked Inline_Always, since the inlining
-- is useful in making it easier to prove things about the inlined body. -- 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 if GNATprove_Mode
and then Is_Overloadable (Nam)
and then Nkind (Unit_Declaration_Node (Nam)) = N_Subprogram_Declaration and then Nkind (Unit_Declaration_Node (Nam)) = N_Subprogram_Declaration
and then Present (Body_To_Inline (Unit_Declaration_Node (Nam))) and then Present (Body_To_Inline (Unit_Declaration_Node (Nam)))
then then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment