Dominik Sadnik writes:
> Of my opinion the problem seems to be in the "optional"
> argument. If no argument is present, the pointer-status is
> undefined...
> if ( present(real1) ) deallocate(real1)
1. That problem would show up at run-time, not as a compilation error.
2. The code would, in any case, be perfectly standard-conforming as
long as it was always called with the optional argument present.
That would make the optionality seem silly, but silliness isn't
non-standard.
3. The posted code has all the signs of being a minimal extract of a
larger real code, cutting down to the simplest thing that
reproduces the problem. The point is to eliminate unnecessary
complexity. Wouldn't surprise me to find that the real code
had such a test.
4. And as mentioned repeatedly (but apparently not reapeatedly
enough), internal compiler errors are always compiler bugs.
The whole point of my "catch 22" statement (slightly rephrased
by Philip, but it did accurately catch the flavor of something
I said several times) was indeed that there are no exceptions.
--
Richard Maine
[log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|