https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109865
--- Comment #4 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Mon, May 15, 2023 at 07:11:17PM +0000, Gary.White at ColoState dot edu wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109865 > (In reply to kargl from comment #2) > > (In reply to gary.wh...@colostate.edu from comment #0) > > > > > Options being used to compile the code: > > > COPTIONS = -cpp -std=f2018 -c -D ieee -D dbleprecision -m64 > > > -fsignaling-nans -ffpe-summary='invalid','zero','overflow','underflow' -O3 > > > -funroll-loops -ffast-math > > > > What happens if you remove -ffast-math and use -O0 or -O1? > > -O0 generates correct code with or without -ffastmath, -O1 does not generate > correct code. I assume you've also tried with -fcheck=all. Your report states you're using og12. If it supports the sanitizer, can you add -fsanitize=undefined to the options?