[Bug fortran/55134] New: associate construct and assumed size array
valeryweber at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Oct 30 09:48:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55134
Bug #: 55134
Summary: associate construct and assumed size array
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: valeryweber@hotmail.com
Dear All
I get a wrong result when associating an array via an associate construct and
passing it as assumed size array to a routine.
gcc version 4.8.0 20121018 (experimental) (GCC)
>>>>>>
program bug
implicit none
integer,dimension(1)::i
i(:)=1
associate(a =>i)
call foo(a)
end associate
write(*,*) i
contains
subroutine foo(v)
integer, dimension(*) :: v
v(1)=2
end subroutine foo
end program bug
<<<<<<
this gives me
./a.out
1
while I would expect 2
Valery
More information about the Gcc-bugs
mailing list