http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55142
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW Component|target |middle-end --- Comment #14 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-01 22:24:20 UTC --- (In reply to comment #13) > Created attachment 28591 [details] > Tentative fix > > This generates (essentially) the same RTL as in non-PIC mode, so the generated > code should be correct if it is correct in non-PIC mode. > > Tested only in LP64 mode though. The patch compiles testcase, but totally miscompiles glibc. I think the bug is in unsigned array index computation as shown in Comment 7. dyn->d_tag is signed type and Pmode != ptr_mode here.