From: rguenth Date: Thu, 1 May 2008 11:22:33 +0000 (+0000) Subject: 2008-05-01 Richard Guenther X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f35e7b7cd1eef292feecb0a439477b15c177d04;p=thirdparty%2Fgcc.git 2008-05-01 Richard Guenther PR middle-end/36093 * gcc.c-torture/execute/pr36093.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134851 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index da38b1bedcbe..36ebbf96f3df 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-05-01 Richard Guenther + + PR middle-end/36093 + * gcc.c-torture/execute/pr36093.c: New testcase. + 2008-04-30 Francois-Xavier Coudert * gfortran.dg/selected_char_kind_1.f90: New test. 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 000000000000..9549bc306b96 --- /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; +}