From 454144fcc5334d397aac1b626f6192ed9ed8c147 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 7 Mar 2018 11:39:32 +0100 Subject: [PATCH] re PR target/84565 (ICE in extract_insn, at recog.c:2304 on aarch64) 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 | 4 ++++ gcc/config/aarch64/predicates.md | 2 +- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/gfortran.dg/pr84565.f90 | 7 +++++++ 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/pr84565.f90 diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 38d5535b3d2..65fcf238fe1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2018-03-07 Jakub Jelinek + 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. diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md index 804be16a13a..5d41d435040 100644 --- a/gcc/config/aarch64/predicates.md +++ b/gcc/config/aarch64/predicates.md @@ -395,7 +395,7 @@ (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") diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a2be76bf2dc..2bf1abbd5b6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2018-03-07 Jakub Jelinek + 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 index 00000000000..4c1cdc4cee2 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr84565.f90 @@ -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 -- 2.30.2