[tree-ssa] Merge status 2004-05-03
Andrew Haley
aph@redhat.com
Fri May 7 20:37:00 GMT 2004
One of the Java failures is caused by this:
int y = 9;
y = y * (y = 3);
if ( y == 27 ) {
System.out.println("OK2");
}
being transformed into:
y = 9;
y = 3;
y = y * y;
if (y == 27)
{
It seems to me like the gimplify_modify_expr() logic is doing
something unexpected. I thought that the idea was just to do a
depth-first left-to-right search generating single assignment
statements as you go, creating new temporaries on the fly.
I guess the problem may trivially be solved by copying a variable
whenever we see one in an expression. Then, if that variable gets
modified later in the expression, we'll use the right value. But I
guess the problem here is that gimplify_modify_expr() doesn't generate
temporaries for values when they're used in expressions. There's no
need to do that for C...
I'm very reluctant to write a whole new gimplifier for Java, or to
start generating a ton of random temporaries in the Java front end.
Do you have any (polite) suggestions? :-)
Andrew.
More information about the Gcc
mailing list