Bug 115680 - ICE in on_ranges, at analyzer/constraint-manager.cc:3166
Summary: ICE in on_ranges, at analyzer/constraint-manager.cc:3166
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: analyzer (show other bugs)
Version: 14.1.0
: P3 normal
Target Milestone: ---
Assignee: David Malcolm
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-27 10:55 UTC by Jeremy
Modified: 2024-06-27 13:29 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2024-06-27 00:00:00


Attachments
.s containing machine details (52.69 KB, text/plain)
2024-06-27 10:55 UTC, Jeremy
Details
.i file from save-temps containing pre-processed source (52.69 KB, text/plain)
2024-06-27 10:56 UTC, Jeremy
Details
Correct .s file with machine details (65 bytes, text/plain)
2024-06-27 11:07 UTC, Jeremy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy 2024-06-27 10:55:39 UTC
Created attachment 58530 [details]
.s containing machine details
Comment 1 Jeremy 2024-06-27 10:56:54 UTC
Created attachment 58531 [details]
.i file from save-temps containing pre-processed source
Comment 2 Jeremy 2024-06-27 10:58:22 UTC
gcc -std=gnu23 g.c -DEDITOR=0 -O3 -Wall -Wextra -Wconversion -Wunused -Wuninitialized -Wcast-qual -Wcast-align -Werror -march=native -mcpu=native -mtune=native -pipe -funsigned-char -fwrapv -ffinite-math-only -mcmodel=tiny -mlittle-endian -momit-leaf-frame-pointer -frename-registers -mno-low-precision-recip-sqrt -mno-low-precision-sqrt -mno-low-precision-div -mno-track-speculation -mpc-relative-literal-loads -mbranch-protection=none -mno-fix-cortex-a53-835769 -mno-fix-cortex-a53-843419 -fcf-protection=none -mearly-ra=all -mearly-ldp-fusion -mlate-ldp-fusion --param=aarch64-ldp-policy=always --param=aarch64-stp-policy=always --param case-values-threshold=6 -fwhole-program -fdelete-null-pointer-checks -fallow-store-data-races -fno-math-errno -fno-reciprocal-math -fno-trapping-math -fno-rounding-math -falign-jumps -ffp-contract=fast -fmerge-all-constants -fomit-frame-pointer -freg-struct-return -foptimize-strlen -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-stack-protector -Wno-clobbered -Wno-char-subscripts -Wno-implicit-fallthrough -ftree-vrp -Wduplicated-branches -Wduplicated-cond -Wpointer-arith -Wnested-externs -Wundef -Wfloat-conversion -Wsign-conversion -Warith-conversion -Wnarrowing -Wsign-compare -Winline -Woverflow -Wmissing-include-dirs -Wredundant-decls -Wunused-macros -Wformat-truncation=2 -Woverlength-strings -Wdisabled-optimization -Wnormalized -Wformat=2 -Wformat-overflow=2 -Wrestrict -Wshift-overflow=2 -Wpacked -Wnull-dereference -Wmain -Wstringop-truncation -Wstringop-overflow=4 -Wstringop-overread -Winit-self -Wmultichar -Wstrict-prototypes -Wreturn-local-addr -Wlogical-op -Wwrite-strings -Warray-bounds=2 -Wformat-signedness -Wstrict-overflow=5 -Walloc-zero -Wdiscarded-qualifiers -fanalyzer -fstrict-aliasing -Wstrict-aliasing=3 -Wdouble-promotion -Wunsafe-loop-optimizations -Wtrampolines -Wbad-function-cast -Wcast-align=strict -Waddress-of-packed-member -Wsuggest-attribute=malloc -Wsuggest-attribute=const -Wsuggest-attribute=noreturn -fstrict-flex-arrays=3 -Wxor-used-as-pow -Wdiscarded-array-qualifiers -Wenum-int-mismatch -Wmissing-noreturn -Wflex-array-member-not-at-end -Wno-format-nonliteral -freport-bug -save-temps -o /dev/null -lm -lreadline
gcc: warning: ‘-pipe’ ignored because ‘-save-temps’ specified
during IPA pass: analyzer
g.c:5629:10: internal compiler error: in on_ranges, at analyzer/constraint-manager.cc:3166
 5629 |   return c1;
      |          ^~
0x1ab264b ana::merger_fact_visitor::on_ranges(ana::svalue const*, ana::bounded_ranges const*)
	../../gcc/analyzer/constraint-manager.cc:3166
0x1ab264b ana::merger_fact_visitor::on_ranges(ana::svalue const*, ana::bounded_ranges const*)
	../../gcc/analyzer/constraint-manager.cc:3146
0x1aadc33 ana::constraint_manager::for_each_fact(ana::fact_visitor*) const
	../../gcc/analyzer/constraint-manager.cc:3252
0x1aadd43 ana::constraint_manager::merge(ana::constraint_manager const&, ana::constraint_manager const&, ana::constraint_manager*)
	../../gcc/analyzer/constraint-manager.cc:3193
0x111c62b ana::region_model::can_merge_with_p(ana::region_model const&, ana::program_point const&, ana::region_model*, ana::extrinsic_state const*, ana::program_state const*, ana::program_state const*) const
	../../gcc/analyzer/region-model.cc:6222
0x1109dcb ana::program_state::can_merge_with_p(ana::program_state const&, ana::extrinsic_state const&, ana::program_point const&, ana::program_state*) const
	../../gcc/analyzer/program-state.cc:1468
0x10ea973 ana::exploded_graph::maybe_process_run_of_before_supernode_enodes(ana::exploded_node*)
	../../gcc/analyzer/engine.cc:3683
0x10ec2d7 ana::exploded_graph::process_worklist()
	../../gcc/analyzer/engine.cc:3385
0x10ee377 ana::impl_run_checkers(ana::logger*)
	../../gcc/analyzer/engine.cc:6210
0x10ef2bb ana::run_checkers()
	../../gcc/analyzer/engine.cc:6308
0x10dfdef execute
	../../gcc/analyzer/analyzer-pass.cc:87
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Preprocessed source stored into /tmp/ccsQUmhZ.out file, please attach this to your bugreport.
make: *** [makefile:269: lint] Error 1
Comment 3 Jeremy 2024-06-27 11:02:13 UTC
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/aarch64-unknown-linux-gnu/14.1.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: ../configure --with-cpu=cortex-a76
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.1.0 (GCC)
Comment 4 Jeremy 2024-06-27 11:05:51 UTC
Comment on attachment 58530 [details]
.s containing machine details

	.arch armv8.2-a+dotprod+crc+crypto+fp16+rcpc
	.file	"g.c"
Comment 5 Jeremy 2024-06-27 11:07:44 UTC
Created attachment 58532 [details]
Correct .s file with machine details
Comment 6 David Malcolm 2024-06-27 13:29:22 UTC
Thanks for filing this bug report.

Minimal args to reproduce the ICE with attachment 58531 [details] seem to be:
  -fanalyzer -ftree-vrp -std=gnu23 -O1
(https://godbolt.org/z/P6T91PzWf)