This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Please test and report on other arches
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Please test and report on other arches
- From: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- Date: Mon, 12 Mar 2001 08:49:07 -0800 (PST)
In case folks haven't been reading the thread
'Does weak work on PPC with -O2?' thinking it
didn't impact their arch, could someone from each
arch (other than ppc and ia64) try HJ Lu's test
case for undefined weak symbols? The test is...
# gcc -O2 weak.c
# ./a.out
Segmentation fault (core dumped)
# gcc -O1 weak.c
./a.out
foo: (nil)
for...
--weak.c---
#include <stdio.h>
extern void *foo __attribute__ ((__weak__));
main ()
{
printf ("foo: %p\n", &foo == NULL ? NULL : foo);
}
...on ppc. It happens to pass by accident on ia64.
It would be helpful to have this tested performed
on both gcc 2.95.3 and gcc 3.0 branch if possible
on each arch to verify this problem is indeed
cross-platform as suspected.
This problem arises with the current glibc cvs
http://sources.redhat.com/ml/libc-alpha/2001-03/msg00016.html
http://sources.redhat.com/ml/libc-alpha/2001-03/msg00019.html
http://sources.redhat.com/ml/libc-alpha/2001-03/msg00020.html
and Ulrich insists we get gcc fixed rather than
hack up glibc to work around this broken support
for undefined weak symbols at higher optimization
levels. Thanks in advance for any help from those
on other arches in verifying the extent of this
problem.
Jack Howarth