On Wed, Jul 13, 2011 at 01:37:22PM -0700, Andrew Pinski wrote:
> Hi,
>   The problem here is that the type of the POINTER_PLUS_EXPR is
> incorrect and also the non folded version leaks to the IR.  This patch
> fixes those two problems and fixes the ICE.
> 
> OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

The testcase is wrongly placed and thus fails everywhere.  -fmudflap
causes inclusion of headers and gcc/testsuite/ isn't set up to find them.

Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
committed to trunk and 4.6 as obvious:

2011-07-15  Jakub Jelinek  <ja...@redhat.com>

        PR testsuite/49753
        PR tree-optimization/49309
        * testsuite/libmudflap.c++/pass68-frag.cxx: New test.

        * g++.dg/torture/pr49309.C: Remove.

--- libmudflap/testsuite/libmudflap.c++/pass68-frag.cxx.jj      2011-07-15 
18:34:03.919420272 +0200
+++ libmudflap/testsuite/libmudflap.c++/pass68-frag.cxx 2011-07-15 
18:35:26.377420360 +0200
@@ -0,0 +1,15 @@
+// PR tree-optimization/49309
+// { dg-do compile }
+// { dg-options "-fmudflap" }
+
+struct A
+{
+  int i;
+
+  A();
+  A(const A&);
+};
+
+inline void foo(A a) { a = A(); }
+
+void bar() { foo(A()); }
--- gcc/testsuite/g++.dg/torture/pr49309.C.jj   2011-07-15 18:24:19.759419903 
+0200
+++ gcc/testsuite/g++.dg/torture/pr49309.C      2011-01-16 05:42:39.626675592 
+0100
@@ -1,14 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-fmudflap"  } */
-struct A
-{
-  int i;
-
-  A();
-  A(const A&);
-};
-
-inline void foo(A a) { a = A(); }
-
-void bar() { foo(A()); }
-

        Jakub

Reply via email to