From: fengwang Date: Wed, 18 May 2005 09:54:21 +0000 (+0000) Subject: 2005-05-18 Feng Wang X-Git-Tag: upstream/4.9.2~61087 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=41dc7285f828a75a6c0c04b51896880a7e9a54cf;p=platform%2Fupstream%2Flinaro-gcc.git 2005-05-18 Feng Wang PR fortran/20954 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to build character length. 2005-05-18 Feng Wang PR fortran/20954 * gfortran.dg/pr20954.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99892 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6e0a73b..1646743 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2005-05-18 Feng Wang + + PR fortran/20954 + * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to + build character length. + 2005-05-17 Zdenek Dvorak * trans-types.c (gfc_array_range_type): New variable. diff --git a/gcc/fortran/trans-const.c b/gcc/fortran/trans-const.c index 0351e12..57c34d7 100644 --- a/gcc/fortran/trans-const.c +++ b/gcc/fortran/trans-const.c @@ -141,6 +141,8 @@ gfc_conv_const_charlen (gfc_charlen * cl) { cl->backend_decl = gfc_conv_mpz_to_tree (cl->length->value.integer, cl->length->ts.kind); + cl->backend_decl = fold_convert (gfc_charlen_type_node, + cl->backend_decl); } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4a49b01..38f6579 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-05-18 Feng Wang + + PR fortran/20954 + * gfortran.dg/pr20954.f: New test. + 2005-05-17 Mike Stump Yet more Objective-C++... @@ -26,6 +31,7 @@ libiberty.h. * gcc.dg/compat/generate-random_r.c: Likewise. +>>>>>>> 1.5488 2005-05-17 Paolo Bonzini * gcc.dg/fold-div-1.c, gcc.dg/recip-1.c, gcc.dg/recip-2.c: New. diff --git a/gcc/testsuite/gfortran.dg/pr20954.f b/gcc/testsuite/gfortran.dg/pr20954.f new file mode 100644 index 0000000..b19b782 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr20954.f @@ -0,0 +1,11 @@ + ! { dg-do run } + ! { dg-options "-fdefault-integer-8" } + ! Program to test character length type + Program pr20954 + character*16 string (5) + character*5 filename + character*80 line + filename = 'input' + open (2,file=filename) + write (line, '(5a16)') (string(i),i=1,5) + end