PR16867: Fix a long standing DCE bug
Bryce McKinlay
mckinlay@redhat.com
Fri Aug 13 17:51:00 GMT 2004
Ranjit Mathew wrote:
>
>>+ /* The SSA-DCE was removing the initialization of the temporary object
>>+ in getFoo because it wasn't realizing that the pointer was needed
>>+ outside of it. */
>>+
>>+ public class PR16867
>>+ {
>>+ public static Object[] getFoo()
>>+ {
>>+ return new Object[] {"OK"};
>>+ }
>>+
>>+ public static void main(String[] args)
>>+ {
>>+ Object[] a = getFoo();
>>+ System.out.println(a[0]);
>>+ }
>>+ }
>>
>>
>
>FWIW, this test is already passing on the mainline
>for me without your patch.
>
>
Even at -O1/-O2? It was still failing for me yesterday. Although
strangely, it did work at -O3.
Regards
Bryce
More information about the Java-patches
mailing list