r273129 - in /trunk/gcc/ada: ChangeLog sem_ch9.adb

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Fri Jul 5 07:03:00 GMT 2019


Author: pmderodat
Date: Fri Jul  5 07:03:54 2019
New Revision: 273129

URL: https://gcc.gnu.org/viewcvs?rev=273129&root=gcc&view=rev
Log:
[Ada] Compiler loop on illegal nested accept statement

This patch fixes a "Compilation abandoned" message in a compiler built
with assertions, or a compiler loop otherwise, when an accept statement
contains an illegal accept statement for the same entry.

Compiling accept_in_accept.adb must yield:

accept_in_accept.adb:12:13:
          duplicate accept statement for same entry (RM 9.5.2 (15))

----
procedure accept_in_accept is

   task a_in_a is
      entry a (i : Integer);
   end a_in_a;

   task body a_in_a is
   begin
      select
         accept a (i : Integer) do
            null;
            accept a (i : integer) do
              null;
            end a;
         end a;
      or
         terminate;
      end select;
   end a_in_a;

begin
   a_in_a.a (1);
end accept_in_accept;

2019-07-05  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* sem_ch9.adb (Analyze_Accept_Statement): If this is an illegal
	accept statement for an enclosing entry abandon analysis to
	prevent scope mismatches and potential infinite loops in
	compiler.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/sem_ch9.adb



More information about the Gcc-cvs mailing list