Commit 91a9632c by Paul Thomas

re PR fortran/37794 (Fortran module overloading regression)

2008-10-11  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/37794
	* module.c (check_for_ambiguous): Remove redundant code.

2008-10-11  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/37794
	* gfortran.dg/used_types_24.f90: New test.

From-SVN: r141057
parent 506a7bc8
2008-10-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/37794
* module.c (check_for_ambiguous): Remove redundant code.
2008-10-09 Daniel Kraft <d@domob.eu> 2008-10-09 Daniel Kraft <d@domob.eu>
PR fortran/35723 PR fortran/35723
......
...@@ -3960,13 +3960,6 @@ check_for_ambiguous (gfc_symbol *st_sym, pointer_info *info) ...@@ -3960,13 +3960,6 @@ check_for_ambiguous (gfc_symbol *st_sym, pointer_info *info)
if (st_sym == rsym) if (st_sym == rsym)
return false; return false;
/* Identical derived types are not ambiguous and will be rolled up
later. */
if (st_sym->attr.flavor == FL_DERIVED
&& rsym->attr.flavor == FL_DERIVED
&& gfc_compare_derived_types (st_sym, rsym))
return false;
/* If the existing symbol is generic from a different module and /* If the existing symbol is generic from a different module and
the new symbol is generic there can be no ambiguity. */ the new symbol is generic there can be no ambiguity. */
if (st_sym->attr.generic if (st_sym->attr.generic
......
2008-10-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/37794
* gfortran.dg/used_types_24.f90: New test.
2008-10-11 Jakub Jelinek <jakub@redhat.com> 2008-10-11 Jakub Jelinek <jakub@redhat.com>
PR target/35760 PR target/35760
......
! { dg-do compile }
! Tests the fix for PR37794 a regression where a bit of redundant code caused an ICE.
!
! Contributed by Jonathan Hogg <J.Hogg@rl.ac.uk>
!
module m1
implicit none
type of01_data_private
real :: foo
end type of01_data_private
type of01_data
type (of01_data_private) :: private
end type of01_data
end module m1
module m2
implicit none
type of01_data_private
integer :: youngest
end type of01_data_private
end module m2
module test_mod
use m1, of01_rdata => of01_data
use m2, of01_idata => of01_data ! { dg-error "not found in module" }
implicit none
end module test_mod
! { dg-final { cleanup-modules "m1 m2 test_mod" } }
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