PR16867: Fix a long standing DCE bug

Ranjit Mathew rmathew@gmail.com
Thu Aug 12 10:41:00 GMT 2004


Diego Novillo wrote:
[...]
> Bootstrapped and tested x86, x86-64, alpha, ia64 and ppc.  The new test
> case in libjava could use a bit of checking by a java person.  I copied
> it from other files in libjava.lang and it passes.  Is the test OK?
[...]
> + /* 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.

Ranjit.

-- 
Ranjit Mathew          Email: rmathew AT gmail DOT com

Bangalore, INDIA.      Web: http://ranjitmathew.tripod.com/



More information about the Gcc-patches mailing list