https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80408
Bug ID: 80408
Summary: Problems with SIGNAL, pthread and print together
Product: gcc
Version: 5.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: raphael.monod at wanadoo dot fr
Target Milestone: ---
Created attachment 41186
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41186&action=edit
simple source file illustrating the problem
Hi,
I try to catch floating point exceptions (underflow in my example).
My full code need to be compiled with -lpthread option.
When i add a print (or a write) in the trap function, the print doesn't work if
compilation was done with -lpthread option (even if no thread function is used)
Removing the print restore a normal behavior.
The problem appears with all versions of gfortran I have tested : 4.4, 4.7,
5.1, 5.3, and 6.3
The executable is obtained with following command :
gfortran -ffpe-trap=denormal -lpthread prog.f90
The source file prog.f90 is attached (less than 30 lines)