This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49479] [4.6/4.7 Regression] reshape / optionals / zero sized arrays
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 21 Jun 2011 09:30:38 +0000
- Subject: [Bug fortran/49479] [4.6/4.7 Regression] reshape / optionals / zero sized arrays
- Auto-submitted: auto-generated
- References: <bug-49479-4@http.gcc.gnu.org/bugzilla/>
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)