This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Avoid changing shared trees in scan_omp_1_op


Seen with some optimizations disabled for 
libgomp/libgomp.c/appendix-a/a.29.1.c, manifests as ICE in
build_int_cst_wide.

Jakub, anything obvious I'm missing here?  The type of the
integer constant gets replaced by <error_mark_node> and
we get int[0:<<< error >>>][0:<<< error >>>] * in place of
the existing int[0:D.2764][0:D.2758] *.  Do we need
to do the substitution, thus copy_rtx if the type is
remapped?

Thanks,
Richard.

2010-03-15  Richard Guenther  <rguenther@suse.de>

	* omp-low.c (scan_omp_1_op): Do not change shared trees.

Index: omp-low.c
===================================================================
--- omp-low.c	(revision 157457)
+++ omp-low.c	(working copy)
@@ -1932,7 +1932,8 @@ scan_omp_1_op (tree *tp, int *walk_subtr
       else if (!DECL_P (t))
 	{
 	  *walk_subtrees = 1;
-	  if (ctx)
+	  if (ctx
+	      && !tree_node_can_be_shared (t))
 	    TREE_TYPE (t) = remap_type (TREE_TYPE (t), &ctx->cb);
 	}
       break;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]