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

            Bug ID: 97723
           Summary: type bound ASSIGNMENT(=) within select rank block
                    wrongly rejected
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mscfd at gmx dot net
  Target Milestone: ---

Created attachment 49504
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49504&action=edit
Fortran source code

Using an assignment for a derived-type within a select-rank block is rejected
wrongly:

rank_assign.f90:41:16:

   41 |          s = '0'
      |                1
Error: ‘assign’ at (1) is not a function
rank_assign.f90:43:16:

   43 |          s = '1'
      |                1
Error: ‘assign’ at (1) is not a function
rank_assign.f90:45:16:

   45 |          s = '?'
      |                1
Error: ‘assign’ at (1) is not a function

Using the assignment outside of such a select-rank works fine. Writing "s%c =
..." instead of "s = ..." also works well.

Reply via email to