diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 33e7df7d6a4a64dc55eca31e7c0c063758561c2d..4c6ff22d5c160d0d650a980961f6ac85e009df19 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -4549,6 +4549,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);