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

--- Comment #3 from Mikael Morin <mikael at gcc dot gnu.org> ---
I'm trying to remove the formal_arg_flag global variables, which seem to just
disable all the checks on dummy arguments.

Unfortunately, it regresses a bit, say pr101026.f for example can be simplified
to this:

      SUBROUTINE PASSB4 (CC,CH)
      DIMENSION CC(IDO,4,L1), CH(IDO,L1,*)
      END

which gives:

pr101026.f:4:19:

    4 |       DIMENSION CC(IDO,4,L1), CH(IDO,L1,*)
      |                   1
Error: Variable ‘ido’ cannot appear in the expression at (1)
pr101026.f:4:33:

    4 |       DIMENSION CC(IDO,4,L1), CH(IDO,L1,*)
      |                                 1
Error: Variable ‘ido’ cannot appear in the expression at (1)
pr101026.f:4:25:

    4 |       DIMENSION CC(IDO,4,L1), CH(IDO,L1,*)
      |                         1
Error: Variable ‘l1’ cannot appear in the expression at (1)
pr101026.f:4:37:

    4 |       DIMENSION CC(IDO,4,L1), CH(IDO,L1,*)
      |                                     1
Error: Variable ‘l1’ cannot appear in the expression at (1)


What I don't see is what makes the IDO and L1 variables acceptable in a
specification expression.  It seems to me the errors above are valid.

Reply via email to