https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63576
--- Comment #12 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- Martin pointed out that the assertion gets also hit in a pure LTO Firefox build. See PR64686. When I comment out that assertion, Firefox LTO/PGO now builds fine with your patch and the trivial fix from comment 11.