https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105924
Bug ID: 105924 Summary: false floating point exception when evaluating exponential function Product: gcc Version: 7.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: yelinhui at hotmail dot com Target Milestone: --- $ gfortran --version GNU Fortran (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. $ cat test.f program test implicit none real*8 :: e e=-4.d2 print *, e, exp(-e*e) end program test $ gfortran -O0 -g -fbacktrace -ffpe-trap=zero,overflow,underflow,invalid,denormal test.f $./a.out Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation. Backtrace for this error: #0 0x1554d03f82ed in ??? #1 0x1554d03f7503 in ??? #2 0x1554cfc8cf0f in ??? #3 0x1554d00c5ea4 in ??? #4 0x1554d004e1fe in ??? #5 0x55b38e68a9d5 in test at /tmp/test.f:7 #6 0x55b38e68aa54 in main at /tmp/test.f:9 Floating point exception (core dumped)