https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121301
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Alessandro Vergani from comment #3) > (In reply to Andrew Pinski from comment #2) > > Works for me with the trunk. > > I tested with trunk on compiler explorer and it doesn't even finish the > build (see https://godbolt.org/z/dev7jKf7W), but I'm not sure how recent is > the trunk on compiler explorer Try adding "-fno-checking --param ggc-min-expand=100 --param ggc-min-heapsize=131072 " Basically since the trunk compiler is defaults to checking turned on, the GC params will be low and checking can take extra time.