From: pault Date: Sat, 11 Oct 2008 12:09:23 +0000 (+0000) Subject: 2008-10-11 Paul Thomas X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6858d16afce480d1a94d75cf74482e1c3a5ecd94;p=thirdparty%2Fgcc.git 2008-10-11 Paul Thomas PR fortran/37794 * module.c (check_for_ambiguous): Remove redundant code. 2008-10-11 Paul Thomas PR fortran/37794 * gfortran.dg/used_types_24.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141057 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index a2ca844018c0..9393dae8a26d 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2008-10-11 Paul Thomas + + PR fortran/37794 + * module.c (check_for_ambiguous): Remove redundant code. + 2008-10-09 Daniel Kraft PR fortran/35723 diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 3846d953e6b1..b9c99fe8f350 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -3960,13 +3960,6 @@ check_for_ambiguous (gfc_symbol *st_sym, pointer_info *info) if (st_sym == rsym) 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 the new symbol is generic there can be no ambiguity. */ if (st_sym->attr.generic diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f7545fccaaef..5a31ae33e194 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-10-11 Paul Thomas + + PR fortran/37794 + * gfortran.dg/used_types_24.f90: New test. + 2008-10-11 Jakub Jelinek PR target/35760 diff --git a/gcc/testsuite/gfortran.dg/used_types_24.f90 b/gcc/testsuite/gfortran.dg/used_types_24.f90 new file mode 100644 index 000000000000..44d2f5ec1992 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/used_types_24.f90 @@ -0,0 +1,33 @@ +! { dg-do compile } +! Tests the fix for PR37794 a regression where a bit of redundant code caused an ICE. +! +! Contributed by Jonathan Hogg +! +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" } }