Does weak work on PPC with -O2?

Jack Howarth howarth@bromo.med.uc.edu
Mon Mar 12 14:12:00 GMT 2001


  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



More information about the Gcc-bugs mailing list