diff options
author | Steven G. Kargl <kargls@comcast.net> | 2005-09-22 22:47:45 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2005-09-22 22:47:45 +0000 |
commit | 821bde0f832740ac9466302792809819ef1217cc (patch) | |
tree | c353a9a0f456d005be74c683767f2e3b8593be1c | |
parent | 312ae8f4020734ba9f827fefb44d1e2f37b092b6 (diff) | |
download | gcc-821bde0f832740ac9466302792809819ef1217cc.zip gcc-821bde0f832740ac9466302792809819ef1217cc.tar.gz gcc-821bde0f832740ac9466302792809819ef1217cc.tar.bz2 |
re PR fortran/24005 (Ambiguous INTERFACE leads to seg fault)
PR fortran/24005
gfortran.dg/interface_1.f90: New test.
From-SVN: r104545
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/interface_1.f90 | 40 |
2 files changed, 45 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ab82adc..3f32377 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-09-22 Steven G. Kargl <kargls@comcast.net> + + PR fortran/24005 + gfortran.dg/interface_1.f90: New test. + 2005-09-22 Erik Edelmann <erik.edelmann@iki.fi> Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de> diff --git a/gcc/testsuite/gfortran.dg/interface_1.f90 b/gcc/testsuite/gfortran.dg/interface_1.f90 new file mode 100644 index 0000000..e2562e1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/interface_1.f90 @@ -0,0 +1,40 @@ +! { dg-do compile } +! This program would segfault without the patch for PR fortran/24005. +module y + ! + ! If private statement is removed, then we get a bunch of errors + ! + private f + ! + ! If we rename 'f' in module y to say 'g', then gfortran correctly + ! identifies ambiguous as being ambiguous. + ! + interface ambiguous + module procedure f + end interface + + contains + + real function f(a) + real a + f = a + end function + +end module y + +module z + + use y + + interface ambiguous + module procedure f ! { dg-error "in generic interface" "" } + end interface + + contains + + real function f(a) + real a + f = a + end function + +end module z |