winnt-cxx.c (i386_pe_adjust_class_at_definition): Check that elements of TYPE_METHODS...
authorDanny Smith <dannysmith@users.sourceforge.net>
Tue, 18 Oct 2005 21:44:30 +0000 (21:44 +0000)
committerDanny Smith <dannysmith@gcc.gnu.org>
Tue, 18 Oct 2005 21:44:30 +0000 (21:44 +0000)
* config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition):
Check that elements of TYPE_METHODS are FUNCTION_DECLs.

From-SVN: r105577

gcc/ChangeLog
gcc/config/i386/winnt-cxx.c

index 439ea31..15988f7 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-18  Danny Smith  <dannysmith@users.sourceforge.net>
+
+       * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition):
+       Check that elements of TYPE_METHODS are FUNCTION_DECLs.
+
 2005-10-17  Alexey Starovoytov  <alexey.starovoytov@sun.com>
             Ian Lance Taylor <ian@airs.com>
 
index 5117bd7..6123ebb 100755 (executable)
@@ -152,7 +152,8 @@ i386_pe_adjust_class_at_definition (tree t)
     
   /* Check FUNCTION_DECL's.  */
   for (member = TYPE_METHODS (t); member;  member = TREE_CHAIN (member))
-    maybe_add_dllimport (member);
+    if (TREE_CODE (member) == FUNCTION_DECL)
+      maybe_add_dllimport (member);
  
   /* Check vtables  */
   for (member = CLASSTYPE_VTABLES (t); member;  member = TREE_CHAIN (member))