[Bug middle-end/46674] New: Weak alias was mistakenly optimized away
jiez at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 26 12:28:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46674
Summary: Weak alias was mistakenly optimized away
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jiez@gcc.gnu.org
Created attachment 22537
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22537
The test case
This patch
http://gcc.gnu.org/ml/gcc-patches/2010-10/msg02275.html
causes a failure when building glibc for arm-none-linux-gnueabi target. The
reduced test case is attached.
Without this patch, memchr is defined in the assembly:
.size __memchr, .-__memchr
.weak __GI_memchr
.hidden __GI_memchr
.set __GI_memchr,__memchr
.global memchr
.set memchr,__GI_memchr
.ident "GCC: (GNU) 4.6.0 20101026 (experimental)"
but with this patch, memchr is not defined:
.size __memchr, .-__memchr
.weak __GI_memchr
.hidden __GI_memchr
.set __GI_memchr,__memchr
.ident "GCC: (GNU) 4.6.0 20101026 (experimental)"
When compiling the test case, -O is used on the command line.
More information about the Gcc-bugs
mailing list