[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

gcc generates ..ng references for static aliases (alpha-linux)



>Submitter-Id:	net
>Originator:	herbert@gondor.apana.org.au
>Organization:	The Debian project
>Confidential:	no
>Synopsis:	gcc generates ..ng references for static aliases (alpha-linux)
>Severity:	non-critical
>Priority:	low
>Category:	other
>Class:		sw-bug
>Release:	3.0 (Debian GNU/Linux)
>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:
	



Reply to: