diff options
author | Mark Mitchell <mark@codesourcery.com> | 2000-08-02 16:02:43 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2000-08-02 16:02:43 +0000 |
commit | 3f954fc3f38a0fd76f8107b75f0f0b5936a29fd9 (patch) | |
tree | 8da822ef8b5dea6a9b2021b5a6bba986e8dd74ec | |
parent | b6cc0a729007d1a88a6fdf176e3774ad2d28cdec (diff) | |
download | gcc-3f954fc3f38a0fd76f8107b75f0f0b5936a29fd9.zip gcc-3f954fc3f38a0fd76f8107b75f0f0b5936a29fd9.tar.gz gcc-3f954fc3f38a0fd76f8107b75f0f0b5936a29fd9.tar.bz2 |
* cp-tree.h (DECL_NEEDED_P): Tweak.
From-SVN: r35426
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/static14.C | 19 |
3 files changed, 24 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bd8b58a..12becdb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 63c1e8e..d949fcb 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -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 index 0000000..6df4c4c --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/static14.C @@ -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 () +{ +} |