Commit 223f9d5a by Francois-Xavier Coudert Committed by Feng Wang

re PR fortran/27552 (-fdump-parse-tree doesn't like Holleriths (but then, who does?))

2006-05-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
            Feng Wang  <fengwang@nudt.edu.cn>

        PR fortran/27552
        * dump-parse-tree.c (gfc_show_expr): Deal with Hollerith constants.
        * data.c (create_character_intializer): Set from_H flag if character is
        initialized by Hollerith constant.


Co-Authored-By: Feng Wang <fengwang@nudt.edu.cn>

From-SVN: r113881
parent 33932946
2006-05-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
Feng Wang <fengwang@nudt.edu.cn>
PR fortran/27552
* dump-parse-tree.c (gfc_show_expr): Deal with Hollerith constants.
* data.c (create_character_intializer): Set from_H flag if character is
initialized by Hollerith constant.
2006-05-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR fortran/26551
......
......@@ -192,6 +192,9 @@ create_character_intializer (gfc_expr * init, gfc_typespec * ts,
if (len < end - start && ref == NULL)
memset (&dest[start + len], ' ', end - (start + len));
if (rvalue->ts.type == BT_HOLLERITH)
init->from_H = 1;
return init;
}
......
......@@ -348,6 +348,16 @@ gfc_show_expr (gfc_expr * p)
break;
case EXPR_CONSTANT:
if (p->from_H || p->ts.type == BT_HOLLERITH)
{
gfc_status ("%dH", p->value.character.length);
c = p->value.character.string;
for (i = 0; i < p->value.character.length; i++, c++)
{
gfc_status_char (*c);
}
break;
}
switch (p->ts.type)
{
case BT_INTEGER:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment