http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48532
Dodji Seketeli <dodji at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2011.04.09 19:11:39 Ever Confirmed|0 |1 --- Comment #1 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-04-09 19:11:39 UTC --- In scan_translation_unit, It seems the call to cpp_get_token_with_location yields a location equals to zero. >From there, bad things happen; basically maybe_print_line is passed a zero location. It looks up a location map for it, and that lookup yields the map that was created for location 1 (for builtins). The file path of that location is "test.c" (hence the "test.c" file on the wrong line) and the source line number is garbage, as that location map was never used to map location 0. I think cpp_get_token_with_location should not have returned a zero location to begin with.