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

--- Comment #7 from janus at gcc dot gnu.org ---
Here is another variant, possibly illegal:


module m_vstring
  implicit none

  public :: vstring_length

  character ( len = vstring_length() ) :: char_string

contains

  pure integer function vstring_length ()
  end function

end module


This is rejected by 5.5.0 via:

   character ( len = vstring_length() ) :: char_string
 ^
Error: size of variable ‘char_string’ is too large


While it is rejected by 6, 7, 8 and trunk with the bogus error message:

   10 |   pure integer function vstring_length ()
      |                                      1
Error: MODULE-PROC procedure at (1) is already declared as EXTERNAL-PROC
procedure


The latter error message is certainly bogus because nothing is declared as
EXTERNAL at all.

Reply via email to