This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38813] ICE with C_LOC(array)
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jan 2009 16:59:55 -0000
- Subject: [Bug fortran/38813] ICE with C_LOC(array)
- References: <bug-38813-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from burnus at gcc dot gnu dot org 2009-01-12 16:59 -------
For the diagnostics: I think it works, but we are checking in case of
C_LOC(Type%Comp) the symbol Type instead of Comp. Assume that Type is a
pointer and Comp is not then "gfc_is_data_pointer()" returns true for Type%Comp
even though it is not a pointer (Type is a pointer, Type%Comp is the component
of the target to which Type points). But somehow also the is_scalar_expr_ptr
check and the args_sym->attr.dimension check point do something wrong.
For rejects valid: Make "Type" a pointer and Type%Comp an array.
The ICE itself is fixed by the following patch:
--- trans-expr.c (Revision 143289)
+++ trans-expr.c
@@ -2451 +2451 @@ gfc_conv_function_call (gfc_se * se, gfc
- && fsym->as->type != AS_ASSUMED_SHAPE;
+ && fsym->as && fsym->as->type != AS_ASSUMED_SHAPE;
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38813