https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78041
Bug ID: 78041 Summary: Wrong code on ARMv7 with -mthumb -mfpu=neon-fp16 -O0 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: bernd.edlinger at hotmail dot de Target Milestone: --- This is a slightly modified test case: gcc.c-torture/execute/pr34971.c struct foo { unsigned long long b:40; } x; extern void abort (void); void test1(unsigned long long res) { /* Build a rotate expression on a 40 bit argument. */ if ((x.b<<9) + (x.b>>31) != res) abort (); } int main() { x.b = 0x0100000001; test1(0x0000000202); x.b = 0x0100000000; test1(0x0000000002); return 0; } when compiled with these options it fails: gcc -mcpu=cortex-a9 -mthumb -mfpu=neon-fp16 -O0