This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Add testcase for PR rtl-optimization/48381
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 5 May 2011 14:08:31 +0200
- Subject: [committed] Add testcase for PR rtl-optimization/48381
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
This PR has been fixed without testcase being added,
fixed thusly, regtested on x86_64-linux and i686-linux,
committed to trunk.
2011-05-05 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/48381
* gcc.c-torture/compile/pr48381.c: New test.
--- gcc/testsuite/gcc.c-torture/compile/pr48381.c.jj 2011-05-05 12:16:29.000000000 +0200
+++ gcc/testsuite/gcc.c-torture/compile/pr48381.c 2011-05-05 12:15:37.000000000 +0200
@@ -0,0 +1,25 @@
+/* PR rtl-optimization/48381 */
+
+struct S { int s; } t;
+
+int baz (void);
+void fn (int, unsigned, int, unsigned, char);
+
+static char
+foo (signed x, unsigned y)
+{
+ return x < 0 || y >= 32 ? 1 : x >> y;
+}
+
+long long
+bar (long long x, long y)
+{
+ return y < 0 ? 1LL : x - y;
+}
+
+void
+test (int x, unsigned y, unsigned z, char w)
+{
+ unsigned v[2];
+ fn (w || baz (), y, t.s, y, foo (bar (z, w) <= v[0], x));
+}
Jakub