This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/81492] internal compiler error: Segmentation fault (ia64 target with "-O1 -g" and __attribute__((optimize("O3"))))
- From: "slyfox at inbox dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 21 Jul 2017 22:30:50 +0000
- Subject: [Bug target/81492] internal compiler error: Segmentation fault (ia64 target with "-O1 -g" and __attribute__((optimize("O3"))))
- Auto-submitted: auto-generated
- References: <bug-81492-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81492
--- Comment #2 from Sergei Trofimovich <slyfox at inbox dot ru> ---
(In reply to Martin Liška from comment #1)
> Can't reproduce that with a cross compiler, can you please run --save-temps
> --verbose and execute 'cc1 ...' in GDB so that you can paste here a
> back-trace?
It fals here both on hative compiler and crosscompiler. Here is a backtrace:
[sf] ~/dev/bugs/gcc-ia64-crash:LANG=C gdb --args
/usr/libexec/gcc/ia64-unknown-linux-gnu/6.3.0/cc1 -fpreprocessed loops.i -quiet
-dumpbase loops.c -auxbase-strip loops.o -g -O1 -Wall -version -o loops.s
GNU gdb (Gentoo 8.0 vanilla) 8.0
Copyright (C) 2017 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-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from
/usr/libexec/gcc/ia64-unknown-linux-gnu/6.3.0/cc1...Reading symbols from
/usr/lib64/debug//usr/libexec/gcc/ia64-unknown-linux-gnu/6.3.0/cc1.debug...done.
done.
(gdb) run
Starting program: /usr/libexec/gcc/ia64-unknown-linux-gnu/6.3.0/cc1
-fpreprocessed loops.i -quiet -dumpbase loops.c -auxbase-strip loops.o -g -O1
-Wall -version -o loops.s
GNU C11 (Gentoo 6.3.0 p1.0) version 6.3.0 (ia64-unknown-linux-gnu)
compiled by GNU C version 7.1.0, GMP version 6.1.2, MPFR version
3.1.3-p4, MPC version 1.0.2, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C11 (Gentoo 6.3.0 p1.0) version 6.3.0 (ia64-unknown-linux-gnu)
compiled by GNU C version 7.1.0, GMP version 6.1.2, MPFR version
3.1.3-p4, MPC version 1.0.2, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 6b42849eb9b759fbb6a6b5d3684c5a13
Program received signal SIGSEGV, Segmentation fault.
bb_note (bb=bb@entry=0x0) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/cfgrtl.c:669
669 note = BB_HEAD (bb);
(gdb) bt
#0 bb_note (bb=bb@entry=0x0) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/cfgrtl.c:669
#1 0x00000000008e221a in sel_bb_head (bb=0x0) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched-ir.c:4536
#2 0x00000000008ee7c9 in moveup_expr_cached (expr=0x7fffffffca00,
insn=insn@entry=0x7fb762c90798,
inside_insn_group=inside_insn_group@entry=false)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:2531
#3 0x00000000008f163f in move_op_ascend (insn=0x7fb762c90798,
static_params=<optimized out>)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:6151
#4 0x00000000008f3498 in code_motion_path_driver (insn=0x7fb762c90798,
insn@entry=0x7fb762c92a80, orig_ops=<optimized out>, orig_ops@entry=0x1668ff8,
path=0x16691b8, path@entry=0x0,
local_params_in=local_params_in@entry=0x7fffffffcae0,
static_params=static_params@entry=0x7fffffffcab0)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:6648
#5 0x00000000008f3c32 in move_op (should_move=<synthetic pointer>,
c_expr=0x7fffffffca00, dest=<optimized out>, expr_vliw=0x1668f90,
orig_ops=0x1668ff8,
insn=0x7fb762c92a80) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:6702
#6 move_exprs_to_boundary (bnd=<optimized out>, c_expr=0x7fffffffca00,
expr_seq=0x1668ff8, expr_vliw=0x1668f90)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:5225
#7 schedule_expr_on_boundary (bnd=bnd@entry=0x1668ba0,
expr_vliw=expr_vliw@entry=0x1668f90, seqno=seqno@entry=-1)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:5438
#8 0x00000000008f673a in fill_insns (fence=fence@entry=0x1668350, seqno=-1,
scheduled_insns_tailpp=scheduled_insns_tailpp@entry=0x7fffffffcce0)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:5580
#9 0x00000000008f8e23 in schedule_on_fences
(scheduled_insns_tailpp=0x7fffffffcce0, max_seqno=1, fences=0x1668348)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:7356
#10 sel_sched_region_2 (orig_max_seqno=orig_max_seqno@entry=22) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:7494
#11 0x00000000008fa541 in sel_sched_region_1 () at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:7536
#12 sel_sched_region (rgn=0) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:7637
#13 0x00000000008faeac in run_selective_scheduling () at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:7713
#14 0x0000000000b650b9 in ia64_reorg () at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/config/ia64/ia64.c:9757
#15 0x00000000008c6a8a in (anonymous namespace)::pass_machine_reorg::execute
(this=<optimized out>)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/reorg.c:3952
#16 0x0000000000870673 in execute_one_pass (pass=pass@entry=0x14b53a0) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/passes.c:2336
#17 0x0000000000870bd1 in execute_pass_list_1 (pass=0x14b53a0) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/passes.c:2420
#18 0x0000000000870be3 in execute_pass_list_1 (pass=0x14b5220) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/passes.c:2421
#19 0x0000000000870be3 in execute_pass_list_1 (pass=0x14b3780) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/passes.c:2421
#20 0x0000000000870c25 in execute_pass_list (fn=<optimized out>,
pass=<optimized out>)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/passes.c:2431
#21 0x000000000060e103 in cgraph_node::expand (this=0x7fb762d692e0) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/cgraphunit.c:1982
#22 0x000000000060f449 in expand_all_functions () at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/cgraphunit.c:2118
#23 symbol_table::compile (this=this@entry=0x7fb762c8b000) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/cgraphunit.c:2474
#24 0x0000000000611107 in symbol_table::compile (this=0x7fb762c8b000)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/cgraphunit.c:2567
#25 symbol_table::finalize_compilation_unit (this=0x7fb762c8b000) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/cgraphunit.c:2564
#26 0x000000000091eb0e in compile_file () at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/toplev.c:488
#27 0x00000000004f668d in do_compile () at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/toplev.c:1986
#28 toplev::main (this=this@entry=0x7fffffffd076, argc=<optimized out>,
argc@entry=14, argv=<optimized out>, argv@entry=0x7fffffffd178)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/toplev.c:2094
#29 0x00000000004f87db in main (argc=14, argv=0x7fffffffd178) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/main.c:39
(gdb) bt full
#0 bb_note (bb=bb@entry=0x0) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/cfgrtl.c:669
note = <optimized out>
__FUNCTION__ = "bb_note"
#1 0x00000000008e221a in sel_bb_head (bb=0x0) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched-ir.c:4536
note = <optimized out>
head = <optimized out>
#2 0x00000000008ee7c9 in moveup_expr_cached (expr=0x7fffffffca00,
insn=insn@entry=0x7fb762c90798,
inside_insn_group=inside_insn_group@entry=false)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:2531
res = <optimized out>
__FUNCTION__ = "moveup_expr_cached"
#3 0x00000000008f163f in move_op_ascend (insn=0x7fb762c90798,
static_params=<optimized out>)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:6151
res = <optimized out>
sparams = <optimized out>
#4 0x00000000008f3498 in code_motion_path_driver (insn=0x7fb762c90798,
insn@entry=0x7fb762c92a80, orig_ops=<optimized out>, orig_ops@entry=0x1668ff8,
path=0x16691b8, path@entry=0x0,
local_params_in=local_params_in@entry=0x7fffffffcae0,
static_params=static_params@entry=0x7fffffffcab0)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:6648
expr = <optimized out>
bb = 0x7fb762ca2dd0
first_insn = 0x7fb762c92a80
bb_tail = <optimized out>
removed_last_insn = <optimized out>
__FUNCTION__ = "code_motion_path_driver"
#5 0x00000000008f3c32 in move_op (should_move=<synthetic pointer>,
c_expr=0x7fffffffca00, dest=<optimized out>, expr_vliw=0x1668f90,
orig_ops=0x1668ff8,
insn=0x7fb762c92a80) at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:6702
sparams = {dest = 0x0, c_expr = 0x7fffffffca00, uid = -1, failed_insn =
0x7fb762c90798, was_renamed = false}
lparams = {e1 = 0x0, e2 = 0x0, c_expr_merged = 0x1668578, c_expr_local
= 0x1668e38, old_original_insns = 0x7fb762c92a80, removed_last_insn = 0}
res = <optimized out>
#6 move_exprs_to_boundary (bnd=<optimized out>, c_expr=0x7fffffffca00,
expr_seq=0x1668ff8, expr_vliw=0x1668f90)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:5225
should_move = <optimized out>
book_uid = <optimized out>
n_bookkeeping_copies_before_moveop = 0
bi = <optimized out>
#7 schedule_expr_on_boundary (bnd=bnd@entry=0x1668ba0,
expr_vliw=expr_vliw@entry=0x1668f90, seqno=seqno@entry=-1)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:5438
expr_seq = 0x1668ff8
c_expr = 0x7fffffffca00
insn = <optimized out>
__FUNCTION__ = "schedule_expr_on_boundary"
#8 0x00000000008f673a in fill_insns (fence=fence@entry=0x1668350, seqno=-1,
scheduled_insns_tailpp=scheduled_insns_tailpp@entry=0x7fffffffcce0)
at
/usr/src/debug/cross-ia64-unknown-linux-gnu/gcc-6.3.0/gcc-6.3.0/gcc/sel-sched.c:5580
bnd = 0x1668ba0
bndsp = 0x7fffffffcc08
need_stall = <optimized out>