Patchwork Fix oversights in the gnat.dg testsuite

login
register
mail settings
Submitter Eric Botcazou
Date Sept. 20, 2012, 9:55 p.m.
Message ID <2489329.zBJtdbCVgB@polaris>
Download mbox | patch
Permalink /patch/185511/
State New
Headers show

Comments

Eric Botcazou - Sept. 20, 2012, 9:55 p.m.
The dg directives need to be put in the .adb files, otherwise they are ignored 
in the gnat.dg directory.

Tested on x86-64/Linux, applied on all active branches.


2012-09-20  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat.dg/opt20.ads: Move dg directive to...
	* gnat.dg/opt20.adb: ...here.
	* gnat.dg/addr1.ad[sb]: Likewise.
	* gnat.dg/concat2.ad[sb]: Likewise.
	* gnat.dg/array16.ad[sb]: Likewise.
	* gnat.dg/atomic5.ad[sb]: Likewise.
	* gnat.dg/discr29.ad[sb]: Likewise.
	* gnat.dg/noreturn5.ad[sb]: Likewise.
	* gnat.dg/vect8.ad[sb]: Likewise.  Add dg-options.
	* gnat.dg/discr23.ads: Remove dg directive.
	* gnat.dg/nested_float_packed.ads: Likewise.
	* gnat.dg/oconst6.ads: Move to...
	* gnat.dg/specs/oconst6.ads: ...here.

Patch

Index: gnat.dg/opt20.adb
===================================================================
--- gnat.dg/opt20.adb	(revision 191365)
+++ gnat.dg/opt20.adb	(working copy)
@@ -1,3 +1,6 @@ 
+-- { dg-do compile }
+-- { dg-options "-O2 -gnatpn" }
+
 with Ada.Characters.Handling; use Ada.Characters.Handling;
 
 package body Opt20 is
Index: gnat.dg/opt20.ads
===================================================================
--- gnat.dg/opt20.ads	(revision 191365)
+++ gnat.dg/opt20.ads	(working copy)
@@ -1,6 +1,3 @@ 
--- { dg-do compile }
--- { dg-options "-O2 -gnatpn" }
-
 with Opt20_Pkg; use Opt20_Pkg;
 
 package Opt20 is
Index: gnat.dg/addr1.adb
===================================================================
--- gnat.dg/addr1.adb	(revision 191365)
+++ gnat.dg/addr1.adb	(working copy)
@@ -1,3 +1,5 @@ 
+--  { dg-do compile }
+
 with System;
 package body addr1 is
    task type T is
Index: gnat.dg/addr1.ads
===================================================================
--- gnat.dg/addr1.ads	(revision 191365)
+++ gnat.dg/addr1.ads	(working copy)
@@ -1,5 +1,3 @@ 
---  { dg-do compile }
-
 package addr1 is
    pragma Elaborate_Body;
 end;
Index: gnat.dg/discr23.ads
===================================================================
--- gnat.dg/discr23.ads	(revision 191365)
+++ gnat.dg/discr23.ads	(working copy)
@@ -1,5 +1,3 @@ 
--- { dg-do compile }
-
 package Discr23 is
 
   procedure Dummy;
Index: gnat.dg/oconst6.ads
===================================================================
--- gnat.dg/oconst6.ads	(revision 191365)
+++ gnat.dg/oconst6.ads	(working copy)
@@ -1,18 +0,0 @@ 
--- { dg-do compile }
--- { dg-final { scan-assembler-not "elabs" } }
-
-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;
-
Index: gnat.dg/concat2.adb
===================================================================
--- gnat.dg/concat2.adb	(revision 191365)
+++ gnat.dg/concat2.adb	(working copy)
@@ -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;
-
Index: gnat.dg/concat2.ads
===================================================================
--- gnat.dg/concat2.ads	(revision 191365)
+++ gnat.dg/concat2.ads	(working copy)
@@ -1,6 +1,3 @@ 
--- { dg-do compile }
--- { dg-options "-O" }
-
 package Concat2 is
 
    procedure Browse;
Index: gnat.dg/vect8.adb
===================================================================
--- gnat.dg/vect8.adb	(revision 191365)
+++ gnat.dg/vect8.adb	(working copy)
@@ -1,3 +1,6 @@ 
+-- { dg-do compile }
+-- { dg-options "-w" }
+
 package body Vect8 is
 
    function Foo (V : Vec) return Vec is
Index: gnat.dg/vect8.ads
===================================================================
--- gnat.dg/vect8.ads	(revision 191365)
+++ gnat.dg/vect8.ads	(working copy)
@@ -1,5 +1,3 @@ 
--- { dg-do compile }
-
 package Vect8 is
 
    type Vec is array (1 .. 2) of Long_Float;
Index: gnat.dg/array16.adb
===================================================================
--- gnat.dg/array16.adb	(revision 191365)
+++ gnat.dg/array16.adb	(working copy)
@@ -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" } }
Index: gnat.dg/array16.ads
===================================================================
--- gnat.dg/array16.ads	(revision 191365)
+++ gnat.dg/array16.ads	(working copy)
@@ -1,6 +1,3 @@ 
--- { dg-do compile }
--- { dg-options "-O -gnatn -fdump-tree-optimized" }
-
 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;
-
--- { dg-final { scan-tree-dump-not "secondary_stack" "optimized" } }
--- { dg-final { cleanup-tree-dump "optimized" } }
Index: gnat.dg/nested_float_packed.ads
===================================================================
--- gnat.dg/nested_float_packed.ads	(revision 191365)
+++ gnat.dg/nested_float_packed.ads	(working copy)
@@ -1,5 +1,3 @@ 
--- { dg-do compile }
-
 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;
-
-
Index: gnat.dg/atomic5.adb
===================================================================
--- gnat.dg/atomic5.adb	(revision 191365)
+++ gnat.dg/atomic5.adb	(working copy)
@@ -1,3 +1,5 @@ 
+-- { dg-do compile }
+
 package body Atomic5 is
 
   function Create return R is
Index: gnat.dg/atomic5.ads
===================================================================
--- gnat.dg/atomic5.ads	(revision 191365)
+++ gnat.dg/atomic5.ads	(working copy)
@@ -1,5 +1,3 @@ 
--- { dg-do compile }
-
 with Unchecked_Conversion;
 
 package Atomic5 is
Index: gnat.dg/discr29.adb
===================================================================
--- gnat.dg/discr29.adb	(revision 191365)
+++ gnat.dg/discr29.adb	(working copy)
@@ -1,3 +1,5 @@ 
+-- { dg-do compile }
+
 package body Discr29 is
 
    procedure Proc (R : out Rec3) is
Index: gnat.dg/discr29.ads
===================================================================
--- gnat.dg/discr29.ads	(revision 191365)
+++ gnat.dg/discr29.ads	(working copy)
@@ -1,5 +1,3 @@ 
--- { dg-do compile }
-
 package Discr29 is
 
    type Rec1 is record
Index: gnat.dg/noreturn5.adb
===================================================================
--- gnat.dg/noreturn5.adb	(revision 191365)
+++ gnat.dg/noreturn5.adb	(working copy)
@@ -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;
Index: gnat.dg/noreturn5.ads
===================================================================
--- gnat.dg/noreturn5.ads	(revision 191365)
+++ gnat.dg/noreturn5.ads	(working copy)
@@ -1,5 +1,3 @@ 
--- { dg-do compile }
-
 package Noreturn5 is
 
    procedure Proc (Arg_Line : Wide_String; Keep_Going : Boolean);