This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix execute/pure-1.c
> From: Richard Henderson <rth@redhat.com>
>
> On Sun, Jun 02, 2002 at 03:43:23PM -0400, Kaveh R. Ghazi wrote:
> > Thanks very much, I do see improvement at -O1/-O2. However I'm still
> > getting failures at -O3 (or -O -finline-functions) on solaris2.7 as
> > are you on alpha. :-)
>
> Indeed, I hadn't noticed when I ran the test by hand.
>
> The answer is quite simple -- all of the test functions have been
> deferred, and so havn't been examined at the time we compile main.
I don't understand. Why are they deferred, and why does this only
affect us at -O3 + noinline attribute?
>
> The following loosens the test in mark_constant_function a bit,
> which will help regular applications a tad. It also allows us to
> modify the test case such that it can pass at -O3, but will then
> fail when testing with -fpic.
But what about platforms that are always pic, like mips-irix6? The
testcase would fail there by default (and in fact it does.)
I think we're better off if we make everything static again and remove
the noinline attribute so it passes at all opt levels on all platforms.
> I'm tempted to say we should move the definition of __pic__ and
> __PIC__ from scattered OS configury and make it a permanent GCC
> feature. This would allow us to check for this in test cases.
> r~
Agreed, that'll fix PR6123.
--Kaveh
--
Kaveh R. Ghazi Director of Systems Architecture
ghazi@caip.rutgers.edu Qwest Solutions