diff mbox

[gomp4] Fixacc_on_device xform

Message ID 55D4BEF3.20307@acm.org
State New
Headers show

Commit Message

Nathan Sidwell Aug. 19, 2015, 5:37 p.m. UTC
I've committed this fix for a typo I introduced yesterday (and not testing what 
I thought I was testing).  Sadly passing a gimple_seq to gsi_replace doesn't 
lead to a compile error, but to bad runtime behaviour.

nathan
diff mbox

Patch

2015-08-19  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (oacc_xform_on_device): Fix thinko in previous change.

Index: gcc/omp-low.c
===================================================================
--- gcc/omp-low.c	(revision 226986)
+++ gcc/omp-low.c	(working copy)
@@ -14619,14 +14621,14 @@  oacc_xform_on_device (gimple stmt)
 #endif
   result = fold_convert (integer_type_node, result);
   tree lhs = gimple_call_lhs (stmt);
-  gimple_seq replace = NULL;
+  gimple_seq seq = NULL;
 
   push_gimplify_context (true);
-  gimplify_assign (lhs, result, &replace);
+  gimplify_assign (lhs, result, &seq);
   pop_gimplify_context (NULL);
 
   gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
-  gsi_replace (&gsi, replace, false);
+  gsi_replace_with_seq (&gsi, seq, false);
 }
 
 /* Transform oacc_dim_size and oacc_dim_pos internal function calls to