aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2024-09-09 12:27:25 +0200
committerEric Botcazou <ebotcazou@adacore.com>2024-09-09 12:32:10 +0200
commit0171793aca4c0d4e9c8020c539bb4d3abfb91da7 (patch)
tree45acc8bdb4581af169f106fe87476f2d218edb78
parent4645aa79a6dfe39cb58d21ee251bfde59a6b27d4 (diff)
downloadgcc-0171793aca4c0d4e9c8020c539bb4d3abfb91da7.zip
gcc-0171793aca4c0d4e9c8020c539bb4d3abfb91da7.tar.gz
gcc-0171793aca4c0d4e9c8020c539bb4d3abfb91da7.tar.bz2
Silence warning for 32-bit targets
gcc/testsuite PR ada/115250 * gnat.dg/opt58_pkg.ads: Convert to Unix line ending. * gnat.dg/opt58.adb: Likewise and pass -gnatws to the compiler.
-rw-r--r--gcc/testsuite/gnat.dg/opt58.adb38
-rw-r--r--gcc/testsuite/gnat.dg/opt58_pkg.ads38
2 files changed, 38 insertions, 38 deletions
diff --git a/gcc/testsuite/gnat.dg/opt58.adb b/gcc/testsuite/gnat.dg/opt58.adb
index ac39cc0..16326ae 100644
--- a/gcc/testsuite/gnat.dg/opt58.adb
+++ b/gcc/testsuite/gnat.dg/opt58.adb
@@ -1,19 +1,19 @@
--- { dg-do compile }
--- { dg-options "-O" }
-
-with Unchecked_Conversion;
-with System; use System;
-with Opt58_Pkg; use Opt58_Pkg;
-
-procedure Opt58 is
-
- function Convert is new Unchecked_Conversion (Integer, Rec);
-
- Dword : Integer := 0;
- I : Small_Int := F1 (Convert (Dword));
-
-begin
- if F2 (Null_Address, I = 0) then
- null;
- end if;
-end Opt58;
+-- { dg-do compile }
+-- { dg-options "-O -gnatws" }
+
+with Unchecked_Conversion;
+with System; use System;
+with Opt58_Pkg; use Opt58_Pkg;
+
+procedure Opt58 is
+
+ function Convert is new Unchecked_Conversion (Integer, Rec);
+
+ Dword : Integer := 0;
+ I : Small_Int := F1 (Convert (Dword));
+
+begin
+ if F2 (Null_Address, I = 0) then
+ null;
+ end if;
+end Opt58;
diff --git a/gcc/testsuite/gnat.dg/opt58_pkg.ads b/gcc/testsuite/gnat.dg/opt58_pkg.ads
index 9cb7f3a..02a374f 100644
--- a/gcc/testsuite/gnat.dg/opt58_pkg.ads
+++ b/gcc/testsuite/gnat.dg/opt58_pkg.ads
@@ -1,19 +1,19 @@
-with System; use System;
-
-package Opt58_Pkg is
-
- pragma Pure (Opt58_Pkg);
-
- type Small_Int is range 0 .. 255;
-
- type Rec is record
- D1, D2, D3, D4 : Small_Int;
- end record;
- pragma Pack (Rec);
- for Rec'Size use 32;
-
- function F1 (R : Rec) return Small_Int;
-
- function F2 (A : Address; B : Boolean) return Boolean;
-
-end Opt58_Pkg;
+with System; use System;
+
+package Opt58_Pkg is
+
+ pragma Pure (Opt58_Pkg);
+
+ type Small_Int is range 0 .. 255;
+
+ type Rec is record
+ D1, D2, D3, D4 : Small_Int;
+ end record;
+ pragma Pack (Rec);
+ for Rec'Size use 32;
+
+ function F1 (R : Rec) return Small_Int;
+
+ function F2 (A : Address; B : Boolean) return Boolean;
+
+end Opt58_Pkg;