https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111781
anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gcc dot gnu.org --- Comment #4 from anlauf at gcc dot gnu.org --- (In reply to Mikael Morin from comment #3) > 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. FWIW, NAG and Intel agree with you. With the original pr101026.f I get: NAG: Error: pr101026.f, line 4: IDO is not permitted in a specification expression Error: pr101026.f, line 4: L1 is not permitted in a specification expression Error: pr101026.f, line 4: IDO is not permitted in a specification expression Error: pr101026.f, line 4: L1 is not permitted in a specification expression Intel: pr101026.f(4): error #6219: This variable, used in a specification expression, must be a dummy argument, a COMMON block object, or an object accessible through host or use association. [IDO] DIMENSION CC(IDO,4,L1), CH(IDO,L1,*) -------------------^ pr101026.f(4): error #6219: This variable, used in a specification expression, must be a dummy argument, a COMMON block object, or an object accessible through host or use association. [L1] DIMENSION CC(IDO,4,L1), CH(IDO,L1,*) -------------------------^ Thus I suggest to fix the testcase by one of the options suggested above.