https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96756
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Don't put volatile on __read_neon_cumulative_sat because it does NOT mean what you think it means. It means __read_neon_cumulative_sat is noreturn. Also this is expected really as GCC does NOT model vqadd_u32/fpsr. Maybe the following is better: static int __read_neon_cumulative_sat (uint32x2_t t) { _ARM_FPSCR _afpscr_for_qc; asm volatile ("mrs %0,fpsr" : "=r" (_afpscr_for_qc) : "v"(t)); return _afpscr_for_qc.b.QC; } res = vqadd_u32 (op0, op1); if (__read_neon_cumulative_sat (res) != 1) abort ();