From acac773aaa0434993650c079685a41b78121a619 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 24 Jan 2019 20:14:51 +0100 Subject: [PATCH] re PR tree-optimization/89027 (ICE: verify_gimple failed (Error: non-trivial conversion at assignment)) PR tree-optimization/89027 * tree-inline.c (add_clobbers_to_eh_landing_pad): Don't add clobbers for "omp simd array" variables. * gfortran.dg/gomp/pr89027.f90: New test. From-SVN: r268243 --- gcc/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 9 +++++++-- gcc/testsuite/gfortran.dg/gomp/pr89027.f90 | 22 ++++++++++++++++++++++ gcc/tree-inline.c | 3 ++- 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/gomp/pr89027.f90 diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ca6dfe66577..efb20f77dee 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-01-24 Jakub Jelinek + + PR tree-optimization/89027 + * tree-inline.c (add_clobbers_to_eh_landing_pad): Don't add clobbers + for "omp simd array" variables. + 2019-01-24 Richard Earnshaw PR target/88469 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 158c47137e7..75467a3f84f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,8 +1,13 @@ +2019-01-24 Jakub Jelinek + + PR tree-optimization/89027 + * gfortran.dg/gomp/pr89027.f90: New test. + 2019-01-24 Paul Thomas PR fortran/88929 - * gfortran.dg/ISO_Fortran_binding_3.f90 : New test - * gfortran.dg/ISO_Fortran_binding_3.c : Subsidiary source. + * gfortran.dg/ISO_Fortran_binding_3.f90: New test. + * gfortran.dg/ISO_Fortran_binding_3.c: Subsidiary source. 2019-01-23 H.J. Lu diff --git a/gcc/testsuite/gfortran.dg/gomp/pr89027.f90 b/gcc/testsuite/gfortran.dg/gomp/pr89027.f90 new file mode 100644 index 00000000000..2fa0d23631b --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/pr89027.f90 @@ -0,0 +1,22 @@ +! PR tree-optimization/89027 +! { dg-do compile } +! { dg-additional-options "-O2 -fexceptions -fno-tree-dce" } + +subroutine bar + integer :: a, b + a = 1 + b = 2 + call foo +contains + subroutine foo +!$omp simd linear(a:2) linear(b:1) + do a = 1, 20, 2 + b = b + 1 + end do +!$omp end simd + if (a /= 21 .or. b /= 12) STOP 1 +!$omp task depend(out : a) + a = a + 1 +!$omp end task + end subroutine foo +end subroutine bar diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 29f119ade77..eb5073c5f61 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -2204,7 +2204,8 @@ add_clobbers_to_eh_landing_pad (basic_block bb, copy_body_data *id) && !TREE_THIS_VOLATILE (var) && !DECL_HAS_VALUE_EXPR_P (var) && !is_gimple_reg (var) - && auto_var_in_fn_p (var, id->src_fn)) + && auto_var_in_fn_p (var, id->src_fn) + && !lookup_attribute ("omp simd array", DECL_ATTRIBUTES (var))) { tree *t = id->decl_map->get (var); if (!t) -- 2.30.2