other/3997: gcc generates ..ng references for static aliases (alpha-linux)

Matthias Klose doko@klose.in-berlin.de
Sat Aug 11 00:56:00 GMT 2001


>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:



More information about the Gcc-prs mailing list