diff gcc/testsuite/gcc.c-torture/execute/pr36093.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 1830386684a0
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/gcc.c-torture/execute/pr36093.c	Fri Oct 27 22:46:09 2017 +0900
@@ -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;
+}