This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ICE in determine_visibility


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]