Web lists-archives.com

gfortran problems with equivalence statement in module




module test
  integer, parameter :: rb = kind(1.0)              
  real(kind=rb) :: ka(5,13,10)   , absa(65,10)
  real(kind=rb) :: kb(5,13:59,10), absb(235,10)
  equivalence (ka(1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1))
end module test
Compiling the attached fortran code with "gfortran -c test_compile.f90"
fails, citing an internal compiler error due to a segmentation fault.
Downgrading gcc-fortran to 7.3.0-3 or using the Mingw-w64 7.4.0-0
gfortran allows the compilation to complete and produce a .o file.
Running as "${host}-gfortran -c -wrapper gdb,--args test_compile.f90"
seems to indicate that the Mingw-w64 compiler does not have the line
that causes the problem in the cygwin-native compiler:

attributes = gfc_add_attributes_to_decl (com->head->attr, NULL_TREE);

where *com is initialized to zeros (so that com->head is NULL), and
there does not seem to be any place between the creation of *com and
the call above that would set com->head to something other than NULL.

I seem to be missing something here, but I have no idea what that might
be.  Can someone point out to me what it is I've missed?

Thanks for any help you may be able to give, and for providing cygwin
all these years.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple