Mark by_ref mem_ref in build_receiver_ref as non-trapping
authorTom de Vries <tom@codesourcery.com>
Mon, 23 Nov 2015 08:56:49 +0000 (08:56 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Mon, 23 Nov 2015 08:56:49 +0000 (08:56 +0000)
2015-11-23  Tom de Vries  <tom@codesourcery.com>

* omp-low.c (build_receiver_ref): Mark by_ref mem_ref as non-trapping.

From-SVN: r230738

gcc/ChangeLog
gcc/omp-low.c

index f2c7f5af8fd18c4bbfb231a122dcd1f72631f458..7b0545f33d779f2714cc2fd9922a7f02758a49a7 100644 (file)
@@ -1,3 +1,7 @@
+2015-11-23  Tom de Vries  <tom@codesourcery.com>
+
+       * omp-low.c (build_receiver_ref): Mark by_ref mem_ref as non-trapping.
+
 2015-11-23  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/68445
index b47864eae6e94d6f35689ab568ce41b149334c74..0d4c6e59e8cdeaac63c387863ff144f8e27f60e3 100644 (file)
@@ -1249,7 +1249,10 @@ build_receiver_ref (tree var, bool by_ref, omp_context *ctx)
   TREE_THIS_NOTRAP (x) = 1;
   x = omp_build_component_ref (x, field);
   if (by_ref)
-    x = build_simple_mem_ref (x);
+    {
+      x = build_simple_mem_ref (x);
+      TREE_THIS_NOTRAP (x) = 1;
+    }
 
   return x;
 }