PR16867: Fix a long standing DCE bug
Diego Novillo
dnovillo@redhat.com
Fri Aug 13 16:55:00 GMT 2004
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.
More information about the Java-patches
mailing list