http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51117
Bug #: 51117 Summary: [4.7 regression] rev.181172 causes glibc build failure Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: mar...@trippelsdorf.de On x86_64-pc-linux-gnu I get the following error when I build the latest git version of glibc: cc -nostdlib -nostartfiles -r -o /var/tmp/glibc-build/libc_pic.os \ -Wl,-d -Wl,--whole-archive /var/tmp/glibc-build/libc_pic.a -o /var/tmp/glibc-build/libc_pic.os gcc -nostdlib -nostartfiles -r -o /var/tmp/glibc-build/elf/librtld.map.o '-Wl,-(' /var/tmp/glibc-build/elf/dl-allobjs.os /var/tmp/glibc-build/libc_ pic.a -lgcc '-Wl,-)' -Wl,-Map,/var/tmp/glibc-build/elf/librtld.mapT /var/tmp/glibc-build/libc_pic.a(dl-addr.os): In function `_dl_addr_inside_object': /var/tmp/glibc/elf/dl-addr.c:155: multiple definition of `_dl_addr_inside_object' /var/tmp/glibc-build/elf/dl-allobjs.os:/var/tmp/glibc/elf/dl-open.c:673: first defined here /var/tmp/glibc-build/libc_pic.a(init-first.os):(.data+0x0): multiple definition of `__libc_multiple_libcs' /var/tmp/glibc-build/elf/dl-allobjs.os:/var/tmp/glibc/elf/rtld.c:658: first defined here collect2: error: ld returned 1 exit status make[2]: *** [/var/tmp/glibc-build/elf/librtld.map] Error 1 make[2]: *** Waiting for unfinished jobs.... I've git bisected this failure to: 3c25489e88a7ea2937c19abff9163d9f7d8ca53a is the first bad commit commit 3c25489e88a7ea2937c19abff9163d9f7d8ca53a Author: matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Tue Nov 8 16:47:16 2011 +0000 * gengtype.c (write_field_root): Avoid out-of-scope access of newv. * tree-stdarg.c (execute_optimize_stdarg): Accept clobbers. * tree.h (TREE_CLOBBER_P): New macro. * gimple.h (gimple_clobber_p): New inline function. * gimplify.c (gimplify_bind_expr): Add clobbers for all variables that go out of scope and live in memory. * tree-ssa-operands.c (get_expr_operands): Transfer volatility also for constructors. * cfgexpand.c (decl_to_stack_part): New static variable. (add_stack_var): Allocate it, and remember mapping. (fini_vars_expansion): Deallocate it. (stack_var_conflict_p): Add early outs. (visit_op, visit_conflict, add_scope_conflicts_1, add_scope_conflicts): New static functions. (expand_used_vars_for_block): Don't call add_stack_var_conflict, tidy. (expand_used_vars): Add scope conflicts. (expand_gimple_stmt_1): Expand clobbers to nothing. (expand_debug_expr): Ditto. * tree-pretty-print.c (dump_generic_node): Dump clobbers nicely. * tree-ssa-live.c (remove_unused_locals): Remove clobbers that refer to otherwise unused locals. * tree-sra.c (build_accesses_from_assign): Ignore clobbers. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Clobbers of SSA names aren't necessary. (propagate_necessity): Accept and ignore constructors on the rhs, tidy. * gimple.c (walk_gimple_op): Accept constructors like mem_rhs. * tree-ssa-structalias.c (find_func_aliases): Clobbers don't store any known value. * tree-ssa-sccvn.c (vn_reference_lookup_3): Ditto, in particular they don't zero-initialize something. * tree-ssa-phiopt.c (cond_if_else_store_replacement_1): Ignore clobber RHS, we don't want PHI nodes with those. testsuite/ * gcc.dg/tree-ssa/20031015-1.c: Adjust. * g++.dg/tree-ssa/ehcleanup-1.C: Ditto. * g++.dg/eh/builtin1.C: Rewrite to not use local variables. * g++.dg/eh/builtin2.C: Ditto. * g++.dg/eh/builtin3.C: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181172 138bc75d-0d04-0410-961f-82ee72b054a4