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/41627] mixing common and modules elicits seg fault



------- Comment #3 from dominiq at lps dot ens dot fr  2009-10-07 23:57 -------
Confirmed for gfortran 4.3.4, 4.4.1, and trunk. The code compiles with gfortran
4.2.4, thus this is a regression. Reduced test:

module testmod

integer, parameter :: r8  = selected_real_kind(12)

   type VARIABLES_MAILLE
      real(r8), dimension(5) :: cell_var
   end type VARIABLES_MAILLE

   type (VARIABLES_MAILLE), pointer, dimension(:) :: Hydro_vars

   real(r8), pointer, dimension(:) :: Ro

   common/arrays/Ro

end module testmod

subroutine TF_AD_SPLITTING_DRIVER_PLANE

use testmod
implicit none

    Ro => Hydro_vars(1:2)%cell_var(1)

end subroutine TF_AD_SPLITTING_DRIVER_PLANE
end

Note that if I comment the line "   common/arrays/Ro" I get the following link
error:

Undefined symbols:
  "_span.0", referenced from:
      _span.0$non_lazy_ptr in ccut3FpU.o
ld: symbol(s) not found
collect2: ld returned 1 exit status


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41627


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