From: Tobias Schlüter Date: Tue, 31 Aug 2004 21:54:24 +0000 (+0200) Subject: re PR fortran/16579 (gfortran: (ICHAR(CHAR(I)) .NE. I) when 128 <= I <= 255) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=149a42dd2de169de9252db751ec1200db50c23aa;p=gcc.git re PR fortran/16579 (gfortran: (ICHAR(CHAR(I)) .NE. I) when 128 <= I <= 255) fortran/ PR fortran/16579 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an unsigned char. testsuite/ PR fortran/16579 * gfortran.fortran-torture/execute/intrinsic_i_char.f90: New test. From-SVN: r86846 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1655908205b..7ec26200b62 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2004-08-31 Tobias Schlueter + + PR fortran/16579 + * trans-types.c (gfc_init_types): Make gfc_character1_type_node an + unsigned char. + 2004-08-31 Tobias Schlueter * CONTRIB, NEWS, README, TODO: Remove obsolete files. diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index 26866b4c016..2400c2e21d5 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -501,7 +501,8 @@ gfc_init_types (void) PUSH_TYPE (name_buf, type); } - gfc_character1_type_node = build_type_variant (signed_char_type_node, 0, 0); + gfc_character1_type_node = build_type_variant (unsigned_char_type_node, + 0, 0); PUSH_TYPE ("char", gfc_character1_type_node); PUSH_TYPE ("byte", unsigned_char_type_node); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 10dd9bf3c1d..a71d3aa1c92 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-08-31 Tobias Schlueter + + PR fortran/16579 + * gfortran.fortran-torture/execute/intrinsic_i_char.f90: New test. + 2004-08-31 Bud Davis PR libfortran/16805 diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_i_char.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_i_char.f90 new file mode 100644 index 00000000000..19cab9f7f89 --- /dev/null +++ b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_i_char.f90 @@ -0,0 +1,6 @@ +! simple test for the CHAR and ICHAR intrinsics +! PR 16579 +DO I=0,255 + IF (ICHAR(CHAR(I)) /= I) CALL ABORT() +END DO +END