Intel Fortran Gurus,
I recently encountered an ICE with Intel 2018 when a certain flag (-ftrapuv) is enabled. I've asked our computing center to pass along the reproducer (they have the license, etc., not me), but it got me thinking: do I need that flag?
Due to institutional memory, our current set of flags we set for debugging with Intel is:
-g -O0 -ftz -align all -fno-alias -traceback -debug -nolib-inline -fno-inline-functions -assume protect_parens,minus0 -prec-div -prec-sqrt -check bounds -check uninit -fp-stack-check -ftrapuv -warn unused -init=snan,arrays -traceback -assume realloc_lhs -fPIC -fpe0 -fp-model source -heap-arrays 32 -assume noold_maxminloc -align dcommons
Well, the first part of that is. We sort of concatenate a lot of flags.
My question is with: -ftrapuv -check uninit -init=snan,arrays. From my reading of the ifort man page, I think some imply others (-ftrapuv implies -init=snan, for example), but I wondered if just "-check uninit -init=snan,arrays" does as much as all three? If so, I could safely leave out that flag and I think avoid our ICE.
Thanks for any advice.
PS: I suppose I should also ask: what might I be missing? Anything new in Intel 18 I should be adding? Removing? Note that standards conformance flags are a no-go at present, but I'm trying to use NAG Fortran to make our code comply!
-ftrapuv does nothing useful and I recommend against using it. It does NOT imply -init=snan, despite the confusing description. Once upon a time, that was perhaps what it was supposed to do, but it ended up being something very different. Its major effect is to disable a couple of optimizations and to initialize some REAL values to an "unusual" value - not a NaN. Use -init instead.
That said, an ICE is always a compiler bug and I am sure the Intel folks would appreciate a test case.