re PR c/47809 (ICE in gimplify_expr, at gimplify.c:7291)
authorJakub Jelinek <jakub@redhat.com>
Sat, 19 Feb 2011 20:57:12 +0000 (21:57 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 19 Feb 2011 20:57:12 +0000 (21:57 +0100)
PR c/47809
* c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.

* gcc.target/i386/pr47809.c: New test.

From-SVN: r170323

gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr47809.c [new file with mode: 0644]

index fece41158c1de5e6e610a751b037f74624223164..f89502dfcef08c90c904607d1f7851ead189801a 100644 (file)
@@ -1,3 +1,8 @@
+2011-02-19  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c/47809
+       * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
+
 2011-02-17  Iain Sandoe  <iains@gcc.gnu.org>
 
        * c.opt (fobjc-abi-version=) New.
index 3e460195850424bd7fe4f0813c88c1db6fd9eeb5..d696b5f9d8d2e68d1fe90964f43b65c92151d154 100644 (file)
@@ -1213,6 +1213,7 @@ c_fully_fold_internal (tree expr, bool in_init, bool *maybe_const_operands,
     case FIX_TRUNC_EXPR:
     case FLOAT_EXPR:
     CASE_CONVERT:
+    case VIEW_CONVERT_EXPR:
     case NON_LVALUE_EXPR:
     case NEGATE_EXPR:
     case BIT_NOT_EXPR:
index ccdea7f342f5e595c860dc146fbd96158cc6e95f..0b9dc0c79eb28824c79275dc6297d9796a46854c 100644 (file)
@@ -1,3 +1,8 @@
+2011-02-19  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c/47809
+       * gcc.target/i386/pr47809.c: New test.
+
 2011-02-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>
 
diff --git a/gcc/testsuite/gcc.target/i386/pr47809.c b/gcc/testsuite/gcc.target/i386/pr47809.c
new file mode 100644 (file)
index 0000000..5832a65
--- /dev/null
@@ -0,0 +1,13 @@
+/* PR c/47809 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse2" } */
+
+#include <emmintrin.h>
+double bar (double, double);
+
+__m128d
+foo (__m128d x)
+{
+  x *= (__m128d) { bar (1.0, 1.0), 0.0 };
+  return (__m128d) ((__m128i) x ^ (__m128i) { 0, 0});
+}