Commit c287dea0 by Paul Thomas

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
parent 99b4a565
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 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/84519
......
......@@ -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;
......
2018-02-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83148
* gfortran.dg/class_68.f90: New test.
2018-02-22 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/59781
......
! { dg-do compile }
!
! Test the fix for PR83148.
!
! Contributed by Neil Carlson <neil.n.carlson@gmail.com>
!
module fhypre
use iso_c_binding, only: c_ptr, c_null_ptr
use iso_c_binding, only: hypre_obj => c_ptr, hypre_null_obj => c_null_ptr
private
public :: hypre_obj, hypre_null_obj
end module
module hypre_hybrid_type
use fhypre
type hypre_hybrid
type(hypre_obj) :: solver = hypre_null_obj
end type hypre_hybrid
end module
use hypre_hybrid_type
class(hypre_hybrid), allocatable :: x
allocate (x)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment