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/38813] ICE with C_LOC(array)



------- 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


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