This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: PR java/17689 [4.0 Regression] New testsuite failures indicatesignal unwinding is broken
Diego Novillo writes:
> On Mon, 2004-09-27 at 10:38, Andrew Haley wrote:
> > It seems like a write to a volatile mem is being deleted. This may
> > not be a real bug, because libgcj is obtaining the mem by doing some
> > blatantly illegal addressing into the stack.
> >
> > I should rework i386-signal.h to access the kernel struct in a legal
> > way. Until then, this patch makes gcj usable again.
> >
> > However, I think the regression is down to this patch:
> >
> Yes, and I think I know why. If we are processing a mix of volatile and
> non-volatile pointers, we'll mess things up because the code just copies
> TREE_THIS_VOLATILE from the type.
>
> I'm sorry for the mess. Odd that it didn't trigger here. *blush*
> If you can't test now, let me know and I'll have it tested later today.
I couldn't get your patch to work, but this did:
Index: tree-ssa-alias.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-alias.c,v
retrieving revision 2.43
diff -c -2 -p -r2.43 tree-ssa-alias.c
*** tree-ssa-alias.c 23 Sep 2004 14:34:19 -0000 2.43
--- tree-ssa-alias.c 27 Sep 2004 16:20:48 -0000
*************** create_memory_tag (tree type, bool is_ty
*** 2029,2032 ****
--- 2029,2035 ----
DECL_CONTEXT (tag) = current_function_decl;
+ /* If the pointed-to type is volatile, so is the tag. */
+ TREE_THIS_VOLATILE (tag) |= TREE_THIS_VOLATILE (type);
+
/* Memory tags are by definition addressable. This also prevents
is_gimple_ref frome confusing memory tags with optimizable
*************** get_tmt_for (tree ptr, struct alias_info
*** 2128,2132 ****
/* If the pointed-to type is volatile, so is the tag. */
! TREE_THIS_VOLATILE (tag) = TREE_THIS_VOLATILE (tag_type);
/* Make sure that the type tag has the same alias set as the
--- 2131,2136 ----
/* If the pointed-to type is volatile, so is the tag. */
! if (TREE_THIS_VOLATILE (tag_type))
! TREE_THIS_VOLATILE (tag) = 1;
/* Make sure that the type tag has the same alias set as the
???
Andrew.