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
This commit is contained in:
Francois-Xavier Coudert 2006-05-18 04:31:41 +02:00 committed by Feng Wang
parent 3393294636
commit 223f9d5aaa
3 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,11 @@
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

View File

@ -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;
}

View File

@ -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: