aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/class.c
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2017-01-03 20:01:30 +0200
committerJanne Blomqvist <jb@gcc.gnu.org>2017-01-03 20:01:30 +0200
commit84aff3c2d4b487fe93f5caa6351c47d56145a6a1 (patch)
tree09d627d26346335c50d501ba2f2e2f39094071bc /gcc/fortran/class.c
parent47f2abdd0d8bc3a760041149a93e35bc5db9d54e (diff)
downloadgcc-84aff3c2d4b487fe93f5caa6351c47d56145a6a1.zip
gcc-84aff3c2d4b487fe93f5caa6351c47d56145a6a1.tar.gz
gcc-84aff3c2d4b487fe93f5caa6351c47d56145a6a1.tar.bz2
PR 78534 Revert r244011
r244011 caused regressions on 32-bit hosts. From-SVN: r244027
Diffstat (limited to 'gcc/fortran/class.c')
-rw-r--r--gcc/fortran/class.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c
index 6149ada..d507e22 100644
--- a/gcc/fortran/class.c
+++ b/gcc/fortran/class.c
@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see
* _vptr: A pointer to the vtable entry (see below) of the dynamic type.
Only for unlimited polymorphic classes:
- * _len: An integer(C_SIZE_T) to store the string length when the unlimited
+ * _len: An integer(4) to store the string length when the unlimited
polymorphic pointer is used to point to a char array. The '_len'
component will be zero when no character array is stored in
'_data'.
@@ -2310,13 +2310,13 @@ gfc_find_derived_vtab (gfc_symbol *derived)
if (!gfc_add_component (vtype, "_size", &c))
goto cleanup;
c->ts.type = BT_INTEGER;
- c->ts.kind = gfc_size_kind;
+ c->ts.kind = 4;
c->attr.access = ACCESS_PRIVATE;
/* Remember the derived type in ts.u.derived,
so that the correct initializer can be set later on
(in gfc_conv_structure). */
c->ts.u.derived = derived;
- c->initializer = gfc_get_int_expr (gfc_size_kind,
+ c->initializer = gfc_get_int_expr (gfc_default_integer_kind,
NULL, 0);
/* Add component _extends. */
@@ -2676,7 +2676,7 @@ find_intrinsic_vtab (gfc_typespec *ts)
if (!gfc_add_component (vtype, "_size", &c))
goto cleanup;
c->ts.type = BT_INTEGER;
- c->ts.kind = gfc_size_kind;
+ c->ts.kind = 4;
c->attr.access = ACCESS_PRIVATE;
/* Build a minimal expression to make use of
@@ -2687,11 +2687,11 @@ find_intrinsic_vtab (gfc_typespec *ts)
e = gfc_get_expr ();
e->ts = *ts;
e->expr_type = EXPR_VARIABLE;
- c->initializer = gfc_get_int_expr (gfc_size_kind,
+ c->initializer = gfc_get_int_expr (gfc_default_integer_kind,
NULL,
ts->type == BT_CHARACTER
? ts->kind
- : gfc_element_size (e));
+ : (int)gfc_element_size (e));
gfc_free_expr (e);
/* Add component _extends. */