re PR fortran/18568 (pointers in derived data types do not transmit shape of pointed to arrays - bug or non-standard feature?)

2005-10-07  Erik Edelmann  <erik.edelmann@iki.fi>
fortran/
        PR 18568
	* resolve.c (find_array_spec): Search through the list of
	components in the symbol of the type instead of the symbol of the
	variable.
testsuite/
	PR 18568
	* gfortran.dg/der_pointer_3.f90: New test.

From-SVN: r105039
This commit is contained in:
Erik Edelmann 2005-10-06 18:44:01 +03:00 committed by Tobias Schlüter
parent d739199abb
commit 3b138408de
4 changed files with 31 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2005-10-07 Erik Edelmann <erik.edelmann@iki.fi>
PR 18568
* resolve.c (find_array_spec): Search through the list of
components in the symbol of the type instead of the symbol of the
variable.
2005-10-05 Richard Guenther <rguenther@suse.de>
PR fortran/24176

View File

@ -1912,7 +1912,6 @@ find_array_spec (gfc_expr * e)
gfc_ref *ref;
as = e->symtree->n.sym->as;
c = e->symtree->n.sym->components;
for (ref = e->ref; ref; ref = ref->next)
switch (ref->type)
@ -1926,7 +1925,7 @@ find_array_spec (gfc_expr * e)
break;
case REF_COMPONENT:
for (; c; c = c->next)
for (c = e->symtree->n.sym->ts.derived->components; c; c = c->next)
if (c == ref->u.c.component)
break;
@ -1940,7 +1939,6 @@ find_array_spec (gfc_expr * e)
as = c->as;
}
c = c->ts.derived->components;
break;
case REF_SUBSTRING:

View File

@ -1,3 +1,8 @@
2005-10-07 Erik Edelmann <erik.edelmann@iki.fi>
PR 18568
* gfortran.dg/der_pointer_3.f90: New test.
2005-10-05 Devang Patel <dpatel@apple.com>
PR Debug/23205

View File

@ -0,0 +1,18 @@
! { dg-do compile }
! PR 18568
! Find pointer-to-array components
module ints
type :: bar
integer, pointer :: th(:)
end type bar
contains
function foo(b)
type(bar), intent(in) :: b
integer :: foo(size(b%th))
foo = 0
end function foo
end module ints
program size_test
use ints
end program size_test