This patch fixes PR96737. See the explanatory comment in the testcase.
authorPaul Thomas <pault@gcc.gnu.org>
Sun, 23 Aug 2020 14:34:27 +0000 (15:34 +0100)
committerPaul Thomas <pault@gcc.gnu.org>
Sun, 23 Aug 2020 14:34:27 +0000 (15:34 +0100)
commitc4565031c8dc6b5289e36553e5cd937a91825953
tree066a1a57b8fbba30b69a6e435da2d1755f686cc2
parente769f9707d6f1e2c6dc9e8197119634ff2c44b76
This patch fixes PR96737. See the explanatory comment in the testcase.

2020-08-23  Paul Thomas  <pault@gcc.gnu.org>

gcc/fortran
PR fortran/96737
* trans-types.c (gfc_get_derived_type): Derived types that are
used in submodules are not compatible with TYPE_CANONICAL from
any of the global namespaces.

gcc/testsuite/
PR fortran/96737
* gfortran.dg/pr96737.f90: New test.
gcc/fortran/trans-types.c
gcc/testsuite/gfortran.dg/pr96737.f90 [new file with mode: 0644]