Could someone have a look at PR32195?
Paul Richard Thomas
paul.richard.thomas@gmail.com
Mon Jun 4 19:04:00 GMT 2007
Salut Dominique,
The ICE is occurring somewhere in this block of code:
bool
get_array_ctor_strlen (stmtblock_t *block, gfc_constructor * c, tree * len)
{
bool is_const;
is_const = TRUE;
for (; c; c = c->next)
{
switch (c->expr->expr_type)
{
case EXPR_CONSTANT:
if (!(*len && INTEGER_CST_P (*len)))
*len = build_int_cstu (gfc_charlen_type_node,
c->expr->value.character.length);
break;
case EXPR_ARRAY:
if (!get_array_ctor_strlen (block, c->expr->value.constructor, len))
is_const = false;
break;
In each testcase, a character array constructor character length is
being converted by a recursive call to this function. Bizarrely, the
fault must be occurring for the case EXPR_CONSTANT.
Put a gfc_warning_now ("#1 %L", &c->expr->where); after the case and
another (#2) before the break to check if that is where the ICE
occurs. Then try printing INTEGER_CST_P (*len) and
c->expr->value.character.length, using %d format in the
gfc_warning_now.
Ciao
Paul
More information about the Fortran
mailing list