[Bug fortran/70842] [4.9/5/6/7 Regression] internal compiler error with character members within a polymorphic pointer

vehre at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jul 14 08:02:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70842

vehre at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #7 from vehre at gcc dot gnu.org ---
Hi Karl,

(In reply to kargl from comment #5)
> With the patch I posted earlier today and code in comment #1, I see

which patch are you referring to? At least upto now I don't see a patch from
you on the list or in this PR. 

> 
>  gfc7 -c a.f90
> a.f90:14:30:
> 
>          print*, len(me%string)
>                               1
> Error: Data transfer element at (1) cannot be polymorphic unless it
> is processed by a defined input/output procedure
> 
> I don't use CLASS and know little about its expected behavior.
> Is the above even remotely right?

Not at all. That call to len() should map to me%.string giving the length of
the string. (Note the dot in front of string; gfortran internal convention to
store string length).


More information about the Gcc-bugs mailing list