gcc version is gcc4.7.1
host,build adn target is x86 i586
test case name: weak_0.c
extern void abort(void);
int foo =0 ;
extern int bar __attribute__ ((weak,alias ("foo")));
/* if( &foo != &bar)
if ( &foo != &bar)
when compilating weaK_0.c with fllowing cmmand :
i586-target-linux-gnu-gcc weak_0.c -flto -o weak
expected result: return 0;
actual result: abort();
Confirmed. 4.6.x segfaults for me.
This was fixed for GCC 5.1.0. The problem is the same as PR 32219 really.
(In reply to Andrew Pinski from comment #2)
> This was fixed for GCC 5.1.0. The problem is the same as PR 32219 really.
That is the patch which fixes PR 32219 fixed this one.