OSDN Git Service

* config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition):
authordannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Oct 2005 21:44:30 +0000 (21:44 +0000)
committerdannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Oct 2005 21:44:30 +0000 (21:44 +0000)
Check that elements of TYPE_METHODS are FUNCTION_DECLs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105577 138bc75d-0d04-0410-961f-82ee72b054a4

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))