diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-08-16 10:18:31 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-08-16 10:18:31 +0200 |
commit | f0092c54c8dbbaeb8b34c99591b39415ad7e1442 (patch) | |
tree | 328ec01b0d3cd611a34a84e13298f3e5ed708536 /gcc/testsuite/gnat.dg/warn2.adb | |
parent | 439cafcf602f14564f086fec1bf832a0c0866d7f (diff) | |
download | gcc-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.adb | 14 |
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; |