[Bug fortran/93948] Surprising option processing of -fdec and -fdec-math in combination with -std
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93948 anlauf at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |FIXED Status|WAITING |RESOLVED Target Milestone|--- |14.0 Known to work||14.0 --- Comment #6 from anlauf at gcc dot gnu.org --- (In reply to Dominique d'Humieres from comment #5) > From the Steve's comments, could this PR closed as WONTFIX? Yes. Note that -fdec-math has been a no-op for quite some time, and the functions that were added under that flag are finally available under -std=f2023 and -std=gnu. The example in comment#0 works as requested with gcc-14. Closing.
[Bug fortran/93948] Surprising option processing of -fdec and -fdec-math in combination with -std
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93948 Dominique d'Humieres changed: What|Removed |Added Last reconfirmed||2020-07-12 Ever confirmed|0 |1 Status|UNCONFIRMED |WAITING --- Comment #5 from Dominique d'Humieres --- >From the Steve's comments, could this PR closed as WONTFIX?
[Bug fortran/93948] Surprising option processing of -fdec and -fdec-math in combination with -std
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93948 Thomas Koenig changed: What|Removed |Added CC||tkoenig at gcc dot gnu.org --- Comment #4 from Thomas Koenig --- Hm, maybe a better thing to do would be just to issue a hard error when combining any of the -dec options with any -std= option.
[Bug fortran/93948] Surprising option processing of -fdec and -fdec-math in combination with -std
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93948 --- Comment #3 from Steve Kargl --- On Thu, Feb 27, 2020 at 09:15:53AM +, thenlich at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93948 > > --- Comment #2 from Thomas Henlich --- > -fall-intrinsics is a nice workaround, but it also enables more than I want. > It's not a workaround given the wording of the Fortran stanard. A processor is allowed to provide additional intrinsic subprograms not specified in the standard. However, if a program uses the nonstandard subprograms that program is nonconforming. With a -std= option, one is requested conformance to the Fortran standard, which leads to a catch 22. When I introduced -fall-intrinsics, it was suggested that we have -fintrinsics=cotan,sind to allow only cotan and sind to be added to the set in Fortran standard. I did not and still do not see how to do this given the number of nonstandard intrinsics. > > Requiring one of -fdec or -fall-intrinsics, if -std is specified. Is redundant > in the first case. As I stated earlier, I think -fdec-math should go away and these routines would be handled just like, for example, etime().
[Bug fortran/93948] Surprising option processing of -fdec and -fdec-math in combination with -std
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93948 --- Comment #2 from Thomas Henlich --- -fall-intrinsics is a nice workaround, but it also enables more than I want. I just find it not intuitive, that -fdec apparently has the same effect as -fall-intrinsics for some intrinsics, but -fdec-math (an option to actually enable some intrinsics) does not. As documented: "-fall-intrinsics This option causes all intrinsic procedures (including the GNU-specific extensions) to be accepted." Just not those which require -fdec or -fdec-math. "-fdec-math Enable legacy math intrinsics such as COTAN and degree-valued trigonometric functions (e.g. TAND, ATAND, etc...) for compatability with older code." Requiring one of -fdec or -fall-intrinsics, if -std is specified. Is redundant in the first case. Any plan for action regarding this option should probably consider the fact that decimal trigonometry functions are on the work list for Fortran 202X, which if passed would leave only COTAN as a non-standard function.
[Bug fortran/93948] Surprising option processing of -fdec and -fdec-math in combination with -std
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. % gfcx -o z -std=f2008 -fall-intrinsics -fdec-math d.f90 % ./z 0. We should probably consider removing -fdec-math option, and handle the degree trig function like any other nonstandard intrinsic subprogram.
[Bug fortran/93948] Surprising option processing of -fdec and -fdec-math in combination with -std
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93948 Thomas Henlich changed: What|Removed |Added Severity|normal |minor