aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-05-01 11:22:33 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-05-01 11:22:33 +0000
commit035052e6511187c5fac9fc114b55251cd83f6438 (patch)
tree6f479947e5822f5e0a77c8d2585133699eb96f37 /gcc
parent8665c7ca50061afae221149f0542d9a4f5329e1c (diff)
downloadgcc-035052e6511187c5fac9fc114b55251cd83f6438.zip
gcc-035052e6511187c5fac9fc114b55251cd83f6438.tar.gz
gcc-035052e6511187c5fac9fc114b55251cd83f6438.tar.bz2
re PR middle-end/36093 (__align__ produces incorrect results in certain cases)
2008-05-01 Richard Guenther <rguenther@suse.de> PR middle-end/36093 * gcc.c-torture/execute/pr36093.c: New testcase. From-SVN: r134851
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr36093.c28
2 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index da38b1b..36ebbf9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-01 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/36093
+ * gcc.c-torture/execute/pr36093.c: New testcase.
+
2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* 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 0000000..9549bc3
--- /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;
+}