[Bug fortran/33234] Confusing diagnostic when passing intrinsic function as actual argument without INTRINSIC

dominiq at lps dot ens.fr gcc-bugzilla@gcc.gnu.org
Sun Feb 4 14:09:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33234

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|-stf=f* and passing         |Confusing diagnostic when
                   |intrinsic function as       |passing intrinsic function
                   |actual argument without     |as actual argument without
                   |INTRINSIC                   |INTRINSIC

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Since at least gfortran-4.5.4, compiling the following test with -Wall

      subroutine sub (proc, chr)
      external proc
      integer proc
      character*(*) chr
      if (proc (chr) .ne. 6) call abort ()
      end subroutine sub

      implicit none
      integer i
      i = len ("123")
      call sub (len, "abcdef")
      end

gives

      i = len ("123")
             1
Warning: Type specified for intrinsic function 'len' at (1) is ignored

This warning does not point to the actual problem, is confusing, and IMO should
be an error.


More information about the Gcc-bugs mailing list