This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/11669] New: [3.4 regression] Calling of static functions does not work (build of glibc broken)
- From: "aj at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jul 2003 09:11:25 -0000
- Subject: [Bug other/11669] New: [3.4 regression] Calling of static functions does not work (build of glibc broken)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11669
Summary: [3.4 regression] Calling of static functions does not
work (build of glibc broken)
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: other
AssignedTo: geoffk at gcc dot gnu dot org
ReportedBy: aj at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-linux-gnu
GCC host triplet: i686-linux-gnu
GCC target triplet: i686-linux-gnu
This is a testcase reduced from a failure to compile glibc on i686-linux-gnu
with current GCC:
gromit:~/tmp:[0]$ /opt/gcc/3.4-devel/bin/gcc -c test-failure.c -O2
gromit:~/tmp:[0]$ nm test-failure.o
00000010 T call_fixup
00000000 t fixup
gromit:~/tmp:[0]$ /opt/gcc/3.4-devel/bin/gcc -c test-failure.c -O2 -DUSE_DECLARATION
gromit:~/tmp:[0]$ nm test-failure.o
00000010 T call_fixup
U fixup
00000000 t fixup.0
The fixup.0 declaration is wrong here. I suspect the IMI patches and assigned
it therefore to Geoff Keating.
To reproduce use the simple follwing simple code snippet:
#if USE_DECLARATION
/* Removing the prototype makes this work. */
static int fixup (int i) __attribute__ ((used));
#endif
static int __attribute__ ((__used__))
fixup (int i)
{
return i+1;
}
int
call_fixup (void)
{
asm ("call fixup\n\t");
return 0;
}