diff options
Diffstat (limited to 'gcc/testsuite/gnat.dg/discr22.adb')
-rw-r--r-- | gcc/testsuite/gnat.dg/discr22.adb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/discr22.adb b/gcc/testsuite/gnat.dg/discr22.adb new file mode 100644 index 000000000..af4f9ab78 --- /dev/null +++ b/gcc/testsuite/gnat.dg/discr22.adb @@ -0,0 +1,23 @@ +-- { dg-do compile } +-- { dg-options "-gnatws" } + +procedure Discr22 is + + subtype Precision is Integer range 1 .. 5; + + type Rec(D1 : Precision; D2 : Integer) is record + case D1 is + when 1 => I : Integer; + when others => null; + end case; + end record; + for Rec use record + D1 at 0 range 0 .. 7; + end record; + + P : Precision; + X : Rec(P, 0); + +begin + null; +end; |