------- Comment #9 from burnus at gcc dot gnu dot org  2010-04-01 12:36 -------
(In reply to comment #7)
> (In reply to comment #6)
> > What is invaild about the code is that t1%p1() and t2%p2() are not
> > initialization expressions.  Everthing works fine, when the tables are
> > allocatable.
> 
> That was the origin of my question about the validity of the code.

What you have is called an "automatic (explicit) array", which does not need to
have initialization expressions for bounds but just specification expressions:

5.3.8.2 Explicit-shape array
R516   explicit-shape-spec   is   [ lower-bound : ] upper-bound
R517   lower-bound  is  specification-expr
R518   upper-bound  is  specification-expr
C531 (R516) An explicit-shape-spec whose bounds are not constant expressions
shall appear only in a subprogram, derived type denition, BLOCK construct, or
interface body.

7.1.11 Specification expression
[...]
A function is a specification function if it is a pure function, is not a
standard intrinsic function, is not an internal function, is not a statement
function, and does not have a dummy procedure argument.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43591

Reply via email to