https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117052
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Thiago Macieira from comment #3) > (In reply to Andrew Pinski from comment #2) > > I am 99% sure there is a dup of this bug. > > Yup, that's the same. It didn't show up in the suggested list from bugzilla. Well sometimes it is hard to find the duplicate. I even took some time to find PR69903 in the end (PR 39906 is more about the inner class rather than the static method). And in the case of PR 69903, GCC sometimes ICEs sometimes just accepts the code without any error which does not help finding the duplicated bug. Searching over 17k open bugs is hard for users to do really. Note I do think "Duplicate bug reports, or reports of bugs already fixed in the development tree, especially those that have already been reported as fixed last week :-) " from https://gcc.gnu.org/bugs/#dontwant is a little too strong for most reporters and should be reworded; it was written when at a time when the number of bug reports was much smaller and when there was a lot of duplicated bug reports coming in with recent regressions.