Commit 3b138408 by Erik Edelmann Committed by Tobias Schlüter

re PR fortran/18568 (pointers in derived data types do not transmit shape of…

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
parent d739199a
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
......
......@@ -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:
......
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
! { 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
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