https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63310
Bug ID: 63310 Summary: Ada bootstrap error with -fcompare-debug Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org CC: charlet at gcc dot gnu.org, ebotcazou at gcc dot gnu.org My: ../configure --enable-languages=all,ada,obj-c++,lto,go --enable-checking=release; GCC_COMPARE_DEBUG=1 make -j48 bootstrap > LOG 2>&1 && GCC_COMPARE_DEBUG=1 make -j48 -k check > LOGC 2>&1; ../contrib/test_summary > LOGT 2>&1 bootstrap on x86_64 failed with: xgcc: error: a-rttiev.adb: -fcompare-debug failure It seems this is caused by gnat_write_global_declarations, which creates dummy_global decl AND corresponding varpool node for it (the former is not a problem I think, we only require that decls that are created for both -g and -g0 sort by DECL_UIDs the same (i.e. -g can have bigger gaps in the uids than -g0), but for cgraph nodes e.g. node->order is visible in the dumps), and for -g0 used_types_insert doesn't emit anything into types_used_by_cur_var_decl vector, while for -g if there are global vars it sometimes does. I have no idea what is dummy_global good for, but if you need it, it probably has to be created regardless of whether types_used_by_cur_var_decl vector is empty or not.