This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: PR16867: Fix a long standing DCE bug
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: "java-patches at gcc dot gnu dot org" <java-patches at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 12 Aug 2004 15:21:02 +0530
- Subject: Re: PR16867: Fix a long standing DCE bug
- References: <1092291946.7543.37.camel@localhost.localdomain>
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/