http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
Rainer Orth <ro at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2010.10.21 20:36:21 Ever Confirmed|0 |1 --- Comment #3 from Rainer Orth <ro at gcc dot gnu.org> 2010-10-21 20:36:21 UTC --- I could reproduce the bug with the attached testcase (go.c with main, pr46114.c reduced from g++spec.c). Compile with % gcc -O2 -o go go.c pr46114.c After the culprit patch, the program prints opt_index = 902 arg = 8049253 value = 1 lang_mask = 65536 decoded = 1 opt_index = 902 arg = 8049264 value = 1 lang_mask = 65536 decoded = 804a90c opt_index = 1019 arg = 0 value = 1 lang_mask = 65536 decoded = 804a938 i.e. decoded (a pointer) is invalid. Before, one gets opt_index = 902 arg = 8049273 value = 1 lang_mask = 65536 decoded = 804a900 opt_index = 902 arg = 8049284 value = 1 lang_mask = 65536 decoded = 804a92c opt_index = 1019 arg = 0 value = 1 lang_mask = 65536 decoded = 804a958 The bug is extremely sensitive to the details of the input, so I didn't try to reduce it further. Please fix, this is really ugly and makes gcc with gld completely useless.