diff options
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 000000000..8675a524f --- /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; |