[Bug c++/80129] wrong code with ternary struct assignment to const
trippels at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 21 11:13:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80129
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-03-21
CC| |trippels at gcc dot gnu.org
Ever confirmed|0 |1
Known to fail| |5.4.0, 6.3.0, 7.0
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
struct pair {
bool first;
int second;
};
int main() {
bool b = false;
const pair x = b ? pair{true, 1} : pair{false, 0};
if (x.first)
__builtin_abort();
}
More information about the Gcc-bugs
mailing list