re PR bootstrap/63821 (ICE in verify_gimple during libgcc build starting with r217349)
authorRichard Biener <rguenther@suse.de>
Wed, 12 Nov 2014 10:13:48 +0000 (10:13 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 12 Nov 2014 10:13:48 +0000 (10:13 +0000)
2014-11-12  Richard Biener  <rguenther@suse.de>

PR middle-end/63821
* match.pd: Add missing conversion to the -(T)-X pattern.

* gfortran.dg/pr63821.f90: New testcase.

From-SVN: r217411

gcc/ChangeLog
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr63821.f90 [new file with mode: 0644]

index 35e1198c591e4fb2b35c3fba4b18cdf44b6f40bb..3184fc9e3e00a5bd0600f38ff08a0cab423d39b1 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-12  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/63821
+       * match.pd: Add missing conversion to the -(T)-X pattern.
+
 2014-11-12  Richard Biener  <rguenther@suse.de>
 
        PR bootstrap/63819
index 29b5ab298724caa9ed1e36390d04c2473fb271be..39abe25f276d5a69b05df84e871e12dc3024ca09 100644 (file)
@@ -299,7 +299,7 @@ along with GCC; see the file COPYING3.  If not see
   (if (tree_nop_conversion_p (type, TREE_TYPE (@1))
        && (TYPE_OVERFLOW_WRAPS (type)
           || (flag_sanitize & SANITIZE_SI_OVERFLOW) == 0))
-   @1))
+   (convert @1)))
 
  /* We can't reassociate floating-point or fixed-point plus or minus
     because of saturation to +-Inf.  */
index 10c4e6f9fafa193f8f1f23db66539070f2d92698..7b284c1053702558883f4b97399709379149ad32 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-12  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/63821
+       * gfortran.dg/pr63821.f90: New testcase.
+
 2014-11-12  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
        PR tree-optimization/63761
diff --git a/gcc/testsuite/gfortran.dg/pr63821.f90 b/gcc/testsuite/gfortran.dg/pr63821.f90
new file mode 100644 (file)
index 0000000..b26f4d7
--- /dev/null
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! { dg-options "-O3" }
+SUBROUTINE calculates_green_opt()
+  INTEGER, PARAMETER :: dp=8
+  REAL(KIND=dp), ALLOCATABLE, DIMENSION(:) :: green, green1
+  ALLOCATE(green(-nrec:nrec),stat=i_all)
+  DO ikern=1,nrec
+     green(-ikern)=gleft+gright
+     IF (ABS(green(ikern)) <= 1.e-20_dp) THEN
+        nrec=ikern
+        EXIT
+     END IF
+  END DO
+  ALLOCATE(green1(-nrec:nrec),stat=i_all)
+  CALL scf_recursion(nrec,green(-nrec),green1(-nrec))
+END SUBROUTINE calculates_green_opt
+