https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105356
Bug ID: 105356
Summary: Segfault in compiled program caused by premature
ternary clause evaluation
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: n
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104507
Bug ID: 104507
Summary: internal compiler error: unexpected expression
‘(int)(__ret)’ of kind cast_expr
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104507
--- Comment #2 from Daniel Nelson ---
Had a few moments to do some testing/bisecting, and found the commit that fixed
this in mainline.
commit 9927ecbb42d5be48fa933adc26f8601fab5007ca
Author: Patrick Palka
Date: Thu Oct 28 10:05:14 2021 -040
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104507
--- Comment #4 from Daniel Nelson ---
Yeah, that was my thought as well (though I'm 99% unfamiliar with the GCC
codebase).
Some more bisecting reveals that this was introduced with
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95508
ae2ebf011fe