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

--- Comment #4 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
After a semi-lengthy session I am seeing this just before the segfault.

(gdb) p *expr
$2 = {expr_type = EXPR_OP, ts = {type = BT_CLASS, kind = 0, u = {
      derived = 0x1f24e70, cl = 0x1f24e70, pad = 32657008}, interface = 0x0, 
    is_c_interop = 0, is_iso_c = 0, f90_type = BT_CLASS, deferred = false, 
    interop_kind = 0x0}, rank = 0, shape = 0x0, symtree = 0x0, ref = 0x0, 
  where = {nextc = 0x1eca90c, lb = 0x1eca8c0}, base_expr = 0x0, is_boz = 0, 
  is_snan = 0, error = 0, user_operator = 0, mold = 0, must_finalize = 0, 
  no_bounds_check = 0, external_blas = 0, do_not_resolve_again = 0, 
  do_not_warn = 0, representation = {length = 0, string = 0x0}, value = {
    logical = 27, iokind = 27, integer = {{_mp_alloc = 27, _mp_size = 0, 
        _mp_d = 0x0}}, real = {{_mpfr_prec = 27, _mpfr_sign = 0, 
        _mpfr_exp = 31821088, _mpfr_d = 0x0}}, complex = {{re = {{
            _mpfr_prec = 27, _mpfr_sign = 0, _mpfr_exp = 31821088, 
            _mpfr_d = 0x0}}, im = {{_mpfr_prec = 0, _mpfr_sign = 0, 
            _mpfr_exp = 0, _mpfr_d = 0x0}}}}, op = {
      op = INTRINSIC_PARENTHESES, uop = 0x0, op1 = 0x1e58d20, op2 = 0x0}, 
    function = {actual = 0x1b, name = 0x0, isym = 0x1e58d20, esym = 0x0}, 
    compcall = {actual = 0x1b, name = 0x0, base_object = 0x1e58d20, tbp = 0x0, 
      ignore_pass = 0, assign = 0}, character = {length = 27, string = 0x0}, 
    constructor = 0x1b}, param_list = 0x0}
(gdb) frame
#0  get_dtio_proc (ts=ts@entry=0x1ee8498, code=code@entry=0x1ee8570, 
    dtio_sub=dtio_sub@entry=0x7fffffffcd00)
    at ../../trunk/gcc/fortran/trans-io.c:2246
2246          gfc_add_vptr_component (expr);

One thing that strikes me here is we are trying to get the dtio procedure out
of  I think an EXPR_OP. So I wonder if we need to try to resolve or simplify
this to get the actual class. This is new territory for me. Anyone else have
any input?

Reply via email to