diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2018-02-23 12:35:30 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2018-02-23 12:35:30 +0000 |
commit | c287dea0c4a9319979288995e449c09184528a2f (patch) | |
tree | 20538aa6bca7ab6acae0f29f303b513cdb7ec7b5 /gcc/fortran/trans-expr.c | |
parent | 99b4a565262c5755bf2bebe17ff852abdebb08a9 (diff) | |
download | gcc-c287dea0c4a9319979288995e449c09184528a2f.zip gcc-c287dea0c4a9319979288995e449c09184528a2f.tar.gz gcc-c287dea0c4a9319979288995e449c09184528a2f.tar.bz2 |
re PR fortran/83148 (ICE: crash_signal from toplev.c:325)
2018-02-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83148
* trans-const.c : Clean up some whitespace issues.
* trans-expr.c (gfc_conv_initializer): If an iso_c_binding
derived type has a kind value of zero, set it to the default
integer kind.
2018-02-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83148
* gfortran.dg/class_68.f90: New test.
From-SVN: r257930
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 04e06ef..a93257c 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -6868,6 +6868,8 @@ gfc_conv_initializer (gfc_expr * expr, gfc_typespec * ts, tree type, /* The derived symbol has already been converted to a (void *). Use its kind. */ + if (derived->ts.kind == 0) + derived->ts.kind = gfc_default_integer_kind; expr = gfc_get_int_expr (derived->ts.kind, NULL, 0); expr->ts.f90_type = derived->ts.f90_type; |