# gcc *.i -combine -O3 -c -o udns.o dia-submit/udns_init.c: In function ‘dns_set_srch_internal’: dia-submit/udns_init.c:47: internal compiler error: in get_addr_dereference_operands, at tree-ssa-operands.c:1698 Because it only appears to happen when building with multiple input files, I have attached a tar of .i files that reproduce the problem (the udns async DNS resolver library actually). I have observed this ICE on i386 and x86_64 and IA64 builds of GCC 4.3.2.
Created attachment 16465 [details] Gzipped Tar of .i files for bug reproduction
Unlikely to be fixed. -combine is an obscure feature.
(In reply to comment #2) > Unlikely to be fixed. -combine is an obscure feature. Except it might not be a -combine issue :). Until the bug gets reduced/analyzed we cannot say it will unlikely be fixed.
Reduced testcase. FILE 1: struct dns_ctx { int dnsc_serv[6]; unsigned dnsc_nserv; }; struct dns_ctx dns_defctx; int dns_add_serv(int t) { struct dns_ctx *ctx = &dns_defctx; ctx->dnsc_serv[t] = 0; } --- CUT --- FILE 2: extern struct dns_ctx dns_defctx; --- CUT --- Though I am still figuring out if this is valid code or not really, dns_defctx's type is incomplete.
I think you missed some of your explanation. Do you mean that it may not be valid to take the address of a global struct with partial definition? For example in udns_init.c which does not define dns_defctx, but has this code: int dns_init(struct dns_ctx *ctx, int do_open) { if (!ctx) ctx = &dns_defctx; [...]
-combine has been removed from GCC 4.6 in favor of LTO, closing as WONTFIX.