re PR target/84565 (ICE in extract_insn, at recog.c:2304 on aarch64)
authorJakub Jelinek <jakub@redhat.com>
Wed, 7 Mar 2018 10:39:32 +0000 (11:39 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 7 Mar 2018 10:39:32 +0000 (11:39 +0100)
PR fortran/84565
* config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.

* gfortran.dg/pr84565.f90: New test.

From-SVN: r258333

gcc/ChangeLog
gcc/config/aarch64/predicates.md
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr84565.f90 [new file with mode: 0644]

index 38d5535b3d291ca8418f11c522cc1cbc00fee953..65fcf238fe10cc04377f8cb2ad7418d21e63c618 100644 (file)
@@ -1,5 +1,9 @@
 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
 
+       PR fortran/84565
+       * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
+       aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
+
        PR c++/84704
        * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
        on tmp_var.
index 804be16a13a78e989b15023259872f2c81e2e037..5d41d4350402b2a9e5941f160c6ab6f933bfff90 100644 (file)
   (and (match_code "reg,subreg,const_int,const_double,const,const_vector")
        (ior (match_operand 0 "register_operand")
            (match_test "op == const0_rtx")
-           (match_operand 0 "aarch64_simd_imm_zero"))))
+           (match_operand 0 "aarch64_simd_or_scalar_imm_zero"))))
 
 (define_predicate "aarch64_simd_struct_operand"
   (and (match_code "mem")
index a2be76bf2dc5502f6c91752f94a045c2aa66de9b..2bf1abbd5b692e008859730faa53147e130322b8 100644 (file)
@@ -1,5 +1,8 @@
 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
 
+       PR fortran/84565
+       * gfortran.dg/pr84565.f90: New test.
+
        PR middle-end/84723
        * gcc.target/i386/pr84723-1.c: New test.
        * gcc.target/i386/pr84723-2.c: New test.
diff --git a/gcc/testsuite/gfortran.dg/pr84565.f90 b/gcc/testsuite/gfortran.dg/pr84565.f90
new file mode 100644 (file)
index 0000000..4c1cdc4
--- /dev/null
@@ -0,0 +1,7 @@
+! PR fortran/84565
+! { dg-do compile { target aarch64*-*-* } }
+! { dg-options "-mlow-precision-sqrt -funsafe-math-optimizations" }
+subroutine mysqrt(a)
+ real(KIND=KIND(0.0D0)) :: a
+ a=sqrt(a)
+end subroutine