This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/45267] [4.5 regression] inlining fails with -m32
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Aug 2010 22:16:08 -0000
- Subject: [Bug c++/45267] [4.5 regression] inlining fails with -m32
- References: <bug-45267-17603@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from rguenth at gcc dot gnu dot org 2010-08-12 22:16 -------
116 {
1117 if (!cgraph_recursive_inlining_p (edge->caller, edge->callee,
1118 &edge->inline_failed))
1119 {
1120 edge->inline_failed = not_good;
1121 if (dump_file)
1122 fprintf (dump_file, " inline_failed:%s.\n",
1123 cgraph_inline_failed_string
(edge->inline_failed));
1124 }
1125 continue;
(gdb) p not_good
$13 = CIF_UNLIKELY_CALL
(gdb) p edge->callee->local.disregard_inline_limits
$16 = 0
(gdb) p edge->callee->decl->function_decl.disregard_inline_limits
$17 = 0
(gdb) call debug_tree ( edge->callee->decl->decl_common.attributes)
<tree_list 0xb779da68
purpose <identifier_node 0xb77a4784 always_inline
bindings <(nil)>
local bindings <(nil)>>>
the flag is cleared from the template instantiation functin decl here:
if (TREE_CODE (newdecl) == FUNCTION_DECL)
{
int function_size;
function_size = sizeof (struct tree_decl_common);
memcpy ((char *) olddecl + sizeof (struct tree_common),
(char *) newdecl + sizeof (struct tree_common),
function_size - sizeof (struct tree_common));
memcpy ((char *) olddecl + sizeof (struct tree_decl_common),
(char *) newdecl + sizeof (struct tree_decl_common),
sizeof (struct tree_function_decl) - sizeof (struct
tree_decl_common));
overwritten from a variant built via
#0 0x0811eb3e in grokfndecl (ctype=0xb77a64e0, type=0xb77a67e0,
declarator=0xb76f0888, parms=0xb77aa230, orig_declarator=0xb76f0888,
virtualp=0, flags=NO_SPECIAL, quals=1, raises=0x0, check=1, friendp=0,
publicp=1, inlinep=1, sfk=sfk_none, funcdef_flag=1 '\001',
template_count=1, in_namespace=0x0, attrlist=0xbffff088, location=2025)
at /home/richard/src/gcc-4_5-branch/gcc/cp/decl.c:6655
#1 0x0812c65c in grokdeclarator (declarator=0x90a7814, declspecs=0xbffff19c,
decl_context=NORMAL, initialized=1, attrlist=0xbffff088)
at /home/richard/src/gcc-4_5-branch/gcc/cp/decl.c:9586
#2 0x081466c4 in start_function (declspecs=0xbffff19c, declarator=0x90a78b8,
attrs=0x0) at /home/richard/src/gcc-4_5-branch/gcc/cp/decl.c:12096
#3 0x0826a771 in cp_parser_function_definition_from_specifiers_and_declarator
(parser=0xb77a4854, decl_specifiers=0xbffff19c, attributes=0x0,
declarator=0x90a78b8)
at /home/richard/src/gcc-4_5-branch/gcc/cp/parser.c:18548
we can again check the attribute lists all the time, but really
DECL_DISREGARD_INLINE_LIMITS should be kept valid here.
We already merge that in various places in duplicate_decls, but appearantly
not here.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com
Component|middle-end |c++
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45267