A regresion with __attribute__ ((alias ("foo+X))) breaks newlib builds. The testcase is distilled from newlib-1.13.0/newlib/libc/ctype/ctype_.c:
--cut here-- static const char _foo_b[4] = { 'a', 'b', 'c', 'd' }; extern const char _foo_[4] __attribute__ ((alias ("_foo_b+2"))); --cut here-- gcc-3.4: > ~/gcc-build-34/gcc/cc1 x.c test > more x.s .file "x.c" .section .rodata .type _foo_b, @object .size _foo_b, 4 _foo_b: .byte 97 .byte 98 .byte 99 .byte 100 .globl _foo_ .set _foo_,_foo_b+2 .section .note.GNU-stack,"",@progbits .ident "GCC: (GNU) 3.4.5 20051110 (prerelease)" gcc-4.x: ~/gcc-build/gcc/cc1 x.c x.c:5: error: '_foo_' aliased to undefined symbol '_foo_b+2' -- Summary: [4.0/4.1/4.2 Regression]: Handling of __attribute__ ((alias ("foo+X"))) Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: regression AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: uros at kss-loka dot si http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25531