Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.c-torture/execute/pr36093.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
145 | 1 /* { dg-skip-if "small alignment" { pdp11-*-* } } */ |
2 | |
111 | 3 extern void abort (void); |
4 | |
5 typedef struct Bar { | |
6 char c[129]; | |
7 } Bar __attribute__((__aligned__(128))); | |
8 | |
9 typedef struct Foo { | |
10 Bar bar[4]; | |
11 } Foo; | |
12 | |
13 Foo foo[4]; | |
14 | |
15 int main() | |
16 { | |
17 int i, j; | |
18 Foo *foop = &foo[0]; | |
19 | |
20 for (i=0; i < 4; i++) { | |
21 Bar *bar = &foop->bar[i]; | |
22 for (j=0; j < 129; j++) { | |
23 bar->c[j] = 'a' + i; | |
24 } | |
25 } | |
26 | |
27 if (foo[0].bar[3].c[128] != 'd') | |
28 abort (); | |
29 return 0; | |
30 } |