public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/96841] New: [11 Regression] ICE: tree check: expected integer_cst, have nop_expr in to_wide, at tree.h:5904
@ 2020-08-29 6:46 asolokha at gmx dot com
2020-08-31 6:31 ` [Bug analyzer/96841] " rguenth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: asolokha at gmx dot com @ 2020-08-29 6:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96841
Bug ID: 96841
Summary: [11 Regression] ICE: tree check: expected integer_cst,
have nop_expr in to_wide, at tree.h:5904
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: analyzer
Assignee: dmalcolm at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
gcc-11.0.0-alpha20200823 snapshot (g:87c753ac241f25d222d46ba1ac66ceba89d6a200)
ICEs when compiling the following testcase w/ -O1 -fanalyzer:
int
l8 (void);
__SIZE_TYPE__
malloc (__SIZE_TYPE__);
void
th (int *);
void
bv (__SIZE_TYPE__ ny)
{
int ***mf;
while (l8 ())
{
*mf = 0;
(*mf)[ny] = (int *) malloc (sizeof (int));
th ((*mf)[ny]);
}
}
% gcc-11.0.0 -O1 -fanalyzer -w -c eswf7if4.c
during IPA pass: analyzer
eswf7if4.c:18:27: internal compiler error: tree check: expected integer_cst,
have nop_expr in to_wide, at tree.h:5904
18 | (*mf)[ny] = (int *) malloc (sizeof (int));
| ^~~~~~~~~~~~~~~~~~~~~
0x6feeda tree_check_failed(tree_node const*, char const*, int, char const*,
...)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/tree.c:9714
0x5ef958 tree_check(tree_node const*, char const*, int, char const*, tree_code)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/tree.h:3551
0x5ef958 wi::to_wide(tree_node const*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/tree.h:5904
0x5f0070 wi::to_wide(tree_node const*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/tree.h:3418
0x5f0070 pp_c_integer_constant(c_pretty_printer*, tree_node*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/c-family/c-pretty-print.c:940
0x89bb09 c_pretty_printer::unary_expression(tree_node*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/c-family/c-pretty-print.c:1801
0x80284d c_tree_printer
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/c/c-objc-common.c:317
0x80284d c_tree_printer
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/c/c-objc-common.c:254
0x18a4ef5 pp_format(pretty_printer*, text_info*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/pretty-print.c:1475
0x185826b ana::evdesc::event_desc::formatted_print(char const*, ...) const
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/pending-diagnostic.cc:63
0x1845f24 ana::warning_event::get_desc(bool) const
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/checker-path.cc:870
0x1845bc2 ana::checker_event::prepare_for_emission(ana::checker_path*,
ana::pending_diagnostic*, diagnostic_event_id_t)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/checker-path.cc:144
0x18556d1 ana::checker_path::prepare_for_emission(ana::pending_diagnostic*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/checker-path.h:498
0x18556d1 ana::diagnostic_manager::emit_saved_diagnostic(ana::exploded_graph
const&, ana::saved_diagnostic const&, ana::exploded_path const&, gimple const*,
int)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/diagnostic-manager.cc:568
0x1856fef ana::dedupe_winners::emit_best(ana::diagnostic_manager*,
ana::exploded_graph const&)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/diagnostic-manager.cc:469
0x1855a9a ana::diagnostic_manager::emit_saved_diagnostics(ana::exploded_graph
const&)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/diagnostic-manager.cc:522
0x10fa2a4 ana::impl_run_checkers(ana::logger*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/engine.cc:4121
0x10faeac ana::run_checkers()
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/engine.cc:4175
0x10ef828 execute
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/analyzer-pass.cc:84
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug analyzer/96841] [11 Regression] ICE: tree check: expected integer_cst, have nop_expr in to_wide, at tree.h:5904
2020-08-29 6:46 [Bug analyzer/96841] New: [11 Regression] ICE: tree check: expected integer_cst, have nop_expr in to_wide, at tree.h:5904 asolokha at gmx dot com
@ 2020-08-31 6:31 ` rguenth at gcc dot gnu.org
2020-09-26 1:34 ` cvs-commit at gcc dot gnu.org
2020-09-26 1:40 ` dmalcolm at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-08-31 6:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96841
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Target Milestone|--- |11.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug analyzer/96841] [11 Regression] ICE: tree check: expected integer_cst, have nop_expr in to_wide, at tree.h:5904
2020-08-29 6:46 [Bug analyzer/96841] New: [11 Regression] ICE: tree check: expected integer_cst, have nop_expr in to_wide, at tree.h:5904 asolokha at gmx dot com
2020-08-31 6:31 ` [Bug analyzer/96841] " rguenth at gcc dot gnu.org
@ 2020-09-26 1:34 ` cvs-commit at gcc dot gnu.org
2020-09-26 1:40 ` dmalcolm at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-26 1:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96841
--- Comment #1 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:29f5db8ef81fac4db8e66e5f06fdf1d469e8161c
commit r11-3471-g29f5db8ef81fac4db8e66e5f06fdf1d469e8161c
Author: David Malcolm <dmalcolm@redhat.com>
Date: Fri Sep 25 17:15:42 2020 -0400
analyzer: fix ICEs treeifying offset_region [PR96646, PR96841]
gcc/analyzer/ChangeLog:
PR analyzer/96646
PR analyzer/96841
* region-model.cc (region_model::get_representative_path_var):
When handling offset_region, wrap the MEM_REF's first argument in
an ADDR_EXPR of pointer type, rather than simply using the tree
for the parent region. Require the MEM_REF's second argument to
be an integer constant.
gcc/testsuite/ChangeLog:
PR analyzer/96646
PR analyzer/96841
* gcc.dg/analyzer/pr96646.c: New test.
* gcc.dg/analyzer/pr96841.c: New test.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug analyzer/96841] [11 Regression] ICE: tree check: expected integer_cst, have nop_expr in to_wide, at tree.h:5904
2020-08-29 6:46 [Bug analyzer/96841] New: [11 Regression] ICE: tree check: expected integer_cst, have nop_expr in to_wide, at tree.h:5904 asolokha at gmx dot com
2020-08-31 6:31 ` [Bug analyzer/96841] " rguenth at gcc dot gnu.org
2020-09-26 1:34 ` cvs-commit at gcc dot gnu.org
@ 2020-09-26 1:40 ` dmalcolm at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2020-09-26 1:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96841
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Should be fixed by the above commit.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-26 1:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-29 6:46 [Bug analyzer/96841] New: [11 Regression] ICE: tree check: expected integer_cst, have nop_expr in to_wide, at tree.h:5904 asolokha at gmx dot com
2020-08-31 6:31 ` [Bug analyzer/96841] " rguenth at gcc dot gnu.org
2020-09-26 1:34 ` cvs-commit at gcc dot gnu.org
2020-09-26 1:40 ` dmalcolm 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).