public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/96713] New: [11 Regression] ICE: in fold_relational_const, at fold-const.c:14921 with -fanalyzer
@ 2020-08-19 20:04 zsojka at seznam dot cz
2020-08-19 21:21 ` [Bug analyzer/96713] " dmalcolm at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: zsojka at seznam dot cz @ 2020-08-19 20:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96713
Bug ID: 96713
Summary: [11 Regression] ICE: in fold_relational_const, at
fold-const.c:14921 with -fanalyzer
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: analyzer
Assignee: dmalcolm at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Created attachment 49083
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49083&action=edit
reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-gcc -fanalyzer testcase.c
during IPA pass: analyzer
testcase.c: In function 'foo':
testcase.c:6:5: internal compiler error: in fold_relational_const, at
fold-const.c:14921
6 | d <= e;
| ~~^~~~
0x66d990 fold_relational_const
/repo/gcc-trunk/gcc/fold-const.c:14921
0xd51bfe const_binop(tree_code, tree_node*, tree_node*, tree_node*)
/repo/gcc-trunk/gcc/fold-const.c:1599
0xd44841 fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
/repo/gcc-trunk/gcc/fold-const.c:10274
0x1478486 ana::constant_svalue::eval_condition(ana::constant_svalue const*,
tree_code, ana::constant_svalue const*)
/repo/gcc-trunk/gcc/analyzer/svalue.cc:403
0x143d597 ana::region_model::eval_condition(ana::svalue const*, tree_code,
ana::svalue const*) const
/repo/gcc-trunk/gcc/analyzer/region-model.cc:1500
0x143f5ee ana::region_model::get_gassign_result(gassign const*,
ana::region_model_context*)
/repo/gcc-trunk/gcc/analyzer/region-model.cc:469
0x143f747 ana::region_model::on_assignment(gassign const*,
ana::region_model_context*)
/repo/gcc-trunk/gcc/analyzer/region-model.cc:563
0x1423070 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode
const*, gimple const*, ana::program_state*) const
/repo/gcc-trunk/gcc/analyzer/engine.cc:1029
0x14241af ana::exploded_graph::process_node(ana::exploded_node*)
/repo/gcc-trunk/gcc/analyzer/engine.cc:2526
0x1424aa2 ana::exploded_graph::process_worklist()
/repo/gcc-trunk/gcc/analyzer/engine.cc:2341
0x1426b19 ana::impl_run_checkers(ana::logger*)
/repo/gcc-trunk/gcc/analyzer/engine.cc:4107
0x14284ac ana::run_checkers()
/repo/gcc-trunk/gcc/analyzer/engine.cc:4175
0x141c5e8 execute
/repo/gcc-trunk/gcc/analyzer/analyzer-pass.cc:84
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r11-2773-20200819203610-ge6e01618e83-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r11-2773-20200819203610-ge6e01618e83-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.0.0 20200819 (experimental) (GCC)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug analyzer/96713] [11 Regression] ICE: in fold_relational_const, at fold-const.c:14921 with -fanalyzer
2020-08-19 20:04 [Bug analyzer/96713] New: [11 Regression] ICE: in fold_relational_const, at fold-const.c:14921 with -fanalyzer zsojka at seznam dot cz
@ 2020-08-19 21:21 ` dmalcolm at gcc dot gnu.org
2020-08-20 1:19 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2020-08-19 21:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96713
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
Last reconfirmed| |2020-08-19
--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks for filing this bug; confirmed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug analyzer/96713] [11 Regression] ICE: in fold_relational_const, at fold-const.c:14921 with -fanalyzer
2020-08-19 20:04 [Bug analyzer/96713] New: [11 Regression] ICE: in fold_relational_const, at fold-const.c:14921 with -fanalyzer zsojka at seznam dot cz
2020-08-19 21:21 ` [Bug analyzer/96713] " dmalcolm at gcc dot gnu.org
@ 2020-08-20 1:19 ` cvs-commit at gcc dot gnu.org
2020-08-20 1:22 ` dmalcolm at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-20 1:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96713
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>:
https://gcc.gnu.org/g:2f5951bd95e334d611f4be7bbe1a136c580f9c20
commit r11-2776-g2f5951bd95e334d611f4be7bbe1a136c580f9c20
Author: David Malcolm <dmalcolm@redhat.com>
Date: Wed Aug 19 17:36:53 2020 -0400
analyzer: fix ICE on vector comparisons [PR96713]
gcc/analyzer/ChangeLog:
PR analyzer/96713
* region-model.cc (region_model::get_gassign_result): For
comparisons, only use eval_condition when the lhs has boolean
type, and use get_or_create_constant_svalue on the boolean
constants directly rather than via get_rvalue.
gcc/testsuite/ChangeLog:
PR analyzer/96713
* gcc.dg/analyzer/pr96713.c: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug analyzer/96713] [11 Regression] ICE: in fold_relational_const, at fold-const.c:14921 with -fanalyzer
2020-08-19 20:04 [Bug analyzer/96713] New: [11 Regression] ICE: in fold_relational_const, at fold-const.c:14921 with -fanalyzer zsojka at seznam dot cz
2020-08-19 21:21 ` [Bug analyzer/96713] " dmalcolm at gcc dot gnu.org
2020-08-20 1:19 ` cvs-commit at gcc dot gnu.org
@ 2020-08-20 1:22 ` dmalcolm at gcc dot gnu.org
2020-10-28 16:32 ` cvs-commit at gcc dot gnu.org
2020-10-28 16:35 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2020-08-20 1:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96713
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Should be fixed by the above commit.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug analyzer/96713] [11 Regression] ICE: in fold_relational_const, at fold-const.c:14921 with -fanalyzer
2020-08-19 20:04 [Bug analyzer/96713] New: [11 Regression] ICE: in fold_relational_const, at fold-const.c:14921 with -fanalyzer zsojka at seznam dot cz
` (2 preceding siblings ...)
2020-08-20 1:22 ` dmalcolm at gcc dot gnu.org
@ 2020-10-28 16:32 ` cvs-commit at gcc dot gnu.org
2020-10-28 16:35 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-28 16:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96713
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:8572edc828f6d1e7c8243f901fe7c96f62a11a8e
commit r11-4490-g8572edc828f6d1e7c8243f901fe7c96f62a11a8e
Author: Patrick Palka <ppalka@redhat.com>
Date: Wed Oct 28 12:28:08 2020 -0400
libstdc++: Fix arithmetic bug in year_month_weekday conversion [PR96713]
The conversion function year_month_weekday::operator sys_days computes
the offset in days from the first weekday of the month with:
days{(index()-1)*7}
^~~~~~~~~~~~~ type 'unsigned'
We want the above to yield -7d when index() is 0u, but our 'days' alias
is based on long instead of int, so the conversion from unsigned to the
underlying type of 'days' instead yields a large positive value.
This patch fixes this by casting the result of index() to int so that
the initializer is sign-extended in the conversion to long.
The added testcase also verifies we do the right thing when index() == 5.
libstdc++-v3/ChangeLog:
PR libstdc++/96713
* include/std/chrono (year_month_weekday::operator sys_days):
Cast the result of index() to int so that the initializer for
days{} is sign-extended when it's converted to the underlying
type.
* testsuite/std/time/year_month_weekday/3.cc: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug analyzer/96713] [11 Regression] ICE: in fold_relational_const, at fold-const.c:14921 with -fanalyzer
2020-08-19 20:04 [Bug analyzer/96713] New: [11 Regression] ICE: in fold_relational_const, at fold-const.c:14921 with -fanalyzer zsojka at seznam dot cz
` (3 preceding siblings ...)
2020-10-28 16:32 ` cvs-commit at gcc dot gnu.org
@ 2020-10-28 16:35 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-10-28 16:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96713
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppalka at gcc dot gnu.org
--- Comment #5 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Whoops, meant to write PR97613...
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-28 16:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19 20:04 [Bug analyzer/96713] New: [11 Regression] ICE: in fold_relational_const, at fold-const.c:14921 with -fanalyzer zsojka at seznam dot cz
2020-08-19 21:21 ` [Bug analyzer/96713] " dmalcolm at gcc dot gnu.org
2020-08-20 1:19 ` cvs-commit at gcc dot gnu.org
2020-08-20 1:22 ` dmalcolm at gcc dot gnu.org
2020-10-28 16:32 ` cvs-commit at gcc dot gnu.org
2020-10-28 16:35 ` ppalka at gcc dot gnu.org
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).