From db39aa0b8dda53613820b0e5a99cb8a8d330f7f9 Mon Sep 17 00:00:00 2001
From: Alexandre Oliva <oliva@dcc.unicamp.br>
Date: Wed, 7 Jul 1999 00:32:23 +0000
Subject: [PATCH] * decl2.c (mark_vtable_entries): Fix check for rtti offset.

From-SVN: r27978
---
 gcc/cp/ChangeLog | 4 ++++
 gcc/cp/decl2.c   | 7 ++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index dc76bc356c2..50c3858a113 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+	* decl2.c (mark_vtable_entries): Fix check for rtti offset.
+
 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
 
 	* typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 3b099930fac..d4fcac6c5de 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -2414,12 +2414,13 @@ mark_vtable_entries (decl)
       tree fnaddr;
       tree fn;
 
-      if (TREE_CODE (TREE_VALUE (entries)) == NOP_EXPR)
+      fnaddr = (flag_vtable_thunks ? TREE_VALUE (entries) 
+		: FNADDR_FROM_VTABLE_ENTRY (TREE_VALUE (entries)));
+
+      if (TREE_CODE (fnaddr) == NOP_EXPR)
 	/* RTTI offset.  */
 	continue;
 
-      fnaddr = (flag_vtable_thunks ? TREE_VALUE (entries) 
-		: FNADDR_FROM_VTABLE_ENTRY (TREE_VALUE (entries)));
       fn = TREE_OPERAND (fnaddr, 0);
       TREE_ADDRESSABLE (fn) = 1;
       if (DECL_LANG_SPECIFIC (fn) && DECL_ABSTRACT_VIRTUAL_P (fn))