aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2011-03-18 09:35:17 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2011-03-18 09:35:17 +0100
commit419e1853a8747c6d344ed6f23cf6bb63299e485b (patch)
tree0bfe806b315f15e8355b6dd3d2cab264dd52adb1 /gcc/testsuite/gcc.c-torture
parent378758560b4267ee5cd338d153ee3b93a7e16c3b (diff)
downloadgcc-419e1853a8747c6d344ed6f23cf6bb63299e485b.zip
gcc-419e1853a8747c6d344ed6f23cf6bb63299e485b.tar.gz
gcc-419e1853a8747c6d344ed6f23cf6bb63299e485b.tar.bz2
re PR bootstrap/48161 (hppa*-*-* will not bootstrap on 4.6 branch with release checking)
PR bootstrap/48161 * expr.c (expand_expr_addr_expr_1): Use simplify_gen_binary instead of gen_rtx_PLUS if EXPAND_SUM or EXPAND_INITIALIZER. * gcc.c-torture/compile/pr48161.c: New test. From-SVN: r171126
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr48161.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr48161.c b/gcc/testsuite/gcc.c-torture/compile/pr48161.c
new file mode 100644
index 0000000..c454efc
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr48161.c
@@ -0,0 +1,24 @@
+/* PR bootstrap/48161 */
+
+struct T { int u; };
+struct G { int l; int t; int r; };
+struct V { struct G v[10]; };
+struct { struct V b; } *h;
+void bar (void);
+
+struct G *
+baz (struct V *x, unsigned y)
+{
+ return &x->v[y];
+}
+
+int
+foo (struct T *x, struct T *y)
+{
+ if ((baz (&h->b, y->u)->t ? baz (&h->b, y->u)->t : 0)
+ - baz (h ? &h->b : 0, x->u)->r
+ - (baz (h ? &h->b : 0, x->u)->t > 0 ? 5 : 0))
+ return 1;
+ bar ();
+ return 0;
+}