public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [gomp4.1] Fix up gimple_copy for GIMPLE_OMP_ORDERED clauses
@ 2015-10-13  9:32 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2015-10-13  9:32 UTC (permalink / raw)
  To: gcc-patches

Hi!

We forgot to update gimple_copy when clauses were added to
GIMPLE_OMP_ORDERED.  Fixed thusly:

2015-10-13  Jakub Jelinek  <jakub@redhat.com>

	* gimple.c (gimple_copy): Unshare clauses on GIMPLE_OMP_ORDERED.

--- gcc/gimple.c.jj	2015-10-13 09:39:21.000000000 +0200
+++ gcc/gimple.c	2015-10-13 11:25:54.086967126 +0200
@@ -1792,6 +1792,12 @@ gimple_copy (gimple *stmt)
 	  gimple_omp_critical_set_clauses (as_a <gomp_critical *> (copy), t);
 	  goto copy_omp_body;
 
+	case GIMPLE_OMP_ORDERED:
+	  t = unshare_expr (gimple_omp_ordered_clauses
+				(as_a <gomp_ordered *> (stmt)));
+	  gimple_omp_ordered_set_clauses (as_a <gomp_ordered *> (copy), t);
+	  goto copy_omp_body;
+
 	case GIMPLE_OMP_SECTIONS:
 	  t = unshare_expr (gimple_omp_sections_clauses (stmt));
 	  gimple_omp_sections_set_clauses (copy, t);
@@ -1805,7 +1811,6 @@ gimple_copy (gimple *stmt)
 	case GIMPLE_OMP_SECTION:
 	case GIMPLE_OMP_MASTER:
 	case GIMPLE_OMP_TASKGROUP:
-	case GIMPLE_OMP_ORDERED:
 	copy_omp_body:
 	  new_seq = gimple_seq_copy (gimple_omp_body (stmt));
 	  gimple_omp_set_body (copy, new_seq);

	Jakub

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-13  9:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-13  9:32 [gomp4.1] Fix up gimple_copy for GIMPLE_OMP_ORDERED clauses Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).