falk@juist:/tmp% cat test.c #ifdef __cplusplus extern "C" #endif void abort(void); __attribute__((noinline)) unsigned long f(const unsigned long x) { struct { unsigned long x : 1; } s; s.x = x; return s.x; } int main() { if (f(3) != 1) abort(); } falk@juist:/tmp% gcc test.c && ./a.out falk@juist:/tmp% g++ test.c && ./a.out falk@juist:/tmp% g++ -O test.c && ./a.out zsh: abort (core dumped) ./a.out not a problem with 4.0 or earlier
This is a dup of bug 26534. *** This bug has been marked as a duplicate of 26534 ***