This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/49479] [4.6/4.7 Regression] reshape / optionals / zero sized arrays


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

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-06-21 09:30:32 UTC ---
Actually, thinking about it: "RESHAPE(allocatable_array, shape)" is *not*
allocatable.

trans-expr.c has:
 147   if (!sym->attr.pointer && !sym->attr.allocatable
 148       && sym->as && sym->as->type == AS_ASSUMED_SHAPE
 149       && (gfc_option.allow_std & GFC_STD_F2008) != 0)

One probably needs to check the actual argument, i.e. gfc_expr_attr(actual)
with allocatable or pointer attribute - or type being C_PTR (including
C_NULL_PTR).

For the latter:
   expr->ts.type == BT_DERIVED && expr->ts.u.derived
&& expr->ts.u.derived->attr.is_iso_c
&& ??? (some check for ISOCBINDING_PTR)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]