]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* cp-tree.h (DECL_NEEDED_P): Tweak.
authorMark Mitchell <mark@codesourcery.com>
Wed, 2 Aug 2000 16:02:43 +0000 (16:02 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 2 Aug 2000 16:02:43 +0000 (16:02 +0000)
From-SVN: r35426

gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/testsuite/g++.old-deja/g++.other/static14.C [new file with mode: 0644]

index bd8b58a8472fb0c0ff50fb15fb13505d2eee9cac..12becdbcaf0e49aa75c707e479d119f208af15b3 100644 (file)
@@ -1,3 +1,7 @@
+2000-08-02  Mark Mitchell  <mark@codesourcery.com>
+
+       * cp-tree.h (DECL_NEEDED_P): Tweak.
+
 2000-07-28  Jason Merrill  <jason@redhat.com>
 
        * lang-specs.h: Use %i in rule for .ii files.
index 63c1e8ef24848b0cf2c8dcefb371328901cb4605..d949fcb70c648bd281dbf72045f7c50f1f4ab28a 100644 (file)
@@ -1936,7 +1936,7 @@ struct lang_decl
    anything that isn't comdat, but we don't know for sure whether or
    not something is comdat until end-of-file.  */
 #define DECL_NEEDED_P(DECL)                                    \
-  ((at_eof && !DECL_COMDAT (DECL))                             \
+  ((at_eof && TREE_PUBLIC (DECL) && !DECL_COMDAT (DECL))       \
    || (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME ((DECL))))  \
    || (flag_syntax_only && TREE_USED ((DECL))))
 
diff --git a/gcc/testsuite/g++.old-deja/g++.other/static14.C b/gcc/testsuite/g++.old-deja/g++.other/static14.C
new file mode 100644 (file)
index 0000000..6df4c4c
--- /dev/null
@@ -0,0 +1,19 @@
+// Build don't run:
+// Origin: scott snyder <snyder@fnal.gov>
+
+struct basic_string
+{
+  ~basic_string();
+};
+
+struct Side
+{
+  void name()
+  {
+    static basic_string sname;
+  }
+};
+
+int main ()
+{
+}