]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/32935 (internal compiler error: in emit_move_insn, at expr.c:3316)
authorAndrew Pinski <andrew_pinski@playstation.sony.com>
Fri, 3 Aug 2007 23:36:05 +0000 (23:36 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Fri, 3 Aug 2007 23:36:05 +0000 (16:36 -0700)
2007-08-03  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR middle-end/32935
        * fold-convert.c (fold_negate_expr <NOP_EXPR>): Convert back to the
         correct type the negate expression.

2007-08-03  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR middle-end/32935
        * gfortran.fortran-torture/compile/complex_1.f90: New test.

From-SVN: r127190

gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.fortran-torture/compile/complex_1.f90 [new file with mode: 0644]

index 5878f50f2010f4c02ac57f3bf7667b63595e2e20..21f9c3a1e518e0aa95b328325f27e0763aff49d9 100644 (file)
@@ -1,3 +1,9 @@
+2007-08-03  Andrew Pinski  <andrew_pinski@playstation.sony.com>
+
+       PR middle-end/32935
+       * fold-convert.c (fold_negate_expr <NOP_EXPR>): Convert back to the
+        correct type the negate expression.
+
 2007-08-03  Jan Hubicka  <jh@suse.cz>
 
        * i386.c (setup_incoming_varargs_64): Tolerate 64bit preferred
index 614e55a63659ea5b137b3176e5c35520f640d7a0..be46b23e22f15ed71cf3c7c188cfed825c68d0ea 100644 (file)
@@ -1382,7 +1382,7 @@ fold_negate_expr (tree t)
        {
          tem = strip_float_extensions (t);
          if (tem != t && negate_expr_p (tem))
-           return negate_expr (tem);
+           return fold_convert (type, negate_expr (tem));
        }
       break;
 
index ded4044d3d172e82b9e854c1355f19e9a11bf558..7ba9afc60f187ac7e1ef8560779be746c67212af 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-03  Andrew Pinski  <andrew_pinski@playstation.sony.com>
+
+       PR middle-end/32935
+       * gfortran.fortran-torture/compile/complex_1.f90: New test.
+
 2007-08-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
        PR fortran/32955
diff --git a/gcc/testsuite/gfortran.fortran-torture/compile/complex_1.f90 b/gcc/testsuite/gfortran.fortran-torture/compile/complex_1.f90
new file mode 100644 (file)
index 0000000..605ec66
--- /dev/null
@@ -0,0 +1,5 @@
+program test_gfortran2
+ Complex(8) :: g, zh
+ Real(8)    :: g_q
+ g =   zh - zh/cmplx(0.0_8,-g_q)
+end