re PR tree-optimization/89027 (ICE: verify_gimple failed (Error: non-trivial conversi...
authorJakub Jelinek <jakub@gcc.gnu.org>
Thu, 24 Jan 2019 19:14:51 +0000 (20:14 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 24 Jan 2019 19:14:51 +0000 (20:14 +0100)
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
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/gomp/pr89027.f90 [new file with mode: 0644]
gcc/tree-inline.c

index ca6dfe6657795315244664ed359eccb9fc4e267c..efb20f77deec3f976f60274c7d661265c69170cb 100644 (file)
@@ -1,3 +1,9 @@
+2019-01-24  Jakub Jelinek  <jakub@redhat.com>
+
+       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  <rearnsha@arm.com>
 
        PR target/88469
index 158c47137e7db4f253fb6238f8e7ae3e200bc519..75467a3f84fa1cd7e3db2730440243790807fcaa 100644 (file)
@@ -1,8 +1,13 @@
+2019-01-24  Jakub Jelinek  <jakub@redhat.com>
+
+       PR tree-optimization/89027
+       * gfortran.dg/gomp/pr89027.f90: New test.
+
 2019-01-24  Paul Thomas  <pault@gcc.gnu.org>
 
        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  <hongjiu.lu@intel.com>
 
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr89027.f90 b/gcc/testsuite/gfortran.dg/gomp/pr89027.f90
new file mode 100644 (file)
index 0000000..2fa0d23
--- /dev/null
@@ -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
index 29f119ade774a6c8ace921d3256834f66665ad7b..eb5073c5f6124c956e8c0db91162e26d4ace155f 100644 (file)
@@ -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)