public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/45557]  New: Segfault with -flto -O1 -finline-small-functions -fpartial-inlining
@ 2010-09-06 13:48 alexey at feldgendler dot ru
  2010-09-06 13:49 ` [Bug lto/45557] " alexey at feldgendler dot ru
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: alexey at feldgendler dot ru @ 2010-09-06 13:48 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2903 bytes --]

cc1plus segfaults on the attached testcase with -flto -O1
-finline-small-functions -fpartial-inlining.

$ g++-4.6 -v -flto -O1 -finline-small-functions -fpartial-inlining TC.cpp
Using built-in specs.
COLLECT_GCC=g++-4.6
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/xman/gcc-4.6-20100828/configure --program-suffix=-4.6
--enable-lto --enable-version-specific-runtime-libs
Thread model: posix
gcc version 4.6.0 20100828 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-flto' '-O1' '-finline-small-functions'
'-fpartial-inlining' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/cc1plus -quiet -v
-D_GNU_SOURCE TC.cpp -quiet -dumpbase TC.cpp -mtune=generic -march=x86-64
-auxbase TC -O1 -version -flto -finline-small-functions -fpartial-inlining -o
/tmp/ccRma3YY.s
GNU C++ (GCC) version 4.6.0 20100828 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20100828 (experimental), GMP version
4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory
"/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include/c++

/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include/c++/x86_64-unknown-linux-gnu
 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include/c++/backward
 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include
 /usr/local/include
 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include-fixed
 /usr/include
End of search list.
GNU C++ (GCC) version 4.6.0 20100828 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20100828 (experimental), GMP version
4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 2c7dd1386f3abb6f2873be5b63c94737
TC.cpp: In function ‘f3()’:
TC.cpp:5:5: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: Segfault with -flto -O1 -finline-small-functions -
                    fpartial-inlining
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: alexey at feldgendler dot ru
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45557


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug lto/45557] Segfault with -flto -O1 -finline-small-functions -fpartial-inlining
  2010-09-06 13:48 [Bug lto/45557] New: Segfault with -flto -O1 -finline-small-functions -fpartial-inlining alexey at feldgendler dot ru
@ 2010-09-06 13:49 ` alexey at feldgendler dot ru
  2010-09-06 13:51 ` alexey at feldgendler dot ru
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: alexey at feldgendler dot ru @ 2010-09-06 13:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from alexey at feldgendler dot ru  2010-09-06 13:48 -------
Created an attachment (id=21710)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21710&action=view)
Testcase


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45557


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug lto/45557] Segfault with -flto -O1 -finline-small-functions -fpartial-inlining
  2010-09-06 13:48 [Bug lto/45557] New: Segfault with -flto -O1 -finline-small-functions -fpartial-inlining alexey at feldgendler dot ru
  2010-09-06 13:49 ` [Bug lto/45557] " alexey at feldgendler dot ru
@ 2010-09-06 13:51 ` alexey at feldgendler dot ru
  2010-09-06 13:53 ` alexey at feldgendler dot ru
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: alexey at feldgendler dot ru @ 2010-09-06 13:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from alexey at feldgendler dot ru  2010-09-06 13:49 -------
Created an attachment (id=21711)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21711&action=view)
Incomplete assembly file cc1plus manages to write before segfaulting


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45557


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug lto/45557] Segfault with -flto -O1 -finline-small-functions -fpartial-inlining
  2010-09-06 13:48 [Bug lto/45557] New: Segfault with -flto -O1 -finline-small-functions -fpartial-inlining alexey at feldgendler dot ru
  2010-09-06 13:49 ` [Bug lto/45557] " alexey at feldgendler dot ru
  2010-09-06 13:51 ` alexey at feldgendler dot ru
