diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-30 15:54:49 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-30 15:54:49 +0000 |
commit | 6b01051117632f5e884b1aaaceea100223f09890 (patch) | |
tree | 5ab8cab34416bd160510840ff567d9b1f98986c0 | |
parent | 822dd80c021351dbde6628f1a9d92f94da4a2f77 (diff) | |
download | gcc-6b01051117632f5e884b1aaaceea100223f09890.tar.gz |
2011-04-30 Tobias Burnus <burnus@net-b.de>
PR fortran/48800
* decl.c (gfc_match_import): Don't try to find the
symbol if already found.
2011-04-30 Tobias Burnus <burnus@net-b.de>
PR fortran/48800
* gfortran.dg/interface_37.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173219 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/decl.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/interface_37.f90 | 31 |
4 files changed, 43 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index e5b8d31e8b4..07d73768154 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2011-04-30 Tobias Burnus <burnus@net-b.de> + + PR fortran/48800 + * decl.c (gfc_match_import): Don't try to find the + symbol if already found. + 2011-04-30 Paul Thomas <pault@gcc.gnu.org> PR fortran/48746 diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 9901fb16a73..dfbca29a479 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -2995,7 +2995,7 @@ gfc_match_import (void) gfc_error ("Type name '%s' at %C is ambiguous", name); return MATCH_ERROR; } - else if (gfc_current_ns->proc_name->ns->parent != NULL + else if (!sym && gfc_current_ns->proc_name->ns->parent != NULL && gfc_find_symbol (name, gfc_current_ns->proc_name->ns->parent, 1, &sym)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6f72b8a0f2f..1a802f00ec6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-04-30 Tobias Burnus <burnus@net-b.de> + + PR fortran/48800 + * gfortran.dg/interface_37.f90: New. + 2011-04-30 Paul Thomas <pault@gcc.gnu.org> PR fortran/48746 diff --git a/gcc/testsuite/gfortran.dg/interface_37.f90 b/gcc/testsuite/gfortran.dg/interface_37.f90 new file mode 100644 index 00000000000..8dbc27630bf --- /dev/null +++ b/gcc/testsuite/gfortran.dg/interface_37.f90 @@ -0,0 +1,31 @@ +--- /dev/null ++++ gcc/testsuite/gfortran.dg/interface_36.f90 2011-04-29 19:10:43.000000000 +0200 +@@ -0,0 +1,28 @@ ++! { dg-do compile } ++! ++! PR fortran/48800 ++! ++! Contributed by Daniel Carrera ++! ++ pure function runge_kutta_step(t, r_, dr, h) result(res) ++ real, intent(in) :: t, r_(:), h ++ real, dimension(:), allocatable :: k1, k2, k3, k4, res ++ integer :: N ++ ++ interface ++ pure function dr(t, r_) ! { dg-error "cannot have a deferred shape" } ++ real, intent(in) :: t, r_(:) ++ real :: dr(:) ++ end function ++ end interface ++ ++ N = size(r_) ++ allocate(k1(N),k2(N),k3(N),k4(N),res(N)) ++ ++ k1 = dr(t, r_) ++ k2 = dr(t + h/2, r_ + k1*h/2) ++ k3 = dr(t + h/2, r_ + k2*h/2) ++ k4 = dr(t + h , r_ + k3*h) ++ ++ res = r_ + (k1 + 2*k2 + 2*k3 + k4) * h/6 ++ end function |