Bug#108036: gcc: gcc generates ..ng references for static aliases
Package: gcc
Version: 1:2.95.3-7
Severity: normal
Architecture: alpha
This file compiles but doesn't link on alpha:
#include <stdlib.h>
void foo(int);
static void bar(int) __attribute__ ((noreturn));
void foo(int k) {
if (k) {
exit(k);
}
}
static void bar(int) __attribute__ ((alias("foo")));
int main(int k) {
if (k < 0) {
bar(1);
}
return k;
}
What happens is that gcc generates a reference to bar..ng but the alias
only exists for bar. The problem goes away when bar is not declared as
static.
I've reproduced this problem with gcc-3.0 as well.
-- System Information
Debian Release: testing/unstable
Kernel Version: Linux gondolin 2.4.7-686-smp #1 SMP Sun Jul 22 14:00:21 EST 2001 i686 unknown
Versions of the packages gcc depends on:
ii cpp 2.95.3-7 The GNU C preprocessor.
ii cpp-2.95 2.95.4-0.01042 The GNU C preprocessor.
ii gcc-2.95 2.95.4-0.01042 The GNU C compiler.
Reply to: