https://gcc.gnu.org/bugzilla/show_bug.cgi?id=129214
Bug ID: 129214
Summary: [14/15/16/17 Regression] conversion from signed:1 to
bool removed with VCE too
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Take:
```
int printf(const char *, ...);
struct S { int b : 1; } s = { -1 };
__attribute__((noinline))
int f(void) {
_Bool x = s.b;
unsigned char c = *(unsigned char *)&x;
return c;
}
int main()
{
__builtin_printf("%d\n", f());
return 0;
}
```