@ 2010-09-06 13:53 ` alexey at feldgendler dot ru
  2010-09-06 13:54 ` rguenth at gcc dot gnu dot org
  2010-09-06 14:04 ` alexey at feldgendler dot ru
  4 siblings, 0 replies; 6+ messages in thread
From: alexey at feldgendler dot ru @ 2010-09-06 13:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from alexey at feldgendler dot ru  2010-09-06 13:51 -------
$ gdb --args /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/cc1plus -v
-D_GNU_SOURCE TC.cpp -dumpbase TC.cpp -mtune=generic -march=x86-64 -auxbase TC
-O1 -version -flto -finline-small-functions -fpartial-inlining
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/cc1plus...done.
(gdb) r
Starting program: /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/cc1plus
-v -D_GNU_SOURCE TC.cpp -dumpbase TC.cpp -mtune=generic -march=x86-64 -auxbase
TC -O1 -version -flto -finline-small-functions -fpartial-inlining
GNU C++ (GCC) version 4.6.0 20100828 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20100828 (experimental), GMP version
4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory
"/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include/c++

/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include/c++/x86_64-unknown-linux-gnu
 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include/c++/backward
 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include
 /usr/local/include
 /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include-fixed
 /usr/include
End of search list.
GNU C++ (GCC) version 4.6.0 20100828 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20100828 (experimental), GMP version
4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
options passed:  -v -D_GNU_SOURCE TC.cpp -mtune=generic -march=x86-64 -O1
 -flto -finline-small-functions -fpartial-inlining
options enabled:  -falign-loops -fasynchronous-unwind-tables
 -fauto-inc-dec -fbranch-count-reg -fcommon -fcprop-registers -fdefer-pop
 -fdelete-null-pointer-checks -fdwarf2-cfi-asm -fearly-inlining
 -feliminate-unused-debug-types -fexceptions -fforward-propagate
 -ffunction-cse -fgcse-lm -fguess-branch-probability -fident
 -fif-conversion -fif-conversion2 -finline -finline-functions-called-once
 -finline-small-functions -fipa-profile -fipa-pure-const -fipa-reference
 -fira-share-save-slots -fira-share-spill-slots -fivopts
 -fkeep-static-consts -fleading-underscore -fmath-errno -fmerge-constants
 -fmerge-debug-strings -fmove-loop-invariants -fomit-frame-pointer
 -fpartial-inlining -fpeephole -fprefetch-loop-arrays -freg-struct-return
 -fsched-critical-path-heuristic -fsched-dep-count-heuristic
 -fsched-group-heuristic -fsched-interblock -fsched-last-insn-heuristic
 -fsched-rank-heuristic -fsched-spec -fsched-spec-insn-heuristic
 -fsched-stalled-insns-dep -fshow-column -fsigned-zeros
 -fsplit-ivs-in-unroller -fsplit-wide-types -fstrict-volatile-bitfields
 -ftoplevel-reorder -ftrapping-math -ftree-bit-ccp -ftree-ccp -ftree-ch
 -ftree-copy-prop -ftree-copyrename -ftree-cselim -ftree-dce
 -ftree-dominator-opts -ftree-dse -ftree-forwprop -ftree-fre
 -ftree-loop-if-convert -ftree-loop-im -ftree-loop-ivcanon
 -ftree-loop-optimize -ftree-parallelize-loops= -ftree-phiprop -ftree-pta
 -ftree-reassoc -ftree-scev-cprop -ftree-sink -ftree-slp-vectorize
 -ftree-sra -ftree-ter -ftree-vect-loop-version -funit-at-a-time
 -funwind-tables -fvar-tracking -fvar-tracking-assignments
 -fvect-cost-model -fzero-initialized-in-bss -m128bit-long-double -m64
 -m80387 -maccumulate-outgoing-args -malign-stringops -mfancy-math-387
 -mfp-ret-in-387 -mfused-madd -mglibc -mieee-fp -mmmx -mno-sse4 -mpush-args
 -mred-zone -msse -msse2 -mtls-direct-seg-refs
Compiler executable checksum: 2c7dd1386f3abb6f2873be5b63c94737
 int f3()
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> <visibility> <early_local_cleanups> <whole-program>
<ipa-profile> <inline> <pure-const> <static-var>Assembling functions:
 f3()
Program received signal SIGSEGV, Segmentation fault.
prepare_use_sites_for (update_flags=2048) at
/home/xman/gcc-4.6-20100828/gcc/tree-into-ssa.c:2588
2588              edge e = gimple_phi_arg_edge (stmt, ix);
(gdb) bt
#0  prepare_use_sites_for (update_flags=2048) at
/home/xman/gcc-4.6-20100828/gcc/tree-into-ssa.c:2588
#1  prepare_names_to_update (update_flags=2048) at
/home/xman/gcc-4.6-20100828/gcc/tree-into-ssa.c:2657
#2  update_ssa (update_flags=2048) at
/home/xman/gcc-4.6-20100828/gcc/tree-into-ssa.c:3291
#3  0x000000000086d548 in execute_function_todo (data=<value optimized out>) at
/home/xman/gcc-4.6-20100828/gcc/passes.c:1206
#4  0x000000000086db5f in execute_todo (flags=2085) at
/home/xman/gcc-4.6-20100828/gcc/passes.c:1283
#5  0x000000000087015a in execute_one_pass (pass=0x12d7a20) at
/home/xman/gcc-4.6-20100828/gcc/passes.c:1591
#6  0x0000000000870385 in execute_pass_list (pass=0x12d7a20) at
/home/xman/gcc-4.6-20100828/gcc/passes.c:1623
#7  0x0000000000870397 in execute_pass_list (pass=0x12d7480) at
/home/xman/gcc-4.6-20100828/gcc/passes.c:1624
#8  0x0000000000969516 in tree_rest_of_compilation (fndecl=0x7ffff6b49300) at
/home/xman/gcc-4.6-20100828/gcc/tree-optimize.c:452
#9  0x0000000000b03fc6 in cgraph_expand_function (node=0x7ffff6b57000) at
/home/xman/gcc-4.6-20100828/gcc/cgraphunit.c:1469
#10 0x0000000000b069ca in cgraph_expand_all_functions () at
/home/xman/gcc-4.6-20100828/gcc/cgraphunit.c:1548
#11 cgraph_optimize () at /home/xman/gcc-4.6-20100828/gcc/cgraphunit.c:1804
#12 0x0000000000b06f1a in cgraph_finalize_compilation_unit () at
/home/xman/gcc-4.6-20100828/gcc/cgraphunit.c:1012
#13 0x000000000055345d in cp_write_global_declarations () at
/home/xman/gcc-4.6-20100828/gcc/cp/decl2.c:3924
#14 0x00000000009111da in compile_file (argc=15, argv=0x7fffffffe458) at
/home/xman/gcc-4.6-20100828/gcc/toplev.c:983
#15 do_compile (argc=15, argv=0x7fffffffe458) at
/home/xman/gcc-4.6-20100828/gcc/toplev.c:2321
#16 toplev_main (argc=15, argv=0x7fffffffe458) at
/home/xman/gcc-4.6-20100828/gcc/toplev.c:2362
#17 0x00007ffff6fbac4d in __libc_start_main (main=<value optimized out>,
argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized
out>, fini=<value optimized out>, rtld_fini=<value optimized out>,
stack_end=0x7fffffffe448) at libc-start.c:228
#18 0x000000000049b1bd in _start ()


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45557


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug lto/45557] Segfault with -flto -O1 -finline-small-functions -fpartial-inlining
  2010-09-06 13:48 [Bug lto/45557] New: Segfault with -flto -O1 -finline-small-functions -fpartial-inlining alexey at feldgendler dot ru
                   ` (2 preceding siblings ...)
  2010-09-06 13:53 ` alexey at feldgendler dot ru
@ 2010-09-06 13:54 ` rguenth at gcc dot gnu dot org
  2010-09-06 14:04 ` alexey at feldgendler dot ru
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-09-06 13:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2010-09-06 13:53 -------
Seems to be fixed by

2010-09-02  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/44937
        PR tree-optimization/45412
        * ipa-split.c (split_function): Properly remove PHI nodes.


*** This bug has been marked as a duplicate of 44937 ***


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45557


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug lto/45557] Segfault with -flto -O1 -finline-small-functions -fpartial-inlining
  2010-09-06 13:48 [Bug lto/45557] New: Segfault with -flto -O1 -finline-small-functions -fpartial-inlining alexey at feldgendler dot ru
                   ` (3 preceding siblings ...)
  2010-09-06 13:54 ` rguenth at gcc dot gnu dot org
@ 2010-09-06 14:04 ` alexey at feldgendler dot ru
  4 siblings, 0 replies; 6+ messages in thread
From: alexey at feldgendler dot ru @ 2010-09-06 14:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from alexey at feldgendler dot ru  2010-09-06 14:03 -------
Indeed, the patch fixes this bug for me. Thanks!


-- 

alexey at feldgendler dot ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45557


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-06 14:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-06 13:48 [Bug lto/45557] New: Segfault with -flto -O1 -finline-small-functions -fpartial-inlining alexey at feldgendler dot ru
2010-09-06 13:49 ` [Bug lto/45557] " alexey at feldgendler dot ru
2010-09-06 13:51 ` alexey at feldgendler dot ru
2010-09-06 13:53 ` alexey at feldgendler dot ru
2010-09-06 13:54 ` rguenth at gcc dot gnu dot org
2010-09-06 14:04 ` alexey at feldgendler dot ru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).