This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ICE in determine_visibility
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Mark Mitchell <mark at codesourcery dot com>
- Date: Thu, 2 Sep 2004 20:30:47 +0100
- Subject: ICE in determine_visibility
- Organization: CodeSourcery
The patch below fixes a tree-checking error in determine_visibility.
Tested by building cross to arm-unknown-eabi.
Applied as obvious to mainline and csl-arm-branch.
Paul
2004-09-02 Paul Brook <paul@codesourcery.com>
* decl2.c (determine_visibility): Only check data visibility
for VAR_DECLS.
Index: decl2.c
===================================================================
RCS file: /var/cvsroot/gcc-cvs/gcc/gcc/cp/decl2.c,v
retrieving revision 1.742
diff -u -p -r1.742 decl2.c
--- decl2.c 1 Sep 2004 03:45:27 -0000 1.742
+++ decl2.c 2 Sep 2004 19:23:37 -0000
@@ -1655,7 +1655,8 @@ determine_visibility (tree decl)
the visibility of their containing class. */
if (class_type)
{
- if (targetm.cxx.export_class_data ()
+ if (TREE_CODE (decl) == VAR_DECL
+ && targetm.cxx.export_class_data ()
&& (DECL_TINFO_P (decl)
|| (DECL_VTABLE_OR_VTT_P (decl)
/* Construction virtual tables are not emitted