Seems that 'reallocator' field is not set to NULL in lex.c:linemap_init. Later on in the code this field can be initialized with xrealloc only if it was NULL. Since it is a pointer to a function, using it it leads to unexpected behaviour (e.g. SIGILL or SIGTRAP).
Doing a quick grep in the source code, shows that toplev.c does initialize this field, so I guess this problem is not visible in normal gcc usage. Initializing the field in the function fixes the problem. (Note: since I did not find any libcpp component, I filled the bug under preprocessor cathegory) -- Summary: linemap_init in lex.c does not initialize reallocator Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: roger dot ferrer at bsc dot es http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39512