Bug#811707: gcc-6 fails to compile a valid code
control: tags -1 moreinfo
control: tags -1 unreproducible
Hi, the code you posted fails on unstable/experimental with gcc-4.9, gcc-5 and gcc-6
gcc-6 test.c
test.c:1:12: error: size of array '__acc_cta' is negative
extern int __acc_cta[1-2*!((1l << (8*4 -1)) < 0)];
gcc-5 test.c
test.c:1:12: error: size of array '__acc_cta' is negative
extern int __acc_cta[1-2*!((1l << (8*4 -1)) < 0)];
gcc-4.9 test.c
test.c:1:12: error: size of array '__acc_cta' is negative
extern int __acc_cta[1-2*!((1l << (8*4 -1)) < 0)];
not sure what is wrong, but seems not a bug in gcc.
I that expressions evaluates in -1 with int
and it compiles with
"extern int __acc_cta[(unsigned int)1-2*!((1l << (8*4 -1)) < 0)];"
the bug seems to be somewhere else.
cheers,
Gianfranco
Reply to: