Commit 7cb99df4 by Arnaud Charlet

Add new tests.

From-SVN: r127985
parent a2c20cfa
-- { dg-do compile }
with text_io;
with System;
procedure addr3 is
Type T_SAME_TYPE is new System.Address;
Type T_OTHER_TYPE is new System.Address;
I : constant integer := 0;
procedure dum ( i : INTEGER ) is
begin
text_io.put_line ("Integer op");
null;
end;
procedure dum ( i : system.ADDRESS ) is
begin
null;
end;
procedure dum ( i : T_SAME_TYPE ) is
begin
null;
end;
procedure dum ( i : T_OTHER_TYPE ) is
begin
null;
end;
begin
dum( I );
dum( 1 );
end;
-- { dg-do compile }
procedure aggr8 is
type Byte is mod 2 ** 8;
subtype two is integer range 1..2;
-- type Sequence is array (1 .. 2) of Byte;
type Sequence is array (Two) of Byte;
type Block is record
Head : Sequence := (11, 22);
end record;
procedure Nest is
Blk : Block; pragma Unreferenced (Blk);
begin
null;
end;
begin
null;
end;
-- { dg-do compile }
-- { dg-options "-gnatwa" }
package body no_exc_prop is
protected body Simple_Barrier is
entry Wait when Signaled is
begin
Signaled := False;
end Wait;
procedure Signal is
begin
Signaled := True;
end Signal;
end Simple_Barrier;
end no_exc_prop;
pragma Restrictions (No_Exception_Propagation);
package no_exc_prop is
protected Simple_Barrier is
entry Wait;
procedure Signal;
private
Signaled : Boolean := False;
end Simple_Barrier;
end no_exc_prop;
-- { dg-do run }
with Ada.Tags;
procedure tag1 is
type T is tagged null record;
X : Ada.Tags.Tag;
begin
begin
X := Ada.Tags.Descendant_Tag ("Internal tag at 16#0#", T'Tag);
raise Program_Error;
exception
when Ada.Tags.Tag_Error => null;
end;
begin
X := Ada.Tags.Descendant_Tag ("Internal tag at 16#XXXX#", T'Tag);
raise Program_Error;
exception
when Ada.Tags.Tag_Error => null;
end;
end;
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