aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/warn2.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2007-08-16 10:18:31 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-08-16 10:18:31 +0200
commitf0092c54c8dbbaeb8b34c99591b39415ad7e1442 (patch)
tree328ec01b0d3cd611a34a84e13298f3e5ed708536 /gcc/testsuite/gnat.dg/warn2.adb
parent439cafcf602f14564f086fec1bf832a0c0866d7f (diff)
downloadgcc-f0092c54c8dbbaeb8b34c99591b39415ad7e1442.zip
gcc-f0092c54c8dbbaeb8b34c99591b39415ad7e1442.tar.gz
gcc-f0092c54c8dbbaeb8b34c99591b39415ad7e1442.tar.bz2
Add test cases
From-SVN: r127534
Diffstat (limited to 'gcc/testsuite/gnat.dg/warn2.adb')
-rw-r--r--gcc/testsuite/gnat.dg/warn2.adb14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/warn2.adb b/gcc/testsuite/gnat.dg/warn2.adb
new file mode 100644
index 0000000..8675a52
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/warn2.adb
@@ -0,0 +1,14 @@
+-- { dg-do compile }
+
+with Unchecked_Conversion;
+procedure warn2 is
+ type R1 is record X : Integer; end record;
+ type R2 is record X, Y : Integer; end record;
+ pragma Warnings
+ (Off, "types for unchecked conversion have different sizes");
+ function F is new Unchecked_Conversion (R1, R2);
+ pragma Warnings
+ (On, "types for unchecked conversion have different sizes");
+begin
+ null;
+end warn2;