summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-04-08 22:02:43 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2009-04-08 22:02:43 +0200
commitdead0bae538e7d7014947a7898aec6b5596f5e4a (patch)
tree9a4bc57a7bf4665215a2c59e8fd81404632614f4
parentce9ba79be25d021c2d0d25a6dd0ef03a54ae301b (diff)
downloadgcc-dead0bae538e7d7014947a7898aec6b5596f5e4a.tar.gz
trans-types.c (gfc_init_types): Ensure gfc_integer_types doesn't contain TYPE_STRING_FLAG types.
* trans-types.c (gfc_init_types): Ensure gfc_integer_types doesn't contain TYPE_STRING_FLAG types. From-SVN: r145771
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/trans-types.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 890a099afa2..c0f12e61738 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-08 Jakub Jelinek <jakub@redhat.com>
+
+ * trans-types.c (gfc_init_types): Ensure gfc_integer_types doesn't
+ contain TYPE_STRING_FLAG types.
+
2009-04-08 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/39670
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c
index 717859c5360..7cb33634604 100644
--- a/gcc/fortran/trans-types.c
+++ b/gcc/fortran/trans-types.c
@@ -721,6 +721,9 @@ gfc_init_types (void)
for (index = 0; gfc_integer_kinds[index].kind != 0; ++index)
{
type = gfc_build_int_type (&gfc_integer_kinds[index]);
+ /* Ensure integer(kind=1) doesn't have TYPE_STRING_FLAG set. */
+ if (TYPE_STRING_FLAG (type))
+ type = make_signed_type (gfc_integer_kinds[index].bit_size);
gfc_integer_types[index] = type;
snprintf (name_buf, sizeof(name_buf), "integer(kind=%d)",
gfc_integer_kinds[index].kind);