diff options
author | fengwang <fengwang@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-09 02:27:45 +0000 |
---|---|---|
committer | fengwang <fengwang@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-09 02:27:45 +0000 |
commit | 771007245b47675e0a03730bfc205100883b1da6 (patch) | |
tree | 06ce878d70c9a53f32fa40b3f08dc1bcb7dc3b5a /gcc/fortran/trans.h | |
parent | 9829d9b7fa59510683e747931d989c893f23fe58 (diff) | |
download | gcc-771007245b47675e0a03730bfc205100883b1da6.tar.gz |
fortran ChangeLog entry:
2006-01-09 Feng Wang <fengwang@nudt.edu.cn>
PR fortran/12456
* trans-expr.c (gfc_to_single_character): New function that converts
string to single character if its length is 1.
(gfc_build_compare_string):New function that compare string and handle
single character specially.
(gfc_conv_expr_op): Use gfc_build_compare_string.
(gfc_trans_string_copy): Use gfc_to_single_character.
* trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Use
gfc_build_compare_string.
* trans.h (gfc_build_compare_string): Add prototype.
testsuite ChangeLog entry:
2006-01-09 Feng Wang <fengwang@nudt.edu.cn>
PR fortran/12456
* gfortran.dg/single_char_string.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109489 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans.h')
-rw-r--r-- | gcc/fortran/trans.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index 2d637bd9406..e0b5138d919 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -268,6 +268,9 @@ void gfc_make_safe_expr (gfc_se * se); /* Makes sure se is suitable for passing as a function string parameter. */ void gfc_conv_string_parameter (gfc_se * se); +/* Compare two strings. */ +tree gfc_build_compare_string (tree, tree, tree, tree); + /* Add an item to the end of TREE_LIST. */ tree gfc_chainon_list (tree, tree); |