diff options
Diffstat (limited to 'gcc/testsuite/gnat.dg/discr7.adb')
-rw-r--r-- | gcc/testsuite/gnat.dg/discr7.adb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/discr7.adb b/gcc/testsuite/gnat.dg/discr7.adb new file mode 100644 index 000000000..3bb61cb12 --- /dev/null +++ b/gcc/testsuite/gnat.dg/discr7.adb @@ -0,0 +1,27 @@ +-- { dg-do compile } + +procedure Discr7 is + + subtype Index is Natural range 0..5; + type BitString is array(Index range <>) of Boolean; + pragma Pack(BitString); + + function Id (I : Integer) return Integer is + begin + return I; + end; + + type E(D : Index) is record + C : BitString(1..D); + end record; + + subtype E0 is E(Id(0)); + + function F return E0 is + begin + return E'(D=>0, C=>(1..0=>FALSE)); + end; + +begin + null; +end; |