https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465
--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Eric Botcazou from comment #12) > > i've bisected things back to r188118. before that commit, gcc compiles > > rtld.c fine and produces a working ldso. starting at that commit, we get > > segfaults. > > But not on the 4.7 branch, right? In any case, we need preprocessed sources. I bet the function f mentioned in the testcase from https://gcc.gnu.org/ml/gcc-patches/2014-08/msg00932.html is enough to reproduce the issue. DT_ADDRTAGIDX (dyn->d_tag) gets preprocessed as (0x6ffffeff - dyn->d_tag). DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM is the same as 34+0+16+3+12.