extern const char f[];
const char f[] = "";
char g(void) { return f[0]; }
In 4.0, we put f in .sdata; as of 20050510 we put it in .rodata but are still
emitting a gprel relocation. The problem is that by the time we
assemble_variable
on f, the type of f has been reset to the indeterminate array.
jsm28 sez this is related to PR21342, and that a similar fix may be needed
around
complete_array_type.
--
Summary: small data relocation mismatch
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: rth at gcc dot gnu dot org
ReportedBy: rth at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: ia64-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21502