This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
other/3997: gcc generates ..ng references for static aliases (alpha-linux)
- To: gcc-gnats at gcc dot gnu dot org, debian-gcc at lists dot debian dot org
- Subject: other/3997: gcc generates ..ng references for static aliases (alpha-linux)
- From: Matthias Klose <doko at klose dot in-berlin dot de>
- Date: Sat, 11 Aug 2001 09:44:14 +0200
- Cc: herbert at gondor dot apana dot org dot au
- Reply-To: 108036-quiet at bugs dot debian dot org
>Number: 3997
>Category: other
>Synopsis: gcc generates ..ng references for static aliases (alpha-linux)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Aug 11 00:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: herbert@gondor.apana.org.au
>Release: 3.0 (Debian GNU/Linux)
>Organization:
The Debian project
>Environment:
System: Debian GNU/Linux (testing/unstable)
Architecture: alpha
host: alpha-linux
build: alpha-linux
target: alpha-linux
>Description:
[ Reported to the Debian BTS as report #108036.
Please CC 108036-quiet@bugs.debian.org on replies.
Log of report can be found at http://bugs.debian.org/108036 ]
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.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: