+2013-12-14 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/59450
+ * module.c (mio_expr): Handle type-bound function expressions.
+
2013-12-12 Tobias Burnus <burnus@net-b.de>
PR fortran/59440
{
e->value.function.name
= mio_allocated_string (e->value.function.name);
- flag = e->value.function.esym != NULL;
- mio_integer (&flag);
- if (flag)
- mio_symbol_ref (&e->value.function.esym);
+ if (e->value.function.esym)
+ flag = 1;
+ else if (e->ref)
+ flag = 2;
else
- write_atom (ATOM_STRING, e->value.function.isym->name);
+ flag = 0;
+ mio_integer (&flag);
+ switch (flag)
+ {
+ case 1:
+ mio_symbol_ref (&e->value.function.esym);
+ break;
+ case 2:
+ mio_ref_list (&e->ref);
+ break;
+ default:
+ write_atom (ATOM_STRING, e->value.function.isym->name);
+ }
}
else
{
free (atom_string);
mio_integer (&flag);
- if (flag)
- mio_symbol_ref (&e->value.function.esym);
- else
+ switch (flag)
{
+ case 1:
+ mio_symbol_ref (&e->value.function.esym);
+ break;
+ case 2:
+ mio_ref_list (&e->ref);
+ break;
+ default:
require_atom (ATOM_STRING);
e->value.function.isym = gfc_find_function (atom_string);
free (atom_string);
+2013-12-14 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/59450
+ * gfortran.dg/typebound_proc_31.f90: New.
+
2013-12-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* g++.dg/cilk-plus/cilk-plus.exp: Properly set ld_library_path.
--- /dev/null
+! { dg-do compile }
+!
+! PR 59450: [OOP] ICE for type-bound-procedure expression in module procedure interface
+!
+! Contributed by <bugs@miller-mohr.de>
+
+module classes
+
+ implicit none
+
+ type :: base_class
+ contains
+ procedure, nopass :: get_num
+ end type
+
+contains
+
+ pure integer function get_num()
+ end function
+
+ function get_array( this ) result(array)
+ class(base_class), intent(in) :: this
+ integer, dimension( this%get_num() ) :: array
+ end function
+
+end module
+
+! { dg-final { cleanup-modules "classes" } }