This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, fortran] PR20373 - intrinsic symbols can be given the wrong type


2007/6/19, Paul Richard Thomas <paul.richard.thomas@gmail.com>:
>Some functions whose return type depends on their respective arguments had
> not set a type at all, i.e. isym->ts.type == BT_UNKNOWN. The functions in
> question are: ALL, ANY, DOT_PRODUCT, AND, OR, XOR, MIN, MAX and SUM
>  (but not e.g. PRODUCT).

OK
>
>To unify this, the "most likely" default types were added to these
> functions as done for other functions, e.g. PRODUCT. Also, instead
> of an unconditional warning for different types, the warning will only
> be shown if -Wsurprinsing/-Wall was specified at the command line.

I am much happier with this.

Paul, thanks for your review :)

In private mail, Janne pointed out that, while better than before,
gfortran now would whine at valid code as "complex, intrinsic :: sum"
(default type set to real). That said, I'm not sure how to proceed as
this patch would replace "no warning" by an overly picky approach. As
enumerating valid cases is out of question, maybe a warning that the
given type is ignored would be sufficient (and correct in all cases)?

Regards
   Daniel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]