Program1:

with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
  task Task1 is
    entry Stop;
  end Task1;
  task body Task1 is
    begin
      accept Stop;
    end Task1;
  begin
    Put_Line ( "Please wait..." );
    Delay 3.0;
    abort Task1;
    Put_Line ( "Task Task1 Aborted!" );
  end main; 

All perfectly works. After start passes 3 seconds, the program finishes the
work.

Program2:

with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
  task Task1;
  task body Task1 is
    begin
      loop
        null;
      end loop;
    end Task1;
  begin
    Put_Line ( "Please wait..." );
    Delay 3.0;
    abort Task1;
    Put_Line ( "Task Task1 Aborted!" );
  end main;

Passes 3 seconds. I see message: "Task Task1 Aborted" and the Program stands
out continues "to work" yet I shall not press Ctrl+C

System:
CentOS4.3 ( RHEL4U3 )
GNAT 3.4.5 ( Red Hat 3.4.5-2 )
GCC 3.4.5 ( Red Hat 3.4.5-2 )

On idea both programs should come to the end...


-- 
           Summary: Ada Problem with "Abort"
           Product: gcc
           Version: 3.4.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ksicom at inbox dot ru


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28355

Reply via email to