public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/97462] New: ICE in op1_range, at range-op.cc:1580 (-Os and above)
@ 2020-10-16 16:10 su at cs dot ucdavis.edu
  2020-10-16 16:43 ` [Bug tree-optimization/97462] " amacleod at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: su at cs dot ucdavis.edu @ 2020-10-16 16:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97462

            Bug ID: 97462
           Summary: ICE in op1_range, at range-op.cc:1580 (-Os and above)
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

[554] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20201016 (experimental) [master revision
37753588116:be453072dd2:6c6e0cafa38cee8309f37b846cb7db813a472a54] (GCC) 
[555] % 
[555] % gcctk -O1 -c -w small.c
[556] % gcctk -Os -c -w small.c
during GIMPLE pass: evrp
small.c: In function ‘d’:
small.c:7:1: internal compiler error: in op1_range, at range-op.cc:1580
    7 | }
      | ^
0x7d0131 operator_lshift::op1_range(irange&, tree_node*, irange const&, irange
const&) const
        ../../gcc-trunk/gcc/range-op.cc:1580
0x1867d23 gori_compute::compute_name_range_op(irange&, gimple*, irange const&,
tree_node*)
        ../../gcc-trunk/gcc/gimple-range-gori.cc:494
0x186b139 gori_compute::compute_operand_range(irange&, gimple*, irange const&,
tree_node*)
        ../../gcc-trunk/gcc/gimple-range-gori.cc:575
0x186b139 gori_compute_cache::compute_operand_range(irange&, gimple*, irange
const&, tree_node*)
        ../../gcc-trunk/gcc/gimple-range-gori.cc:1271
0x1868729 gori_compute::compute_operand1_range(irange&, gimple*, irange const&,
tree_node*)
        ../../gcc-trunk/gcc/gimple-range-gori.cc:903
0x186b139 gori_compute::compute_operand_range(irange&, gimple*, irange const&,
tree_node*)
        ../../gcc-trunk/gcc/gimple-range-gori.cc:575
0x186b139 gori_compute_cache::compute_operand_range(irange&, gimple*, irange
const&, tree_node*)
        ../../gcc-trunk/gcc/gimple-range-gori.cc:1271
0x186a1cf gori_compute::outgoing_edge_range_p(irange&, edge_def*, tree_node*)
        ../../gcc-trunk/gcc/gimple-range-gori.cc:1002
0x186632e ranger_cache::iterative_cache_update(tree_node*)
        ../../gcc-trunk/gcc/gimple-range-cache.cc:636
0x186681a ranger_cache::fill_block_cache(tree_node*, basic_block_def*,
basic_block_def*)
        ../../gcc-trunk/gcc/gimple-range-cache.cc:808
0x1866fbd ranger_cache::block_range(irange&, basic_block_def*, tree_node*,
bool)
        ../../gcc-trunk/gcc/gimple-range-cache.cc:589
0x185fe61 gimple_ranger::range_on_entry(irange&, basic_block_def*, tree_node*)
        ../../gcc-trunk/gcc/gimple-range.cc:909
0x1860577 gimple_ranger::range_of_expr(irange&, tree_node*, gimple*)
        ../../gcc-trunk/gcc/gimple-range.cc:880
0x108b86d range_query::value_of_expr(tree_node*, gimple*)
        ../../gcc-trunk/gcc/value-query.cc:85
0x17148b1 hybrid_folder::value_of_expr(tree_node*, gimple*)
        ../../gcc-trunk/gcc/gimple-ssa-evrp.c:235
0xf456d3 substitute_and_fold_engine::replace_uses_in(gimple*)
        ../../gcc-trunk/gcc/tree-ssa-propagate.c:871
0xf459ec substitute_and_fold_dom_walker::before_dom_children(basic_block_def*)
        ../../gcc-trunk/gcc/tree-ssa-propagate.c:1141
0x16ec3b7 dom_walker::walk(basic_block_def*)
        ../../gcc-trunk/gcc/domwalk.c:309
0xf44e65 substitute_and_fold_engine::substitute_and_fold(basic_block_def*)
        ../../gcc-trunk/gcc/tree-ssa-propagate.c:1283
0x1714526 execute_early_vrp
        ../../gcc-trunk/gcc/gimple-ssa-evrp.c:340
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.
[557] % 
[557] % cat small.c
int a, b;

void d ()
{
  a << ~0 && b;
  b = a;
}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug tree-optimization/97462] ICE in op1_range, at range-op.cc:1580 (-Os and above)
  2020-10-16 16:10 [Bug tree-optimization/97462] New: ICE in op1_range, at range-op.cc:1580 (-Os and above) su at cs dot ucdavis.edu
@ 2020-10-16 16:43 ` amacleod at redhat dot com
  2020-10-16 19:05 ` cvs-commit at gcc dot gnu.org
  2020-10-19  7:14 ` marxin at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: amacleod at redhat dot com @ 2020-10-16 16:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97462

Andrew Macleod <amacleod at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com

--- Comment #1 from Andrew Macleod <amacleod at redhat dot com> ---
Created attachment 49390
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49390&action=edit
return false, not assert on negative shifts

Development assert should be changed to returning "false" indicating we wont
try to look through negative shifts.

patch being tested

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug tree-optimization/97462] ICE in op1_range, at range-op.cc:1580 (-Os and above)
  2020-10-16 16:10 [Bug tree-optimization/97462] New: ICE in op1_range, at range-op.cc:1580 (-Os and above) su at cs dot ucdavis.edu
  2020-10-16 16:43 ` [Bug tree-optimization/97462] " amacleod at redhat dot com
@ 2020-10-16 19:05 ` cvs-commit at gcc dot gnu.org
  2020-10-19  7:14 ` marxin at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-16 19:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97462

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andrew Macleod <amacleod@gcc.gnu.org>:

https://gcc.gnu.org/g:4a135bd987e7bff6d3b94efa085e0c246348b486

commit r11-4016-g4a135bd987e7bff6d3b94efa085e0c246348b486
Author: Andrew MacLeod <amacleod@redhat.com>
Date:   Fri Oct 16 15:02:42 2020 -0400

    Don't assert on a negative shift.

    Don't assert, simply Return false for negative shifts as we can't tell
    anything about the operand.

            PR tree-optimization/97462
            gcc/
            * range-op.cc (operator_lshift::op1_range): Don't trap on negative
            shifts.
            gcc/testsuite/
            * gcc.dg/pr97462.c: New file.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug tree-optimization/97462] ICE in op1_range, at range-op.cc:1580 (-Os and above)
  2020-10-16 16:10 [Bug tree-optimization/97462] New: ICE in op1_range, at range-op.cc:1580 (-Os and above) su at cs dot ucdavis.edu
  2020-10-16 16:43 ` [Bug tree-optimization/97462] " amacleod at redhat dot com
  2020-10-16 19:05 ` cvs-commit at gcc dot gnu.org
@ 2020-10-19  7:14 ` marxin at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-19  7:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97462

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
I guess it's fixed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-19  7:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16 16:10 [Bug tree-optimization/97462] New: ICE in op1_range, at range-op.cc:1580 (-Os and above) su at cs dot ucdavis.edu
2020-10-16 16:43 ` [Bug tree-optimization/97462] " amacleod at redhat dot com
2020-10-16 19:05 ` cvs-commit at gcc dot gnu.org
2020-10-19  7:14 ` marxin 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).