re PR fortran/16579 (gfortran: (ICHAR(CHAR(I)) .NE. I) when 128 <= I <= 255)
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
Tue, 31 Aug 2004 21:54:24 +0000 (23:54 +0200)
committerTobias Schlüter <tobi@gcc.gnu.org>
Tue, 31 Aug 2004 21:54:24 +0000 (23:54 +0200)
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

gcc/fortran/ChangeLog
gcc/fortran/trans-types.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_i_char.f90 [new file with mode: 0644]

index 1655908205bcf6317ea1d057d81c560b86ba96e8..7ec26200b624c5b86a601d233a7d78f1031ee58d 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+
+       PR fortran/16579
+       * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
+       unsigned char.
+
 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
 
        * CONTRIB, NEWS, README, TODO: Remove obsolete files.
index 26866b4c016e298fe0a07a6ef4533aad7c0407c0..2400c2e21d5d9443f181b6cd62713ccbbd74e0d9 100644 (file)
@@ -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);
index 10dd9bf3c1dd95dec267892b58f523e718a2f872..a71d3aa1c9217a81a87b258b15af9341f23a0a0b 100644 (file)
@@ -1,3 +1,8 @@
+2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+
+       PR fortran/16579
+       * gfortran.fortran-torture/execute/intrinsic_i_char.f90: New test.
+       
 2004-08-31  Bud Davis  <bdavis9659@comcast.net>
 
        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 (file)
index 0000000..19cab9f
--- /dev/null
@@ -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