]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
d: Always layout initializer for the m_RTInfo field in TypeInfo_Class
authorIain Buclaw <ibuclaw@gdcproject.org>
Mon, 26 Jul 2021 18:06:38 +0000 (20:06 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Fri, 30 Jul 2021 10:53:53 +0000 (12:53 +0200)
Makes it explicit that the default value is set to NULL.

gcc/d/ChangeLog:

* typeinfo.cc (TypeInfoVisitor::visit (TypeInfoClassDeclaration *)):
Always layout initializer for the m_RTInfo field.

gcc/d/typeinfo.cc

index c9126f4c6b57b23b17068a315a6c590c31c202da..978c73e65f637eae6ede20c40fa06bcf99df1c38 100644 (file)
@@ -934,6 +934,8 @@ public:
          this->layout_field (build_expr (cd->getRTInfo, true));
        else if (!(flags & ClassFlags::noPointers))
          this->layout_field (size_one_node);
+       else
+         this->layout_field (null_pointer_node);
       }
     else
       {