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/49074] [OOP] Defined assignment w/ CLASS arrays: Incomplete error message


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

--- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-12-12 12:31:55 UTC ---
The failing assert is:

Breakpoint 2, gfc_conv_array_constructor_expr (expr=0x16b8f10,
se=0x7fffffffd580)
    at /home/tob/projects/gcc-git/gcc/gcc/fortran/trans-expr.c:4529

4529      gcc_assert (ss->info->expr == expr
                      && ss->info->type == GFC_SS_CONSTRUCTOR);

We have:

(gdb) p ss->info->expr
$5 = (gfc_expr *) 0x16bdf60
(gdb) p expr
$6 = (gfc_expr *) 0x16b8f10

While expr is indeed an array constructor (EXPR_ARRAY), ss->info->expr is an
EXPR_VARIABLE; both are of the same BT_DERIVED type. The variable is:

  (gdb) p ss->info->expr->symtree->n.sym->name
  $14 = 0x2aaaacf080b8 "foobar"

That is the LHS of the assignment:
  foobar = [bar(1), bar(2)]

For completeness,
  (gdb) p ss->info->type
  $15 = GFC_SS_SECTION

The backtrace is:

#0  gfc_conv_array_constructor_expr (expr=0x16b8f10, se=0x7fffffffd580)
    at gcc/fortran/trans-expr.c:4529
#1  gfc_conv_expr (se=0x7fffffffd580, expr=0x16b8f10)
    at gcc/fortran/trans-expr.c:5193
#2  0x00000000005d28a6 in gfc_conv_expr_reference (se=0x7fffffffd580,
         expr=<optimized out>)
    at gcc/fortran/trans-expr.c:5298
#3  0x00000000005d78d2 in gfc_conv_derived_to_class (class_ts=..., e=0x16b8f10,
         parmse=0x7fffffffd580)
    at gcc/fortran/trans-expr.c:185
#4  gfc_conv_procedure_call (se=0x7fffffffd750, sym=0x16bc5d0, args=0x16bfec0,
         expr=0x16be2b0, append_args=0x0)
    at gcc/fortran/trans-expr.c:3217


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