Bug 110526 - ICE: Segmentation fault in moving_insn_creates_bookkeeping_block_p
Summary: ICE: Segmentation fault in moving_insn_creates_bookkeeping_block_p
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 13.1.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks: selective-scheduling
  Show dependency treegraph
 
Reported: 2023-07-03 02:40 UTC by CTC
Modified: 2023-07-03 07:15 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
The preprocessed file (38.05 KB, text/plain)
2023-07-03 02:50 UTC, CTC
Details
The compiler output (10.02 KB, text/plain)
2023-07-03 02:50 UTC, CTC
Details

Note You need to log in before you can comment on or make changes to this bug.
Description CTC 2023-07-03 02:40:57 UTC

    
Comment 1 CTC 2023-07-03 02:43:43 UTC
*******************************************************************************
OS and Platform:
CentOS Linux release 7.9.2009 (Core), x86_64 GNU/Linux
*******************************************************************************
gcc -v
Using built-in specs.
COLLECT_GCC=/home/gcc-releases/gcc-13-0701/bin/gcc
COLLECT_LTO_WRAPPER=/home/gcc-releases/gcc-13-0701/libexec/gcc/x86_64-pc-linux-gnu/13.1.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ./configure --prefix=/home/gcc-releases/gcc-13-0701/ --disable-multilib --enable-languages=c,c++
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.1.1 20230701 (GCC)
*******************************************************************************
Command Lines:
/home/gcc-releases/gcc-13-0701/bin/gcc -I /home/csmith_record/include/csmith-2.3.0/  -O3 -fno-aggressive-loop-optimizations -fno-align-functions -fno-align-jumps -fno-align-labels -fno-align-loops -fno-allocation-dce -fno-asynchronous-unwind-tables -fno-auto-inc-dec -fno-bit-tests -fno-branch-count-reg -fno-caller-saves -fno-code-hoisting -fno-combine-stack-adjustments -fno-compare-elim -fno-cprop-registers -fno-crossjumping -fno-cse-follow-jumps -fno-dce -fno-defer-pop -fno-devirtualize -fno-devirtualize-speculatively -fno-dse -fno-early-inlining -fno-expensive-optimizations -fno-forward-propagate -fno-fp-int-builtin-inexact -fno-function-cse -fno-gcse -fno-gcse-after-reload -fno-gcse-lm -fno-guess-branch-probability -fno-hoist-adjacent-loads -fno-if-conversion -fno-if-conversion2 -fno-indirect-inlining -fno-inline -fno-inline-atomics -fno-inline-functions -fno-inline-functions-called-once -fno-inline-small-functions -fno-ipa-bit-cp -fno-ipa-cp -fno-ipa-cp-clone -fno-ipa-icf -fno-ipa-icf-functions -fno-ipa-icf-variables -fno-ipa-modref -fno-ipa-profile -fno-ipa-pure-const -fno-ipa-ra -fno-ipa-reference -fno-ipa-reference-addressable -fno-ipa-sra -fno-ipa-stack-alignment -fno-ipa-strict-aliasing -fno-ipa-vrp -fno-ira-hoist-pressure -fno-ira-share-save-slots -fno-ira-share-spill-slots -fno-isolate-erroneous-paths-dereference -fno-ivopts -fno-jump-tables -fno-lifetime-dse -fno-loop-interchange -fno-loop-unroll-and-jam -fno-lra-remat -fno-math-errno -fno-move-loop-invariants -fno-move-loop-stores -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-optimize-strlen -fno-partial-inlining -fno-peel-loops -fno-peephole -fno-peephole2 -fno-plt -fno-predictive-commoning -fno-printf-return-value -fno-ree -fno-reg-struct-return -fno-reorder-blocks -fno-reorder-blocks-and-partition -fno-reorder-functions -fno-rerun-cse-after-loop -fno-sched-critical-path-heuristic -fno-sched-dep-count-heuristic -fno-sched-group-heuristic -fno-sched-interblock -fno-sched-last-insn-heuristic -fno-sched-rank-heuristic -fno-sched-spec -fno-sched-spec-insn-heuristic -fno-sched-stalled-insns-dep -fno-schedule-fusion -fno-schedule-insns2 -fno-semantic-interposition -fno-short-enums -fno-shrink-wrap -fno-shrink-wrap-separate -fno-signed-zeros -fno-split-ivs-in-unroller -fno-split-loops -fno-split-paths -fno-split-wide-types -fno-ssa-backprop -fno-ssa-phiopt -fno-stdarg-opt -fno-store-merging -fno-strict-aliasing -fno-thread-jumps -fno-toplevel-reorder -fno-trapping-math -fno-tree-bit-ccp -fno-tree-builtin-call-dce -fno-tree-ccp -fno-tree-ch -fno-tree-coalesce-vars -fno-tree-copy-prop -fno-tree-dce -fno-tree-dominator-opts -fno-tree-dse -fno-tree-forwprop -fno-tree-fre -fno-tree-loop-distribute-patterns -fno-tree-loop-distribution -fno-tree-loop-im -fno-tree-loop-ivcanon -fno-tree-loop-optimize -fno-tree-loop-vectorize -fno-tree-partial-pre -fno-tree-phiprop -fno-tree-pre -fno-tree-pta -fno-tree-reassoc -fno-tree-scev-cprop -fno-tree-sink -fno-tree-slp-vectorize -fno-tree-slsr -fno-tree-sra -fno-tree-switch-conversion -fno-tree-tail-merge -fno-tree-ter -fno-tree-vrp -fno-unroll-completely-grow-size -fno-unroll-loops -fno-unswitch-loops -fno-unwind-tables -fno-version-loops-for-strides -fno-allow-store-data-races -fno-associative-math -fno-branch-probabilities -fno-conserve-stack -fno-cx-fortran-rules -fno-cx-limited-range -fno-delayed-branch -fno-delete-dead-exceptions -fno-finite-loops -fno-finite-math-only -fno-float-store -fno-gcse-las -fno-gcse-sm -fno-graphite -fno-graphite-identity -fno-harden-compares -fno-harden-conditional-branches -fno-ipa-pta -fno-ira-loop-pressure -fno-isolate-erroneous-paths-attribute -fno-keep-gc-roots-live -fno-limit-function-alignment -fno-live-range-shrinkage -fno-loop-nest-optimize -fno-loop-parallelize-all -fno-modulo-sched -fno-modulo-sched-allow-regmoves -fno-non-call-exceptions -fno-opt-info -fno-pack-struct -fno-profile-partial-training -fno-profile-reorder-functions -fno-reciprocal-math -fno-rename-registers -fno-reschedule-modulo-scheduled-loops -fno-rounding-math -fno-save-optimization-record -fno-sched-pressure -fno-sched-spec-load -fno-sched-spec-load-dangerous -fno-sched-stalled-insns -fno-sched2-use-superblocks -fno-schedule-insns -fno-section-anchors -fno-sel-sched-pipelining -fno-sel-sched-pipelining-outer-loops -fno-sel-sched-reschedule-pipelined -fno-selective-scheduling -fno-selective-scheduling2 -fno-short-wchar -fno-signaling-nans -fno-single-precision-constant -fno-split-wide-types-early -fno-stack-clash-protection -fno-tracer -fno-trapv -fno-tree-cselim -fno-tree-lrs -fno-tree-vectorize -fno-unconstrained-commons -fno-unreachable-traps -fno-unroll-all-loops -fno-unsafe-math-optimizations -fno-var-tracking -fno-var-tracking-assignments -fno-var-tracking-assignments-toggle -fno-var-tracking-uninit -fno-variable-expansion-in-unroller -fno-vpt -fno-web -fno-wrapv -fno-wrapv-pointer -gno-statement-frontiers -finline -finline-functions-called-once -fmove-loop-invariants -fsched-interblock -fshrink-wrap-separate -fno-signed-zeros -fsplit-ivs-in-unroller -fsplit-loops -fno-split-paths -fsplit-wide-types -fssa-backprop -fno-ssa-phiopt -fno-stdarg-opt -fno-store-merging -fstrict-aliasing -fno-thread-jumps -ftoplevel-reorder -ftrapping-math -fno-tree-bit-ccp -fno-tree-builtin-call-dce -fno-tree-ccp -ftree-ch -ftree-coalesce-vars -fno-tree-copy-prop -ftree-dce -fno-tree-dominator-opts -ftree-dse -fno-tree-forwprop -fno-tree-fre -ftree-loop-distribute-patterns -fno-tree-loop-distribution -fno-tree-loop-im -ftree-loop-ivcanon -ftree-loop-optimize -ftree-loop-vectorize -fno-tree-partial-pre -ftree-phiprop -fno-tree-pre -fno-tree-pta -fno-tree-reassoc -ftree-scev-cprop -fno-tree-sink -fno-tree-slp-vectorize -fno-tree-slsr -ftree-sra -ftree-switch-conversion -ftree-tail-merge -fno-tree-ter -fno-tree-vrp -funroll-completely-grow-size -funroll-loops -funswitch-loops -funwind-tables -fno-version-loops-for-strides -fallow-store-data-races -fno-associative-math -fno-branch-probabilities -fno-conserve-stack -fcx-fortran-rules -fno-cx-limited-range -fno-delayed-branch -fdelete-dead-exceptions -fno-finite-loops -ffinite-math-only -ffloat-store -fgcse-las -fno-gcse-sm -fno-graphite -fgraphite-identity -fharden-compares -fno-harden-conditional-branches -fipa-pta -fira-loop-pressure -fno-isolate-erroneous-paths-attribute -fkeep-gc-roots-live -flimit-function-alignment -fno-live-range-shrinkage -fno-loop-nest-optimize -fno-loop-parallelize-all -fno-modulo-sched -fmodulo-sched-allow-regmoves -fnon-call-exceptions -fopt-info -fpack-struct -fno-profile-partial-training -fno-profile-reorder-functions -fno-reciprocal-math -frename-registers -fno-reschedule-modulo-scheduled-loops -frounding-math -fno-save-optimization-record -fno-sched-pressure -fno-sched-spec-load -fno-sched-spec-load-dangerous -fsched-stalled-insns -fno-sched2-use-superblocks -fschedule-insns -fno-section-anchors -fsel-sched-pipelining -fno-sel-sched-pipelining-outer-loops -fsel-sched-reschedule-pipelined -fselective-scheduling -fno-selective-scheduling2 -fno-short-wchar -fno-signaling-nans -fsingle-precision-constant -fsplit-wide-types-early -fno-stack-clash-protection -fno-tracer -fno-trapv -fno-tree-cselim -ftree-lrs -ftree-vectorize -fno-unconstrained-commons -funreachable-traps -funroll-all-loops -fno-unsafe-math-optimizations -fvar-tracking -fno-var-tracking-assignments -fvar-tracking-assignments-toggle -fno-var-tracking-uninit -fno-variable-expansion-in-unroller -fno-vpt -fweb -fwrapv -fno-wrapv-pointer -gstatement-frontiers ./big.c 
*******************************************************************************
Error Messages:
internal compiler error: Segmentation fault
  466 | }
      | ^
