public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r10-8989] Fortran: Fix type-decl for PDT / wrong-code pdt_14.f03 issue [PR97652]
@ 2020-11-06 15:32 Tobias Burnus
0 siblings, 0 replies; only message in thread
From: Tobias Burnus @ 2020-11-06 15:32 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:099857318ca92210e34cfb8975c5c58c00bf1587
commit r10-8989-g099857318ca92210e34cfb8975c5c58c00bf1587
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Fri Nov 6 08:26:51 2020 +0100
Fortran: Fix type-decl for PDT / wrong-code pdt_14.f03 issue [PR97652]
Parameterized derived types are handled in a special way and start with 'Pdt'.
If the 'P' is not uppercase, gfc_get_derived_type (which calls
gfc_get_module_backend_decl) does not find the existing declaration and
builds a new type. The middle end then sees those types as being different
and nonalising, creating an endless loop for pdt_14.f03.
gcc/fortran/ChangeLog:
PR fortran/97652
* module.c (mio_symbol): Fix symbol name for pdt_type.
(cherry picked from commit c283a711c850efaab4fe3bca5ef7200eb854bba1)
Diff:
---
gcc/fortran/module.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index eccf92bf658..9a5b1cb7625 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -4411,6 +4411,9 @@ mio_symbol (gfc_symbol *sym)
mio_symbol_attribute (&sym->attr);
+ if (sym->attr.pdt_type)
+ sym->name = gfc_dt_upper_string (sym->name);
+
/* Note that components are always saved, even if they are supposed
to be private. Component access is checked during searching. */
mio_component_list (&sym->components, sym->attr.vtype);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-06 15:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 15:32 [gcc r10-8989] Fortran: Fix type-decl for PDT / wrong-code pdt_14.f03 issue [PR97652] Tobias Burnus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).