Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Thomas Koenig Newsgroups: comp.compilers Subject: Re: what is defined, was for or against equality Date: Thu, 13 Jan 2022 11:17:13 -0000 (UTC) Organization: news.netcologne.de Lines: 20 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-01-051@comp.compilers> References: <17d70d74-1cf1-cc41-6b38-c0b307aeb35a@gkc.org.uk> <22-01-016@comp.compilers> <22-01-018@comp.compilers> <22-01-020@comp.compilers> <22-01-027@comp.compilers> <22-01-032@comp.compilers> <22-01-038@comp.compilers> <22-01-041@comp.compilers> <22-01-044@comp.compilers> <22-01-045@comp.compilers> <22-01-046@comp.compilers> <22-01-048@comp.compilers> Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="8599"; mail-complaints-to="abuse@iecc.com" Keywords: Fortran, debug Posted-Date: 14 Jan 2022 12:39:30 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:2827 Thomas Koenig schrieb: > [I have used Fortran systems that initialized otherwise undefined > data to a value that would trap, to help find use-before-set errors. > -John] That usually is still available, but optional. An short example: $ cat a.f90 program main print *,a end program main $ gfortran -g -ffpe-trap=invalid -finit-real=snan a.f90 $ ./a.out Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation. with a backtrace pointing to the offending line. It does not necessarily work on COMMON blocks, though.