diff options
author | fengwang <fengwang@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-18 02:31:41 +0000 |
---|---|---|
committer | fengwang <fengwang@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-18 02:31:41 +0000 |
commit | 0170f1079f8ff109f4668e9ef1cc98983482ca02 (patch) | |
tree | aa749d565f452628d5a0b0d52362885f3184dc88 /gcc/fortran | |
parent | 124c02016c90c9794e7e786c22afaf224e867e26 (diff) | |
download | gcc-0170f1079f8ff109f4668e9ef1cc98983482ca02.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113881 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/fortran/data.c | 3 | ||||
-rw-r--r-- | gcc/fortran/dump-parse-tree.c | 10 |
3 files changed, 21 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1f30fd46a94..1b62f79d09c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -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 diff --git a/gcc/fortran/data.c b/gcc/fortran/data.c index fdb98569c7a..8fb8b5d0829 100644 --- a/gcc/fortran/data.c +++ b/gcc/fortran/data.c @@ -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; } diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c index adec12f4c36..cd909800d4f 100644 --- a/gcc/fortran/dump-parse-tree.c +++ b/gcc/fortran/dump-parse-tree.c @@ -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: |