http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941

--- Comment #10 from janus at gcc dot gnu.org ---
(In reply to janus from comment #8)
> Backtrace from gdb:
> 
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000000004d19d6 in replace_comp (expr=expr@entry=0x146cc10,
> sym=sym@entry=0x146f7a0, i=i@entry=0x7fffffffdc6c)
>     at /home/jweil/gcc47/branch/gcc/fortran/expr.c:4199
> 4199             && !gfc_is_intrinsic (expr->symtree->n.sym, 0, expr->where)))
> (gdb) bt
> #0  0x00000000004d19d6 in replace_comp (expr=expr@entry=0x146cc10,
> sym=sym@entry=0x146f7a0, i=i@entry=0x7fffffffdc6c)
>     at /home/jweil/gcc47/branch/gcc/fortran/expr.c:4199

Here in replace_comp, the sym is 'get_smatrix', and the problem is that
expr->symtree is NULL.


> #1  0x00000000004d46ba in gfc_traverse_expr (expr=0x146cc10,
> sym=sym@entry=0x146f7a0, 
>     func=func@entry=0x4d19a0 <replace_comp>, f=f@entry=0) at
> /home/jweil/gcc47/branch/gcc/fortran/expr.c:3929
> #2  0x00000000004d6c9c in gfc_expr_replace_comp (expr=<optimized out>,
> dest=dest@entry=0x146f7a0)
>     at /home/jweil/gcc47/branch/gcc/fortran/expr.c:4218
> #3  0x0000000000524615 in resolve_fl_derived0 (sym=sym@entry=0x146e590)
>     at /home/jweil/gcc47/branch/gcc/fortran/resolve.c:11724
> #4  0x000000000052c80d in resolve_fl_derived (sym=sym@entry=0x146e590)
>     at /home/jweil/gcc47/branch/gcc/fortran/resolve.c:12046

In here the sym is '__vtype_beam_structures_Beam_structure_t' (the vtabs and
vtypes are always imported when loading a module).

Reply via email to