Skip to content
Snippets Groups Projects
Commit e32fff67 authored by Andre Vehreschild's avatar Andre Vehreschild
Browse files

Fix ICE with coarrays and submodules [PR80235]

Exposing a variable in a module and referencing it in a submodule made
the compiler ICE, because the external variable was not sorted into the
correct module.  In fact the module name was not set where the variable
got built.

gcc/fortran/ChangeLog:

	PR fortran/80235

	* trans-decl.cc (gfc_build_qualified_array): Make sure the array
	is associated to the correct module and being marked as extern.

gcc/testsuite/ChangeLog:

	* gfortran.dg/coarray/add_sources/submodule_1_sub.f90: New test.
	* gfortran.dg/coarray/submodule_1.f90: New test.
parent 6293272e
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment