https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120270
Sam James <sjames at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |16.0
Summary|[13/14/15/16 Regression] |[13/14/15 Regression] ICE
|ICE with -O1 in |with -O1 in
|expand_debug_locations, at |expand_debug_locations, at
|cfgexpand.cc:5668 |cfgexpand.cc:5668
CC| |sjames at gcc dot gnu.org
--- Comment #4 from Sam James <sjames at gcc dot gnu.org> ---
This works for me on trunk, probably the fix from PR122394.
(Also, note you need -g, just godbolt implicitly adds that.)