Bug 53865 - [4.8 Regression] 176.gcc in SPEC CPU 2000 failed to build with LTO
Summary: [4.8 Regression] 176.gcc in SPEC CPU 2000 failed to build with LTO
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: 4.8.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-05 12:51 UTC by H.J. Lu
Modified: 2012-08-04 01:17 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-07-05 00:00:00


Attachments
A testcase (171.59 KB, application/octet-stream)
2012-07-05 17:21 UTC, H.J. Lu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2012-07-05 12:51:53 UTC
On Linux/ia32, revision 189277 gave:

gcc -m32     -O3 -funroll-loops -msse2 -mfpmath=sse -ffast-math -fwhole-program -flto=jobserver -fuse-linker-plugin  c-parse.o c-lang.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o dbxout.o sdbout.o dwarfout.o xcoffout.o integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o insn-attrtab.o m88k.o getpwd.o convert.o bc-emit.o bc-optab.o obstack.o   -lm  -o cc1
...
In file included from :90:0:
dwarfout.c: In function 'output_enumeration_type_die':
dwarfout.c:3116:1: internal compiler error: Aborted
 output_enumeration_type_die (arg)
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [/tmp/cc20jqbM.ltrans6.ltrans.o] Error 1
Comment 1 Richard Biener 2012-07-05 13:33:59 UTC
dwarfout.c:3116:1: internal compiler error: Aborted

we usually do not abort - instead this looks like gmp/mpfr crashing?
Comment 2 H.J. Lu 2012-07-05 17:21:09 UTC
Created attachment 27747 [details]
A testcase

(gdb) r -quiet -dumpdir ./ -dumpbase cc1.ltrans6 -mfpmath=sse -mtune=generic -march=x86-64 -m32 -msse2 -mfpmath=sse -mtune=generic -march=x86-64 -auxbase-strip cc1.ltrans6.ltrans.o -O3 -version -funroll-loops -ffast-math -fwhole-program -fuse-linker-plugin -fltrans cc1.ltrans6.o -o cc1.ltrans6.s
Starting program: /export/build/gnu/gcc/build-x86_64-linux/gcc/lto1 -quiet -dumpdir ./ -dumpbase cc1.ltrans6 -mfpmath=sse -mtune=generic -march=x86-64 -m32 -msse2 -mfpmath=sse -mtune=generic -march=x86-64 -auxbase-strip cc1.ltrans6.ltrans.o -O3 -version -funroll-loops -ffast-math -fwhole-program -fuse-linker-plugin -fltrans cc1.ltrans6.o -o cc1.ltrans6.s
GNU GIMPLE (GCC) version 4.8.0 20120705 (experimental) (x86_64-unknown-linux-gnu)
	compiled by GNU C version 4.6.3 20120306 (Red Hat 4.6.3-2), GMP version 4.3.2, MPFR version 3.0.1, MPC version 0.8.3-dev
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU GIMPLE (GCC) version 4.8.0 20120705 (experimental) (x86_64-unknown-linux-gnu)
	compiled by GNU C version 4.6.3 20120306 (Red Hat 4.6.3-2), GMP version 4.3.2, MPFR version 3.0.1, MPC version 0.8.3-dev
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

Program received signal SIGABRT, Aborted.
0x00000035a6a352f5 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00000035a6a352f5 in raise () from /lib64/libc.so.6
#1  0x00000035a6a36c0b in abort () from /lib64/libc.so.6
#2  0x000000000119cd71 in htab_clear_slot (htab=0x7ffff1b948c0, slot=0x0)
    at /export/gnu/import/git/gcc/libiberty/hashtab.c:756
#3  0x0000000000a4c576 in remove_referenced_var (var=0x7ffff0fbb3c0)
    at /export/gnu/import/git/gcc/gcc/tree-dfa.c:605
#4  0x0000000000b785f1 in remove_unused_locals ()
    at /export/gnu/import/git/gcc/gcc/tree-ssa-live.c:834
#5  0x000000000090e13e in execute_function_todo (data=0x208a24)
    at /export/gnu/import/git/gcc/gcc/passes.c:1793