0xcbeddf crash_signal
	../.././gcc/toplev.cc:314
0xc88564 moving_insn_creates_bookkeeping_block_p
	../.././gcc/sel-sched.cc:2031
0xc88564 moveup_expr
	../.././gcc/sel-sched.cc:2199
0xc88564 moveup_expr_cached
	../.././gcc/sel-sched.cc:2544
0xc8d55e move_op_ascend
	../.././gcc/sel-sched.cc:6149
0xc8a9bf code_motion_path_driver
	../.././gcc/sel-sched.cc:6648
0xc8ae56 code_motion_process_successors
	../.././gcc/sel-sched.cc:6342
0xc8ae56 code_motion_path_driver
	../.././gcc/sel-sched.cc:6608
0xc8d7a9 move_op
	../.././gcc/sel-sched.cc:6702
0xc8d7a9 move_exprs_to_boundary
	../.././gcc/sel-sched.cc:5223
0xc8d7a9 schedule_expr_on_boundary
	../.././gcc/sel-sched.cc:5436
0xc8ec69 fill_insns
	../.././gcc/sel-sched.cc:5578
0xc8ec69 schedule_on_fences
	../.././gcc/sel-sched.cc:7353
0xc8ec69 sel_sched_region_2
	../.././gcc/sel-sched.cc:7491
0xc9085b sel_sched_region_1
	../.././gcc/sel-sched.cc:7533
0xc921f7 sel_sched_region(int)
	../.././gcc/sel-sched.cc:7634
0xc921f7 sel_sched_region(int)
	../.././gcc/sel-sched.cc:7619
0xc929b9 run_selective_scheduling()
	../.././gcc/sel-sched.cc:7720
0xc7709c rest_of_handle_sched
	../.././gcc/sched-rgn.cc:3729
0xc7709c execute
	../.././gcc/sched-rgn.cc:3841
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Comment 2 CTC 2023-07-03 02:50:05 UTC
Created attachment 55458 [details]
The preprocessed file
Comment 3 CTC 2023-07-03 02:50:23 UTC
Created attachment 55459 [details]
The compiler output
Comment 4 Andrew Pinski 2023-07-03 02:56:09 UTC
Thanks for these bug reports, they are very useful. I will note -fselective-scheduling is one of the less tested parts of GCC as it is not default for any target except for ia64 (and ia64 is one of the least tested targets really). So don't be shocked that most of these -fselective-scheduling issues are not fixed any time soon and don't be shocked when these issues are closed as won't fix when -fselective-scheduling support is removed .