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/40847] [4.3/4.4/4.5 Regression] segfault & bogus warning



------- Comment #2 from burnus at gcc dot gnu dot org  2009-07-27 10:08 -------
The following looks wrong:

gfc_resolve_transfer (gfc_expr *f, gfc_expr *source ATTRIBUTE_UNUSED,
                      gfc_expr *mold, gfc_expr *size)
[...]
  if (mold->ts.type == BT_CHARACTER && !mold->ts.cl->length
        && !(mold->expr_type == EXPR_VARIABLE
             && mold->symtree->n.sym->attr.dummy))
    mold->ts.cl->length = gfc_int_expr (mold->value.character.length);

For the testcase:
  mold->ts.type == BT_CHARACTER
  mold->ts.cl->length == NULL
  mold->expr_type == EXPR_VARIABLE
  mold->symtree == NULL  (!)
and
  mold->value.character.length == 19532032


-- 


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


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