This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/55134] New: associate construct and assumed size array
- From: "valeryweber at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 30 Oct 2012 09:47:42 +0000
- Subject: [Bug fortran/55134] New: associate construct and assumed size array
- Auto-submitted: auto-generated
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