Regression: ICE on passing coarray argument between files

Rouson, Damian rouson@sandia.gov
Sun Nov 11 13:44:00 GMT 2012


Gfortran developers,

With the code below, gfortran 4.8.0 20121021 generates an ICE when the
module and main program are in separate files but not when they are in one
file (on OS X).  With gfortran 4.7.2, the same code compiles and runs
without error whether in one file or two.  Shall I submit a PR?  FYI, this
is a reduced version of an example we will present in our Supercomputing
2012 tutorial today
(http://sc12.supercomputing.org/schedule/event_detail.php?evid=tut141).

Damian

$ cat co_sum_module.f90
module co_sum_module
  implicit none
contains
  subroutine co_sum(scalar)
    integer scalar[*]
  end subroutine
end module

$ cat league.f90 
program main
  use co_sum_module
  implicit none    
  integer score[*] 
  call co_sum(score)
end program

$ gfortran -c -fcoarray=single co_sum_module.f90
$ gfortran -fcoarray=single league.f90 co_sum_module.o
league.f90: In function 'MAIN__':
league.f90:5:0: internal compiler error: Segmentation fault: 11
   call co_sum(score)
 ^

league.f90:5:0: internal compiler error: Abort trap: 6
gfortran: internal compiler error: Abort trap: 6 (program f951)
Abort trap: 6

$ cat co_sum_module.f90 league.f90 > all_in_one.f90
$ gfortran -fcoarray=single all_in_one.f90
$ ./a.out
$ gfortran --version
GNU Fortran (MacPorts gcc48 4.8-20121021_0) 4.8.0 20121021 (experimental)
Copyright (C) 2012 Free Software Foundation, Inc.





More information about the Fortran mailing list