[Bug fortran/93948] Surprising option processing of -fdec and -fdec-math in combination with -std
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 26 20:11:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93948
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
--- Comment #1 from kargl at gcc dot gnu.org ---
Thomas, the -std= options will cause gfortran to ignore all
nonstandard intrinsic subprograms. If you want nonstandard
intrinsic subprograms and use -std=f2008, then you need to
use the -fall-intrinsics option. For your example, I see
% gfcx -o z -std=f2008 -fall-intrinsics d.f90
/usr/local/bin/ld: /tmp/cceHxuCs.o: in function `MAIN__':
d.f90:(.text+0x5f): undefined reference to `sind_'
collect2: error: ld returned 1 exit status
% gfcx -o z -std=f2008 -fall-intrinsics -fdec d.f90
% ./z
0.00000000
% gfcx -o z -std=f2008 -fall-intrinsics -fdec-math d.f90
% ./z
0.00000000
We should probably consider removing -fdec-math option,
and handle the degree trig function like any other
nonstandard intrinsic subprogram.
More information about the Gcc-bugs
mailing list