Commit 756ccd2a by Danny Smith Committed by Danny Smith

re PR target/27650 (internal compiler error while compiling Gecode)

	PR target/27650
	* class.c (check_for_override): Remove dllimport from virtual
	methods.

From-SVN: r117096
parent 1bded8e1
2006-09-20 Danny Smith <dannysmith@users.sourceforge.net>
PR target/27650
* class.c (check_for_override): Remove dllimport from virtual
methods.
2006-09-18 Steven Bosscher <steven@gcc.gnu.org> 2006-09-18 Steven Bosscher <steven@gcc.gnu.org>
PR c++/29087 PR c++/29087
......
...@@ -2342,6 +2342,16 @@ check_for_override (tree decl, tree ctype) ...@@ -2342,6 +2342,16 @@ check_for_override (tree decl, tree ctype)
if (!DECL_VINDEX (decl)) if (!DECL_VINDEX (decl))
DECL_VINDEX (decl) = error_mark_node; DECL_VINDEX (decl) = error_mark_node;
IDENTIFIER_VIRTUAL_P (DECL_NAME (decl)) = 1; IDENTIFIER_VIRTUAL_P (DECL_NAME (decl)) = 1;
if (DECL_DLLIMPORT_P (decl))
{
/* When we handled the dllimport attribute we may not have known
that this function is virtual We can't use dllimport
semantics for a virtual method because we need to initialize
the vtable entry with a constant address. */
DECL_DLLIMPORT_P (decl) = 0;
DECL_ATTRIBUTES (decl)
= remove_attribute ("dllimport", DECL_ATTRIBUTES (decl));
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment