if (!t->sym->isPOD ())
       {
        for (tree tv = t->ctype; tv != NULL_TREE; tv = TYPE_NEXT_VARIANT (tv))
-         TREE_ADDRESSABLE (tv) = 1;
+         {
+           TREE_ADDRESSABLE (tv) = 1;
+           SET_TYPE_MODE (tv, BLKmode);
+         }
       }
   }
 
 
     /* Classes only live in memory, so always set the TREE_ADDRESSABLE bit.  */
     for (tree tv = basetype; tv != NULL_TREE; tv = TYPE_NEXT_VARIANT (tv))
-      TREE_ADDRESSABLE (tv) = 1;
+      {
+       TREE_ADDRESSABLE (tv) = 1;
+       SET_TYPE_MODE (tv, BLKmode);
+      }
 
     /* Type is final, there are no derivations.  */
     if (t->sym->storage_class & STCfinal)
 
--- /dev/null
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98427
+// { dg-do compile }
+// { dg-options "-O2 -fno-inline" }
+
+@trusted memoizeExpr()
+{
+    struct CodepointSet
+    {
+        struct CowArray
+        {
+            uint *ptr;
+        }
+
+        const CodepointSet binary(U)(U rhs)
+        {
+            return rhs;
+        }
+
+        CowArray array;
+    }
+
+    CodepointSet().binary(CodepointSet());
+}