https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108843
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> --- Reduced test-case where adding -g takes 20x longer to compile: $ typedef uint16_t; typedef uint32_t; typedef uint64_t; (safe_rshift_func_int8_t_s_s)() {} struct S0 { signed f0 : 5 }; union U1 { short f0; }; static int g_2 = 0xE60F951FL; static signed char g_30 = 0x6EL; static signed char g_61 = 0x39L; static unsigned char g_69 = 0xA9L; static signed char g_113 = 7L; static short g_136 = 0; static uint64_t g_138 = 0x3DAD6103D800CEE5LL; static int g_257 = 1L; static struct S0 g_513; static int g_1457 = 0xA3396F68L; static union U1 func_17(int p_19, uint16_t p_20); static uint32_t func_1(void) { int l_332 = 0L; for (g_2; (g_2 <= 29); g_2) { struct S0 l_333 = {2, 9}; union U1 l_1264[7]; int *l_1463 = &g_1457; (*l_1463) ^= func_5(0, (+func_14(func_17(l_332, g_113), g_513)), l_1264[3], l_333.f0); } } static union U1 func_17(int p_19, uint16_t p_20) { p_20 = 1; for (p_20; (p_20 <= 8); p_20 += 1) { union U1 l_346 = {4, 15}; for (g_138 = 0; (g_138 <= 8); g_138 += 1) for (g_61 = 0; (g_61 <= 8); g_61 += 1) for (g_69 = 1; (g_69 <= 8); g_69 += 1) { short *l_347[6][6][6] = { {{&l_346.f0, &g_136, &l_346.f0, 00, &l_346.f0, &l_346.f0}, {&g_136, &l_346.f0, 00, &g_136, 00, &l_346.f0}}}; int l_348 = 0x02A82EBAL; signed char *l_349 = &g_30; g_257 &= (((*l_349) ^= (safe_rshift_func_int8_t_s_s(0, 2))), (-8L)); } } } int main(int argc, char *argv[]) { func_1(); }