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

            Bug ID: 68108
           Summary: [6.0 regression] erroneous error message 'scalar
                    integer expression expected'
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: juergen.reuter at desy dot de
  Target Milestone: ---

The following code doesn't compile anymore but used to at least until ca.
r227300 of gcc:
module lexers
  implicit none
  private
  type :: template_t
     private
     character(256) :: charset1
     integer :: len1
  end type template_t

contains

  subroutine match_quoted (tt, s, n)
    type(template_t), intent(in) :: tt
    character(*), intent(in) :: s
    integer, intent(out) :: n
    character(tt%len1) :: ch1
    ch1 = tt%charset1
  end subroutine match_quoted

end module lexers
This leads to the error message:
lexers.f90:16:14:
   character(tt%len1) :: ch1
Error: Scalar INTEGER expression expected at (1)

Reply via email to