aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/misaligned_nest.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gnat.dg/misaligned_nest.adb')
-rw-r--r--gcc-4.9/gcc/testsuite/gnat.dg/misaligned_nest.adb26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gnat.dg/misaligned_nest.adb b/gcc-4.9/gcc/testsuite/gnat.dg/misaligned_nest.adb
new file mode 100644
index 000000000..3b6fd845d
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gnat.dg/misaligned_nest.adb
@@ -0,0 +1,26 @@
+-- { dg-do run }
+-- { dg-options "-gnatp" }
+
+procedure Misaligned_Nest is
+
+ type Int is record
+ V : Integer;
+ end record;
+
+ type Block is record
+ B : Boolean;
+ I : Int;
+ end record;
+ pragma Pack (Block);
+ for Block'Alignment use 1;
+
+ type Pair is array (1 .. 2) of Block;
+
+ P : Pair;
+begin
+ for K in P'Range loop
+ P(K).I.V := 1;
+ end loop;
+end;
+
+