decl2.c (import_export_decl): Mark tinfo functions for cv-qualified versions of class...
authorMark Mitchell <mmitchell@usa.net>
Tue, 10 Mar 1998 07:32:11 +0000 (07:32 +0000)
committerMark Mitchell <mmitchell@gcc.gnu.org>
Tue, 10 Mar 1998 07:32:11 +0000 (07:32 +0000)
Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
* decl2.c (import_export_decl): Mark tinfo functions for
cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.

From-SVN: r18456

gcc/cp/ChangeLog
gcc/cp/decl2.c

index d8951911d644772d7028a248250dd3563b9f4fd3..c2a62c9be378b02a4f75c96effcf796b429578cf 100644 (file)
@@ -1,3 +1,8 @@
+Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
+
+       * decl2.c (import_export_decl): Mark tinfo functions for
+       cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
+
 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
 
        * method.c: Fix typo.
index e337b18d01f0adeaebe0a0281bc9aa7463b97978..2d8ecb96469b6c90bbb6beb5258d022af9255c14 100644 (file)
@@ -2702,9 +2702,16 @@ import_export_decl (decl)
       if (IS_AGGR_TYPE (ctype) && CLASSTYPE_INTERFACE_KNOWN (ctype)
          && TYPE_VIRTUAL_P (ctype))
        {
+         /* If the type is a cv-qualified variant of a type, then we
+            must emit the tinfo function in this translation unit
+            since it will not be emitted when the vtable for the type
+            is output (which is when the unqualified version is
+            generated).  */
          DECL_NOT_REALLY_EXTERN (decl)
-           = ! (CLASSTYPE_INTERFACE_ONLY (ctype)
-                || (DECL_THIS_INLINE (decl) && ! flag_implement_inlines));
+           = TYPE_READONLY (ctype) 
+           || TYPE_VOLATILE (ctype)
+           || ! (CLASSTYPE_INTERFACE_ONLY (ctype)
+                 || (DECL_THIS_INLINE (decl) && ! flag_implement_inlines));
 
          /* For WIN32 we also want to put explicit instantiations in
             linkonce sections.  */