------- Comment #18 from vmakarov at redhat dot com 2008-09-02 17:29 ------- I've looked at the cgraphbuild.i code and I think something is wrong with inlining. There are two paths achieving L21 with different stack adjustments. Here is the code. I marked insns adjusting SP by -> and the two insns should refer to the same location by !
.globl rebuild_cgraph_edges .type rebuild_cgraph_edges, @function rebuild_cgraph_edges: pushl %ebp pushl %edi pushl %esi pushl %ebx subl $56, %esp movl current_function_decl, %edx pushl %edx call cgraph_node ! movl %eax, 32(%esp) movl %eax, (%esp) call cgraph_node_remove_callees movl cfun, %eax movl 4(%eax), %ecx movl 32(%esp), %edi --> addl $16, %esp movl (%ecx), %edx movl 36(%edx), %ebx movl 40(%edx), %esi movl %esi, 100(%edi) movl %ebx, 96(%edi) movl 28(%edx), %edi cmpl 4(%ecx), %edi je .L21 ... .L31: movl 28(%eax), %edx movl %edx, 12(%esp) cmpw $29, (%edx) jne .L50 cmpl $9, tree_code_type+480 je .L51 movl 28(%esp), %edx testl %edx, %edx jle .L52 movl 48(%edi), %eax movl %eax, 8(%esp) ---> subl $12, %esp pushl %edi call compute_call_stmt_bb_frequency movl %eax, %ebp popl %eax movl 36(%edi), %edx movl 40(%edi), %ecx movl 24(%esp), %eax pushl %eax movl %edx, 20(%esp) movl %ecx, 16(%esp) call cgraph_node ---> addl $12, %esp movl 12(%esp), %edx pushl %edx pushl %ebp movl 16(%esp), %edx movl 12(%esp), %ecx pushl %ecx pushl %edx pushl %esi pushl %eax movl 44(%esp), %ebp pushl %ebp call cgraph_create_edge movl 8(%ebx), %ebx --> addl $32, %esp testl %ebx, %ebx jne .L42 .p2align 4,,7 .p2align 3 .L45: movl cfun, %eax .L22: movl 4(%eax), %edx movl 28(%edi), %edi cmpl %edi, 4(%edx) jne .L41 .L21: ! movl 48(%esp), %eax call initialize_inline_failed ... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37296