mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-22 07:00:29 +08:00
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:
parent
3393294636
commit
223f9d5aaa
@ -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
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user