https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99072
--- Comment #2 from Boris Kolpackov <boris at kolpackov dot net> --- This has something to do with a different .ii file name the second time we compile the header. Try to make this change to your command lines (notice .so before .ii): # second build of string devvm1702:45>./xg++ [...] -o 99072_a.so.ii 99072_a.H devvm1702:46>./xg++ [...] -c 99072_a.so.ii