This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Don't constant fold 1.0/0.0 at compile-time


On Fri, Jul 04, 2003 at 07:42:19AM -0600, Roger Sayle wrote:
> How about just a new lang_hook called static_initializer_p?

I guess that would be ok.  Probably easier than restructuring
fold-const.c such that it can be passed down from some new
fold_static entry point.

Alternately, the "static-ness" could be passed down via a global
variable local to fold-const.c.  That would also avoid restructuring
that file for the nonce.

> Alternatively, I don't
> think its too ugly to use global_bindings_p for this.

No, it's conceptually wrong -- global_bindings_p is talking 
about lexical scope, and we want to be talking about storage
duration.

> My recommendation is that we proceed with my patch, which is a definite
> improvement and fixes the glibc testsuite regressions ...

Um, actually it doesn't, exactly:

libm-test.c:547: internal compiler error: in expand_expr, at expr.c:6832

I meant to get back to you on that, but bbqs intervened.

> Certainly, pow is the innocent victim in all of this.

Agreed.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]