Commit 54381af7 by Janus Weil

re PR fortran/48706 (Type extension inside subroutine)

2011-05-20  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/48706
	* module.c (write_dt_extensions): Do not write extended types which
	are local to a subroutine.

2011-05-20  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/48706
	* gfortran.dg/extends_12.f03: New.

From-SVN: r173966
parent 94df301f
2011-05-20 Janus Weil <janus@gcc.gnu.org>
PR fortran/48706
* module.c (write_dt_extensions): Do not write extended types which
are local to a subroutine.
2011-05-20 Joseph Myers <joseph@codesourcery.com> 2011-05-20 Joseph Myers <joseph@codesourcery.com>
* Make-lang.in (GFORTRAN_D_OBJS): Remove version.o and intl.o. * Make-lang.in (GFORTRAN_D_OBJS): Remove version.o and intl.o.
...@@ -20,6 +26,12 @@ ...@@ -20,6 +26,12 @@
copy for scalar coarrays. copy for scalar coarrays.
* trans-array.c (gfc_conv_array_ref): Ditto. * trans-array.c (gfc_conv_array_ref): Ditto.
2011-05-18 Janus Weil <janus@gcc.gnu.org>
PR fortran/48700
* trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): Deallocate 'TO'
argument to avoid memory leaks.
2011-05-16 Tobias Burnus <burnus@net-b.de> 2011-05-16 Tobias Burnus <burnus@net-b.de>
* gfortran.texi (_gfortran_set_options): Add GFC_STD_F2008_TR. * gfortran.texi (_gfortran_set_options): Add GFC_STD_F2008_TR.
......
...@@ -4817,6 +4817,9 @@ write_dt_extensions (gfc_symtree *st) ...@@ -4817,6 +4817,9 @@ write_dt_extensions (gfc_symtree *st)
{ {
if (!gfc_check_symbol_access (st->n.sym)) if (!gfc_check_symbol_access (st->n.sym))
return; return;
if (!(st->n.sym->ns && st->n.sym->ns->proc_name
&& st->n.sym->ns->proc_name->attr.flavor == FL_MODULE))
return;
mio_lparen (); mio_lparen ();
mio_pool_string (&st->n.sym->name); mio_pool_string (&st->n.sym->name);
......
2011-05-20 Janus Weil <janus@gcc.gnu.org>
PR fortran/48706
* gfortran.dg/extends_12.f03: New.
2011-05-20 Jason Merrill <jason@redhat.com> 2011-05-20 Jason Merrill <jason@redhat.com>
* g++.dg/template/koenig9.C: New. * g++.dg/template/koenig9.C: New.
...@@ -53,6 +58,11 @@ ...@@ -53,6 +58,11 @@
* gcc.c-torture/execute/960321-1.x: Remove. * gcc.c-torture/execute/960321-1.x: Remove.
2011-05-18 Janus Weil <janus@gcc.gnu.org>
PR fortran/48700
* gfortran.dg/move_alloc_4.f90: New.
2011-05-18 H.J. Lu <hongjiu.lu@intel.com> 2011-05-18 H.J. Lu <hongjiu.lu@intel.com>
PR target/49002 PR target/49002
......
! { dg-do compile }
!
! PR 48706: Type extension inside subroutine
!
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
module mod_diff_01
implicit none
type :: foo
end type
contains
subroutine create_ext
type, extends(foo) :: foo_e
end type
end subroutine
end module
program diff_01
use mod_diff_01
implicit none
call create_ext()
end program
! { dg-final { cleanup-modules "mod_diff_01" } }
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