On 12/26/2017 7:02 PM, Neil Carlson wrote:
> In fact it works with gfortran 8.0.0 too! (What doesn't work with
> gfortran is if subroutine SUB is in a separate source file -- you get
> an internal compiler error. The developer wants to dismiss the issue
> as being due to invalid code.)
>
> Is that code valid, or am I out to lunch on this one?
The specification expression is legal for the reasons you state. But
even if it weren't, an internal compiler error is ALWAYS a compiler bug,
even in the presence of invalid code. It is true that ncells needs to be
assigned a value before the function is called for the program to be
valid, but that's beside the point.
Steve
|