This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/55134] New: associate construct and assumed size array


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]