From 9b1baeef25b109c08ee31724057e8a6925b80636 Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Fri, 7 Dec 2012 21:26:20 +0000 Subject: [PATCH] discr38.adb: Don't use ^M line endings. 2012-12-07 Mike Stump * gnat.dg/discr38.adb: Don't use ^M line endings. gnat.dg/loop_optimization13.adb: Likewise. gnat.dg/loop_optimization13.ads: Likewise. gnat.dg/discr36_pkg.adb: Likewise. gnat.dg/discr36_pkg.ads: Likewise. gnat.dg/loop_optimization11_pkg.ads: Likewise. gnat.dg/discr36.ads: Likewise. gnat.dg/loop_optimization11.adb: Likewise. From-SVN: r194309 --- gcc/testsuite/ChangeLog | 11 +++ gcc/testsuite/gnat.dg/discr36.ads | 24 +++--- gcc/testsuite/gnat.dg/discr36_pkg.adb | 20 ++--- gcc/testsuite/gnat.dg/discr36_pkg.ads | 14 ++-- gcc/testsuite/gnat.dg/discr38.adb | 80 +++++++++---------- gcc/testsuite/gnat.dg/loop_optimization11.adb | 38 ++++----- .../gnat.dg/loop_optimization11_pkg.ads | 22 ++--- gcc/testsuite/gnat.dg/loop_optimization13.adb | 42 +++++----- gcc/testsuite/gnat.dg/loop_optimization13.ads | 34 ++++---- 9 files changed, 148 insertions(+), 137 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7a1ec4a9739..6958948bb71 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2012-12-07 Mike Stump + + * gnat.dg/discr38.adb: Don't use ^M line endings. + gnat.dg/loop_optimization13.adb: Likewise. + gnat.dg/loop_optimization13.ads: Likewise. + gnat.dg/discr36_pkg.adb: Likewise. + gnat.dg/discr36_pkg.ads: Likewise. + gnat.dg/loop_optimization11_pkg.ads: Likewise. + gnat.dg/discr36.ads: Likewise. + gnat.dg/loop_optimization11.adb: Likewise. + 2012-12-07 Vladimir Makarov PR rtl-optimization/55141 diff --git a/gcc/testsuite/gnat.dg/discr36.ads b/gcc/testsuite/gnat.dg/discr36.ads index 9e39eb1c7c9..586a9740dce 100644 --- a/gcc/testsuite/gnat.dg/discr36.ads +++ b/gcc/testsuite/gnat.dg/discr36.ads @@ -1,12 +1,12 @@ -package Discr36 is - - type R (D : Boolean := True) is record - case D is - when True => I : Integer; - when False => null; - end case; - end record; - - function N return Natural; - -end Discr36; +package Discr36 is + + type R (D : Boolean := True) is record + case D is + when True => I : Integer; + when False => null; + end case; + end record; + + function N return Natural; + +end Discr36; diff --git a/gcc/testsuite/gnat.dg/discr36_pkg.adb b/gcc/testsuite/gnat.dg/discr36_pkg.adb index 5398a22e39d..82f6f621ac6 100644 --- a/gcc/testsuite/gnat.dg/discr36_pkg.adb +++ b/gcc/testsuite/gnat.dg/discr36_pkg.adb @@ -1,10 +1,10 @@ -package body Discr36_Pkg is - - function Func return T is - Ret : T; - pragma Warnings (Off, Ret); - begin - return Ret; - end; - -end Discr36_Pkg; +package body Discr36_Pkg is + + function Func return T is + Ret : T; + pragma Warnings (Off, Ret); + begin + return Ret; + end; + +end Discr36_Pkg; diff --git a/gcc/testsuite/gnat.dg/discr36_pkg.ads b/gcc/testsuite/gnat.dg/discr36_pkg.ads index 49792d46183..8d0adfc20e3 100644 --- a/gcc/testsuite/gnat.dg/discr36_pkg.ads +++ b/gcc/testsuite/gnat.dg/discr36_pkg.ads @@ -1,7 +1,7 @@ -package Discr36_Pkg is - - generic - type T is private; - function Func return T; - -end Discr36_Pkg; +package Discr36_Pkg is + + generic + type T is private; + function Func return T; + +end Discr36_Pkg; diff --git a/gcc/testsuite/gnat.dg/discr38.adb b/gcc/testsuite/gnat.dg/discr38.adb index 363d2c6f606..948493f74be 100644 --- a/gcc/testsuite/gnat.dg/discr38.adb +++ b/gcc/testsuite/gnat.dg/discr38.adb @@ -1,40 +1,40 @@ --- { dg-do compile } - -procedure Discr38 is - - type Enum is (OK, - NOT_CONNECTED, - DISCONNECTED, - REQUEST_Q_EMPTY, - SERVER_UNAVAILABLE, - BUFFER_TOO_SMALL, - NO_FREE_SLOT, - RAISE_EXCEPTION, - REQUEST_CANCELLED, - REQUEST_IN_PROGRESS, - SERVER_BUSY, - BLOCK_ACKNOWLEDGE); - - type R (Status : Enum := OK) is record - Status_Block : Integer; - case Status is - when RAISE_EXCEPTION => - I : Integer; - when OK => - Length : Natural; - Data : Integer; - when others => - null; - end case; - end record; - for R use record - Status at 0 range 0 .. 7; - Status_Block at 4 range 0 .. 31; - Length at 8 range 0 .. 31; - end record; - - Nil : constant R := (OK, 1, 0, 1); - -begin - null; -end; +-- { dg-do compile } + +procedure Discr38 is + + type Enum is (OK, + NOT_CONNECTED, + DISCONNECTED, + REQUEST_Q_EMPTY, + SERVER_UNAVAILABLE, + BUFFER_TOO_SMALL, + NO_FREE_SLOT, + RAISE_EXCEPTION, + REQUEST_CANCELLED, + REQUEST_IN_PROGRESS, + SERVER_BUSY, + BLOCK_ACKNOWLEDGE); + + type R (Status : Enum := OK) is record + Status_Block : Integer; + case Status is + when RAISE_EXCEPTION => + I : Integer; + when OK => + Length : Natural; + Data : Integer; + when others => + null; + end case; + end record; + for R use record + Status at 0 range 0 .. 7; + Status_Block at 4 range 0 .. 31; + Length at 8 range 0 .. 31; + end record; + + Nil : constant R := (OK, 1, 0, 1); + +begin + null; +end; diff --git a/gcc/testsuite/gnat.dg/loop_optimization11.adb b/gcc/testsuite/gnat.dg/loop_optimization11.adb index e4e27d48814..435d466a9c4 100644 --- a/gcc/testsuite/gnat.dg/loop_optimization11.adb +++ b/gcc/testsuite/gnat.dg/loop_optimization11.adb @@ -1,19 +1,19 @@ --- { dg-do compile } --- { dg-options "-O" } - -with Loop_Optimization11_Pkg; use Loop_Optimization11_Pkg; - -procedure Loop_Optimization11 is - Arr : array (Prot, Mem) of Integer := (others => (others => 0)); -begin - Put_Line (Img (0) & " "); - for I in Arr'Range (1) loop - for J in Arr'Range (2) loop - declare - Elem : Integer renames Arr (I, J); - begin - Put_Line (Img (Elem)); - end; - end loop; - end loop; -end; +-- { dg-do compile } +-- { dg-options "-O" } + +with Loop_Optimization11_Pkg; use Loop_Optimization11_Pkg; + +procedure Loop_Optimization11 is + Arr : array (Prot, Mem) of Integer := (others => (others => 0)); +begin + Put_Line (Img (0) & " "); + for I in Arr'Range (1) loop + for J in Arr'Range (2) loop + declare + Elem : Integer renames Arr (I, J); + begin + Put_Line (Img (Elem)); + end; + end loop; + end loop; +end; diff --git a/gcc/testsuite/gnat.dg/loop_optimization11_pkg.ads b/gcc/testsuite/gnat.dg/loop_optimization11_pkg.ads index f4248e55241..21dfde3807b 100644 --- a/gcc/testsuite/gnat.dg/loop_optimization11_pkg.ads +++ b/gcc/testsuite/gnat.dg/loop_optimization11_pkg.ads @@ -1,11 +1,11 @@ -package Loop_Optimization11_Pkg is - - function Img (X : Integer) return String; - - procedure Put_Line (Data : String); - - type Prot is (Execute, Execute_Read, Execute_Read_Write); - - type Mem is (Mem_Image, Mem_Mapped, Mem_Private, Unknown); - -end Loop_Optimization11_Pkg; +package Loop_Optimization11_Pkg is + + function Img (X : Integer) return String; + + procedure Put_Line (Data : String); + + type Prot is (Execute, Execute_Read, Execute_Read_Write); + + type Mem is (Mem_Image, Mem_Mapped, Mem_Private, Unknown); + +end Loop_Optimization11_Pkg; diff --git a/gcc/testsuite/gnat.dg/loop_optimization13.adb b/gcc/testsuite/gnat.dg/loop_optimization13.adb index ffc516ff7ba..7000172e90b 100644 --- a/gcc/testsuite/gnat.dg/loop_optimization13.adb +++ b/gcc/testsuite/gnat.dg/loop_optimization13.adb @@ -1,21 +1,21 @@ --- { dg-do compile } --- { dg-options "-O" } - -with Loop_Optimization13_Pkg; use Loop_Optimization13_Pkg; - -package body Loop_Optimization13 is - - function F (A : Rec) return Rec is - N : constant Integer := A.V'Length / L; - Res : Rec - := (True, new Complex_Vector' (0 .. A.V'Length / L - 1 => (0.0, 0.0))); - begin - for I in 0 .. L - 1 loop - for J in 0 .. N - 1 loop - Res.V (J) := Res.V (J) + A.V (I * N + J); - end loop; - end loop; - return Res; - end; - -end Loop_Optimization13; +-- { dg-do compile } +-- { dg-options "-O" } + +with Loop_Optimization13_Pkg; use Loop_Optimization13_Pkg; + +package body Loop_Optimization13 is + + function F (A : Rec) return Rec is + N : constant Integer := A.V'Length / L; + Res : Rec + := (True, new Complex_Vector' (0 .. A.V'Length / L - 1 => (0.0, 0.0))); + begin + for I in 0 .. L - 1 loop + for J in 0 .. N - 1 loop + Res.V (J) := Res.V (J) + A.V (I * N + J); + end loop; + end loop; + return Res; + end; + +end Loop_Optimization13; diff --git a/gcc/testsuite/gnat.dg/loop_optimization13.ads b/gcc/testsuite/gnat.dg/loop_optimization13.ads index 2d3b8e59f18..327dcaedcb2 100644 --- a/gcc/testsuite/gnat.dg/loop_optimization13.ads +++ b/gcc/testsuite/gnat.dg/loop_optimization13.ads @@ -1,17 +1,17 @@ -with Ada.Numerics.Complex_Types; use Ada.Numerics.Complex_Types; - -package Loop_Optimization13 is - - type Complex_Vector is array (Integer range <>) of Complex; - type Complex_Vector_Ptr is access Complex_Vector; - - type Rec (Kind : Boolean := False) is record - case Kind is - when True => V : Complex_Vector_Ptr; - when False => null; - end case; - end record; - - function F (A : Rec) return Rec; - -end Loop_Optimization13; +with Ada.Numerics.Complex_Types; use Ada.Numerics.Complex_Types; + +package Loop_Optimization13 is + + type Complex_Vector is array (Integer range <>) of Complex; + type Complex_Vector_Ptr is access Complex_Vector; + + type Rec (Kind : Boolean := False) is record + case Kind is + when True => V : Complex_Vector_Ptr; + when False => null; + end case; + end record; + + function F (A : Rec) return Rec; + +end Loop_Optimization13; -- 2.30.2