diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gnat.dg/specs/pack3.ads | |
download | cbb-gcc-4.6.4-upstream.tar.bz2 cbb-gcc-4.6.4-upstream.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gnat.dg/specs/pack3.ads')
-rw-r--r-- | gcc/testsuite/gnat.dg/specs/pack3.ads | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/specs/pack3.ads b/gcc/testsuite/gnat.dg/specs/pack3.ads new file mode 100644 index 000000000..ba2b34683 --- /dev/null +++ b/gcc/testsuite/gnat.dg/specs/pack3.ads @@ -0,0 +1,45 @@ +-- { dg-do compile } + +with Pack3_Pkg; + +package Pack3 is + + subtype N_TYPE is INTEGER range 0..5; + + type LIST_ARRAY is array (N_TYPE range <>) of INTEGER; + + type LIST (N : N_TYPE := 0) is record + LIST : LIST_ARRAY(1..N); + end record; + pragma PACK(LIST); + + subtype CS is STRING(1..Pack3_Pkg.F); + + type CSA is array (NATURAL range <>) of CS; + + type REC is record + I1, I2 : INTEGER; + end record ; + + type CMD is (CO, AS); + + type CMD_BLOCK_TYPE (D : CMD := CO) is record + N : CSA (1..4); + case D is + when CO => L : LIST; + when AS => R : REC; + end case ; + end record; + pragma PACK(CMD_BLOCK_TYPE); + + type CMD_TYPE is (RIGHT, WRONG); + + type CMD_RESULT (D : CMD_TYPE) is record + case D is + when RIGHT => C : CMD_BLOCK_TYPE; + when WRONG => null; + end case; + end record ; + pragma PACK(CMD_RESULT); + +end Pack3; |