gfortran problems with equivalence statement in module
Arjen Markus
arjen.markus895@gmail.com
Mon Jan 28 06:58:00 GMT 2019
out of curiosity I experimented a bit with this source code. It can be
simplified to:
module test
integer, parameter :: rb = kind(1.0)
real(kind=rb) :: ka(5,13,10) , absa(65,10)
equivalence (ka(1,1,1),absa(1,1))
end module test
If I make it a program, rather than a module, the compiler happily
produces a .o file. So it is not due to the non-one starting index in
the array kb
Regards,
Arjen
Op ma 28 jan. 2019 om 00:00 schreef airplanemath via cygwin <cygwin@cygwin.com>:
>
> 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
--
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
More information about the Cygwin
mailing list