===================================================================
@@ -1,3 +1,6 @@
+-- { dg-do compile }
+-- { dg-options "-O2 -gnatpn" }
+
with Ada.Characters.Handling; use Ada.Characters.Handling;
package body Opt20 is
===================================================================
@@ -1,6 +1,3 @@
-
with Opt20_Pkg; use Opt20_Pkg;
package Opt20 is
===================================================================
@@ -1,3 +1,5 @@
+-- { dg-do compile }
+
with System;
package body addr1 is
task type T is
===================================================================
@@ -1,5 +1,3 @@
-
package addr1 is
pragma Elaborate_Body;
end;
===================================================================
@@ -1,5 +1,3 @@
-
package Discr23 is
procedure Dummy;
===================================================================
@@ -1,18 +0,0 @@
-
-package OCONST6 is
-
- type Sequence is array (1 .. 1) of Natural;
-
- type Message is record
- Data : Sequence;
- end record;
-
- for Message'Alignment use 1;
- pragma PACK (Message);
-
- ACK : Message := (Data => (others => 1));
-
-end;
-
===================================================================
@@ -1,3 +1,6 @@
+-- { dg-do compile }
+-- { dg-options "-O" }
+
with Text_IO; use Text_IO;
package body Concat2 is
@@ -15,4 +18,3 @@ package body Concat2 is
end;
end Concat2;
-
===================================================================
@@ -1,6 +1,3 @@
-
package Concat2 is
procedure Browse;
===================================================================
@@ -1,3 +1,6 @@
+-- { dg-do compile }
+-- { dg-options "-w" }
+
package body Vect8 is
function Foo (V : Vec) return Vec is
===================================================================
@@ -1,5 +1,3 @@
-
package Vect8 is
type Vec is array (1 .. 2) of Long_Float;
===================================================================
@@ -1,3 +1,6 @@
+-- { dg-do compile }
+-- { dg-options "-O -gnatn -fdump-tree-optimized" }
+
package body Array16 is
function F1 (A : access My_T1) return My_T1 is
@@ -20,3 +23,6 @@ package body Array16 is
end;
end Array16;
+
+-- { dg-final { scan-tree-dump-not "secondary_stack" "optimized" } }
+-- { dg-final { cleanup-tree-dump "optimized" } }
===================================================================
@@ -1,6 +1,3 @@
-
with Array16_Pkg;
package Array16 is
@@ -26,6 +23,3 @@ package Array16 is
procedure Proc (A : access My_T1; B : access My_T2);
end Array16;
-
===================================================================
@@ -1,5 +1,3 @@
-
package Nested_Float_Packed is
type Float_Type is record
@@ -20,5 +18,3 @@ package Nested_Float_Packed is
Data_Block : array (Range_Type)
of Data_Type := (others => Default_Data);
end;
-
-
===================================================================
@@ -1,3 +1,5 @@
+-- { dg-do compile }
+
package body Atomic5 is
function Create return R is
===================================================================
@@ -1,5 +1,3 @@
-
with Unchecked_Conversion;
package Atomic5 is
===================================================================
@@ -1,3 +1,5 @@
+-- { dg-do compile }
+
package body Discr29 is
procedure Proc (R : out Rec3) is
===================================================================
@@ -1,5 +1,3 @@
-
package Discr29 is
type Rec1 is record
===================================================================
@@ -1,3 +1,5 @@
+-- { dg-do compile }
+
with Ada.Characters.Handling; use Ada.Characters.Handling;
with GNAT.OS_Lib; use GNAT.OS_Lib;
with Text_IO; use Text_IO;
===================================================================
@@ -1,5 +1,3 @@
-
package Noreturn5 is
procedure Proc (Arg_Line : Wide_String; Keep_Going : Boolean);