#6  0x000000000090dbcb in do_per_function (
    callback=0x90e034 <execute_function_todo>, data=0x208a24)
    at /export/gnu/import/git/gcc/gcc/passes.c:1646
#7  0x000000000090e2a8 in execute_todo (flags=2132516)
    at /export/gnu/import/git/gcc/gcc/passes.c:1842
#8  0x000000000090e6f1 in execute_one_ipa_transform_pass (node=0x7ffff15e7ea0, 
    ipa_pass=0x17ba300) at /export/gnu/import/git/gcc/gcc/passes.c:2020
#9  0x000000000090e7a1 in execute_all_ipa_transforms ()
    at /export/gnu/import/git/gcc/gcc/passes.c:2045
#10 0x00000000005826ae in expand_function (node=0x7ffff15e7ea0)
    at /export/gnu/import/git/gcc/gcc/cgraphunit.c:1608
#11 0x0000000000582d98 in expand_all_functions ()
    at /export/gnu/import/git/gcc/gcc/cgraphunit.c:1720
---Type <return> to continue, or q <return> to quit---
#12 0x00000000005838b0 in compile ()
    at /export/gnu/import/git/gcc/gcc/cgraphunit.c:2018
#13 0x00000000004b9d43 in lto_main ()
    at /export/gnu/import/git/gcc/gcc/lto/lto.c:2120
#14 0x0000000000a033db in compile_file ()
    at /export/gnu/import/git/gcc/gcc/toplev.c:550
#15 0x0000000000a05370 in do_compile ()
    at /export/gnu/import/git/gcc/gcc/toplev.c:1867
#16 0x0000000000a054e0 in toplev_main (argc=26, argv=0x7fffffffe1b8)
    at /export/gnu/import/git/gcc/gcc/toplev.c:1943
#17 0x0000000001133bcc in main (argc=26, argv=0x7fffffffe1b8)
    at /export/gnu/import/git/gcc/gcc/main.c:36
(gdb) f 3
#3  0x0000000000a4c576 in remove_referenced_var (var=0x7ffff0fbb3c0)
    at /export/gnu/import/git/gcc/gcc/tree-dfa.c:605
605	  htab_clear_slot (gimple_referenced_vars (cfun), loc);
(gdb) p loc
$1 = (void **) 0x0
(gdb)
Comment 3 H.J. Lu 2012-07-05 17:33:29 UTC
abort comes from htab_clear_slot in libiberty/hashtab.c.
Comment 4 H.J. Lu 2012-07-06 14:13:30 UTC
This is caused by revision 189261:

http://gcc.gnu.org/ml/gcc-cvs/2012-07/msg00165.html
Comment 5 hjl@gcc.gnu.org 2012-08-02 16:58:42 UTC
Author: hjl
Date: Thu Aug  2 16:58:33 2012
New Revision: 190090

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190090
Log:
Add free inline summary pass after pass_early_local_passes 

	PR middle-end/53321
	PR middle-end/53865
	* ipa-inline-analysis.c (inline_free_summary): Return if
	inline_edge_summary_vec is NULL.

	* ipa-split.c (execute_split_functions): Check if a function
	is inlinable only if inline_edge_summary_vec != NULL.

	* ipa.c (symtab_remove_unreachable_nodes): Restore
	cgraph_propagate_frequency call when something was changed.
	(free_inline_summary): New function.
	(pass_ipa_free_inline_summary): New pass.

	* passes.c (init_optimization_passes): Add
	pass_ipa_free_inline_summary before pass_ipa_tree_profile.

	* timevar.def (TV_IPA_FREE_INLINE_SUMMARY): New.

	* tree-pass.h (pass_ipa_free_inline_summary): New.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-inline-analysis.c
    trunk/gcc/ipa-split.c
    trunk/gcc/ipa.c
    trunk/gcc/passes.c
    trunk/gcc/timevar.def
    trunk/gcc/tree-pass.h
Comment 6 H.J. Lu 2012-08-04 01:17:51 UTC
Fixed.