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: Diego Novillo <dnovillo at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "java-patches at gcc dot gnu dot org" <java-patches at gcc dot gnu dot org>
- Date: Thu, 12 Aug 2004 12:58:56 -0400
- Subject: Re: PR16867: Fix a long standing DCE bug
- Organization: Red Hat Canada
- References: <1092291946.7543.37.camel@localhost.localdomain> <87y8kkpg2q.fsf@fleche.redhat.com>
On Thu, 2004-08-12 at 10:49, Tom Tromey wrote:
> Unless someone is going to fix this immediately, could you file a PR
> for it?
>
There are two places in Java where pure builtins are not being marked as
such. One is in decl.c:java_init_decl_processing, the other is in
builtins.c:initialize_builtins.
The C front end has an attribute machinery that sets the pure attribute
and side-effects for builtins. But Java uses its own thing, and it
doesn't even seems to set TREE_SIDE_EFFECTS correctly. Attribute
handling is pretty inconsistent.
I'm tempted to set DECL_IS_PURE on the whole lot of them, but I don't
think that's always correct (the C front end checks whether we're using
trapping math and what not).
I think I will defer this to a Java person.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17007
I attached the verification patch to the PR.
Thanks. Diego.