Bug 20652

Summary: rejects code with an error: aliased to undefined symbol
Product: gcc Reporter: Serge Belyshev <belyshev>
Component: cAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED INVALID    
Severity: normal CC: gcc-bugs, rth, whatdoineed2do
Priority: P2 Keywords: rejects-valid
Version: 4.0.0   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:

Description Serge Belyshev 2005-03-26 23:58:09 UTC
------------------------------------------------------------------------------
extern int foo;
extern int bar __attribute__ ((alias ("foo")));
------------------------------------------------------------------------------

$ gcc foo.i 
foo.i:2: error: ‘bar’ aliased to undefined symbol ‘foo’
$

this code is taken from glibc/sysdeps/wordsize-64/wcstol_l.c and it was accepted
by gcc 3.4 and earlier.
Comment 1 Andreas Jaeger 2005-03-27 08:16:25 UTC
glibc needs to be changed for this, for details chech the thread starting at:
http://sourceware.org/ml/libc-hacker/2005-03/msg00061.html
Comment 2 Andrew Pinski 2005-08-05 15:27:14 UTC
*** Bug 23245 has been marked as a duplicate of this bug. ***