[patch, fortran] PR20373 - intrinsic symbols can be given the wrong type (take 3)
Daniel Franke
franke.daniel@gmail.com
Wed Jun 20 20:52:00 GMT 2007
Following a private discussion with Janne and Paul's comments on the list, I
changed my last proposal slightly:
The warning for _any_ type specified together with an INTRINSIC keyword now
reads:
INTEGER, INTRINSIC :: SIN
1
Warning: Type specified for intrinsic function 'sin' at (1) is ignored
Reasoning:
* comparing with the internally available type may give spurious
warnings (e.g. "complex, intrinsic :: sum"; SUM has default type REAL)
* enumerating allowed types for each intrinsic is not an option
* the specified type IS ignored
* the behaviour is consistent with that of the SUN compiler
The testcase was adjusted accordingly. Further, the patch is now correctly
tabified.
If there are no objections, I will commit after 48 hours.
gcc/fortran:
2007-06-20 Daniel Franke <franke.daniel@gmail.com>
PR fortran/20373
* intrinsic.c (add_functions): Additional function types.
* resolve.c (resolve_symbol): Added type checks to explicitly defined
intrinsics.
gcc/testsuite:
2007-06-20 Daniel Franke <franke.daniel@gmail.com>
PR fortran/20373
* gfortran.dg/intrinsic.f90: New test.
Regards
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr20373.patch
Type: text/x-diff
Size: 6766 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070620/47058da9/attachment.bin>
More information about the Fortran
mailing list