20010904-1.c: New test.
authorJakub Jelinek <jakub@gcc.gnu.org>
Wed, 5 Sep 2001 08:39:33 +0000 (10:39 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 5 Sep 2001 08:39:33 +0000 (10:39 +0200)
* gcc.c-torture/execute/20010904-1.c: New test.
* gcc.c-torture/execute/20010904-2.c: New test.

From-SVN: r45404

gcc/testsuite/gcc.c-torture/execute/20010904-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/20010904-2.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.c-torture/execute/20010904-1.c b/gcc/testsuite/gcc.c-torture/execute/20010904-1.c
new file mode 100644 (file)
index 0000000..92b258b
--- /dev/null
@@ -0,0 +1,11 @@
+typedef struct x { int a; int b; } __attribute__((aligned(32))) X;
+typedef struct y { X x[32]; int c; } Y;
+
+Y y[2];
+
+int main(void)
+{
+  if (((char *)&y[1] - (char *)&y[0]) & 31)
+    abort ();
+  exit (0);
+}                
diff --git a/gcc/testsuite/gcc.c-torture/execute/20010904-2.c b/gcc/testsuite/gcc.c-torture/execute/20010904-2.c
new file mode 100644 (file)
index 0000000..cbe4980
--- /dev/null
@@ -0,0 +1,11 @@
+typedef struct x { int a; int b; } __attribute__((aligned(32))) X;
+typedef struct y { X x; X y[31]; int c; } Y;
+
+Y y[2];
+
+int main(void)
+{
+  if (((char *)&y[1] - (char *)&y[0]) & 31)
+    abort ();
+  exit (0);
+}