http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274
--- Comment #7 from John David Anglin <danglin at gcc dot gnu.org> 2011-01-17 15:42:26 UTC --- Resolution file is: 3 abs-1.o 3 70 262910e5 PREEMPTED_IR main_test 84 262910e5 PREEMPTED_IR abs 88 262910e5 PREEMPTED_IR abs_called abs-1-lib.o 3 70 b13b015b PREVAILING_DEF_IRONLY abs 101 b13b015b PREEMPTED_IR inside_main 103 b13b015b PREVAILING_DEF_IRONLY abs_called main.o 3 70 e5772d37 PREVAILING_DEF main 76 e5772d37 PREVAILING_DEF_IRONLY main_test 79 e5772d37 PREVAILING_DEF_IRONLY inside_main /tmp/ccJGcG05.lto.o is empty: dave@gsyprf11:~/gcc-4.6/objdir/gcc/testsuite/gcc$ ls -l /tmp/ccJGcG05.lto.o -rw------- 1 dave users 0 Jan 17 07:20 /tmp/ccJGcG05.lto.o Assert fails at this point: Breakpoint 1, lto_varpool_replace_node (prevailing_node=0x404591c0, vnode=0x40459150) at ../../gcc/gcc/lto-symtab.c:306 306 gcc_assert (!vnode->analyzed || prevailing_node->analyzed); (gdb) p vnode->analyzed $7 = 1 (gdb) p prevailing_node->analyzed $8 = 0 (gdb) p *vnode $9 = {decl = 0x4045a480, next = 0x0, prev = 0x404591c0, next_needed = 0x404591f8, prev_needed = 0x0, extra_name = 0x0, same_comdat_group = 0x0, ref_list = {references = 0x0, refering = 0xc652e0}, lto_file_data = 0x4045b000, aux = 0x0, order = 3, resolution = LDPR_UNKNOWN, needed = 1, force_output = 0, analyzed = 1, finalized = 1, output = 0, externally_visible = 1, alias = 0, used_from_other_partition = 0, in_other_partition = 0} (gdb) p *prevailing_node $10 = {decl = 0x4045a780, next = 0x40459150, prev = 0x404591f8, next_needed = 0x0, prev_needed = 0x0, extra_name = 0x0, same_comdat_group = 0x0, ref_list = {references = 0x0, refering = 0xc65be8}, lto_file_data = 0x4045b0a0, aux = 0x0, order = 8, resolution = LDPR_PREVAILING_DEF_IRONLY, needed = 1, force_output = 0, analyzed = 0, finalized = 0, output = 0, externally_visible = 0, alias = 0, used_from_other_partition = 0, in_other_partition = 0} (gdb) p debug_tree (vnode->decl) <var_decl 0x4045a480 abs_called type <integer_type 0x403fc2a0 int public SI size <integer_cst 0x403f1270 constant 32> unit size <integer_cst 0x403f10a8 constant 4> align 32 symtab 0 alias set -1 structural equality precision 32 min <integer_cst 0x403f1228 -2147483648> max <integer_cst 0x403f1240 2147483647> pointer_to_this <pointer_type 0x403fcb40>> used public static SI file /home2/dave/gcc-4.6/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1.c line 7 col 5 size <integer_cst 0x403f1270 32> unit size <integer_cst 0x403f10a8 4> align 32 context <translation_unit_decl 0x40404700 D.1190> initial <integer_cst 0x403f1528 0> (mem/c/i:SI (symbol_ref:SI ("abs_called") [flags 0x2] <var_decl 0x4045a480 abs_called>) [0 abs_called+0 S4 A32])> $11 = void (gdb) p debug_tree (prevailing_node->decl) <var_decl 0x4045a780 abs_called type <integer_type 0x403fc2a0 int public SI size <integer_cst 0x403f1270 constant 32> unit size <integer_cst 0x403f10a8 constant 4> align 32 symtab 0 alias set -1 structural equality precision 32 min <integer_cst 0x403f1228 -2147483648> max <integer_cst 0x403f1240 2147483647> pointer_to_this <pointer_type 0x403fcb40>> used public external common SI file /home2/dave/gcc-4.6/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1-lib.c line 2 col 12 size <integer_cst 0x403f1270 32> unit size <integer_cst 0x403f10a8 4> align 32 context <translation_unit_decl 0x40404770 D.1196>> $12 = void