------- Comment #2 from burnus at gcc dot gnu dot org 2010-02-26 07:54 ------- (In reply to comment #1) > This fixes it and regtests. > + if (array->expr_type != EXPR_VARIABLE && array->expr_type != > EXPR_FUNCTION)
The patch looks OK, but actually I fail to see when an EXPR_FUNCTION is valid in this case. If I try: allocate(foo()) contains function foo() integer, allocatable :: foo end function foo end gfortran already bails out with: Error: Allocate-object at (1) is not a nonprocedure pointer or an allocatable variable > OK for trunk with the usual embellishments of ChangeLogs and testcase? Yes, if you have an example for EXPR_FUNCTION - otherwise I would claim that EXPR_VARIABLE is enough. Fortran 2008 has: R631 allocation is allocate-object [ ( allocate-shape-spec-list ) ] [ lbracket allocate-coarray-spec rbracket ] R632 allocate-object is variable-name or structure-component -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43179