summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/pr36093.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/pr36093.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr36093.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr36093.c b/gcc/testsuite/gcc.c-torture/execute/pr36093.c
new file mode 100644
index 000000000..9549bc306
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr36093.c
@@ -0,0 +1,28 @@
+extern void abort (void);
+
+typedef struct Bar {
+ char c[129];
+} Bar __attribute__((__aligned__(128)));
+
+typedef struct Foo {
+ Bar bar[4];
+} Foo;
+
+Foo foo[4];
+
+int main()
+{
+ int i, j;
+ Foo *foop = &foo[0];
+
+ for (i=0; i < 4; i++) {
+ Bar *bar = &foop->bar[i];
+ for (j=0; j < 129; j++) {
+ bar->c[j] = 'a' + i;
+ }
+ }
+
+ if (foo[0].bar[3].c[128] != 'd')
+ abort ();
+ return 0;
+}