This is the mail archive of the gcc-bugs@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]

Re: Does weak work on PPC with -O2?


  In case it helps define this problem at all
I have discovered that the only optimization
flag that fixes the problem at -O2 is...

gcc -O2  -fno-rerun-cse-after-loop weak.c

for..

#include <stdio.h>

extern void *foo __attribute__ ((__weak__));

main ()
{
  printf ("foo: %p\n", &foo == NULL ? NULL : foo);
}

                  Jack


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