public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/97767] New: [11 Regression] ICE in extract_range_basic, at vr-values.c:1445
@ 2020-11-09 15:58 asolokha at gmx dot com
  2020-11-09 16:40 ` [Bug tree-optimization/97767] [11 Regression] ICE in extract_range_basic, at vr-values.c:1445 since r11-4532-g054d7b9f6f6816a8 marxin at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: asolokha at gmx dot com @ 2020-11-09 15:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97767
           Summary: [11 Regression] ICE in extract_range_basic, at
                    vr-values.c:1445
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-11.0.0-alpha20201101 snapshot (g:590febb5f6624f78b36402a7c9a9c318978f1efa)
ICEs when compiling gcc/testsuite/gcc.dg/builtins-66.c w/ -O1 -fstrict-enums
-ftree-vrp:

% g++-11.0.0 -O1 -fstrict-enums -ftree-vrp -c
gcc/testsuite/gcc.dg/builtins-66.c
during GIMPLE pass: evrp
gcc/testsuite/gcc.dg/builtins-66.c: In function 'int foo()':
gcc/testsuite/gcc.dg/builtins-66.c:9:1: internal compiler error: in
extract_range_basic, at vr-values.c:1445
    9 | }
      | ^
0x7fa858 vr_values::extract_range_basic(value_range_equiv*, gimple*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/vr-values.c:1445
0x19d1bf5 evrp_range_analyzer::record_ranges_from_stmt(gimple*, bool)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/gimple-ssa-evrp-analyze.c:304
0x11cd124 substitute_and_fold_dom_walker::before_dom_children(basic_block_def*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/tree-ssa-propagate.c:1099
0x199be37 dom_walker::walk(basic_block_def*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/domwalk.c:309
0x11cc1b7 substitute_and_fold_engine::substitute_and_fold(basic_block_def*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/tree-ssa-propagate.c:1283
0x19cfabe execute_early_vrp
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/gimple-ssa-evrp.c:349

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

* [Bug tree-optimization/97767] [11 Regression] ICE in extract_range_basic, at vr-values.c:1445 since r11-4532-g054d7b9f6f6816a8
  2020-11-09 15:58 [Bug tree-optimization/97767] New: [11 Regression] ICE in extract_range_basic, at vr-values.c:1445 asolokha at gmx dot com
@ 2020-11-09 16:40 ` marxin at gcc dot gnu.org
  2020-11-10  8:29 ` cvs-commit at gcc dot gnu.org
  2020-11-10  8:31 ` aldyh at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-09 16:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aldyh at gcc dot gnu.org,
                   |                            |amacleod at redhat dot com,
                   |                            |marxin at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
            Summary|[11 Regression] ICE in      |[11 Regression] ICE in
                   |extract_range_basic, at     |extract_range_basic, at
                   |vr-values.c:1445            |vr-values.c:1445 since
                   |                            |r11-4532-g054d7b9f6f6816a8
   Target Milestone|---                         |11.0
   Last reconfirmed|                            |2020-11-09
           Priority|P3                          |P1
      Known to fail|                            |11.0
     Ever confirmed|0                           |1
      Known to work|                            |10.2.0

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r11-4532-g054d7b9f6f6816a8.

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

* [Bug tree-optimization/97767] [11 Regression] ICE in extract_range_basic, at vr-values.c:1445 since r11-4532-g054d7b9f6f6816a8
  2020-11-09 15:58 [Bug tree-optimization/97767] New: [11 Regression] ICE in extract_range_basic, at vr-values.c:1445 asolokha at gmx dot com
  2020-11-09 16:40 ` [Bug tree-optimization/97767] [11 Regression] ICE in extract_range_basic, at vr-values.c:1445 since r11-4532-g054d7b9f6f6816a8 marxin at gcc dot gnu.org
@ 2020-11-10  8:29 ` cvs-commit at gcc dot gnu.org
  2020-11-10  8:31 ` aldyh at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-10  8:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:3d3470e239e8040f642a8852721b4962b4ed36f2

commit r11-4864-g3d3470e239e8040f642a8852721b4962b4ed36f2
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Mon Nov 9 20:35:25 2020 +0100

    Normalize VARYING for -fstrict-enums.

    The problem here is that the representation for VARYING in
    -fstrict-enums is different between value_range and irange.

    The helper function irange::normalize_min_max() will normalize to
    VARYING only if setting the range to the entire domain of the
    underlying type.  That is, [0, 0xff..ff], not the domain as defined by
    -fstrict-enums.  This causes problems because the multi-range version
    of varying_p() will return true if the range is the domain as defined
    by -fstrict-enums.  Thus, normalize_min_max and varying_p have
    different concepts of varying for multi-ranges.

    (BTW, legacy ranges are different because they never look at the
    extremes of a range to determine varying-ness.  They only look at the
    kind field.)

    One approach is to change all the code to limit ranges to the domain
    in the -fstrict-enums world, but this won't work because there are
    various instances of gimple where the values assigned or compared are
    beyond the limits of TYPE_{MIN,MAX}_VALUE.  One example is the
    addition of 0xffffffff to represent subtraction.

    This patch fixes multi-range varying_p() and set_varying() to agree
    with the normalization code, using the extremes of the underlying type,
    to represent varying.

    gcc/ChangeLog:

            PR tree-optimization/97767
            * value-range.cc (dump_bound_with_infinite_markers): Use
            wi::min_value and wi::max_value.
            (range_tests_strict_enum): New.
            (range_tests): Call range_tests_strict_enum.
            * value-range.h (irange::varying_p): Use wi::min_value
            and wi::max_value.
            (irange::set_varying): Same.
            (irange::normalize_min_max): Remove comment.

    gcc/testsuite/ChangeLog:

            * g++.dg/opt/pr97767.C: New test.

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

* [Bug tree-optimization/97767] [11 Regression] ICE in extract_range_basic, at vr-values.c:1445 since r11-4532-g054d7b9f6f6816a8
  2020-11-09 15:58 [Bug tree-optimization/97767] New: [11 Regression] ICE in extract_range_basic, at vr-values.c:1445 asolokha at gmx dot com
  2020-11-09 16:40 ` [Bug tree-optimization/97767] [11 Regression] ICE in extract_range_basic, at vr-values.c:1445 since r11-4532-g054d7b9f6f6816a8 marxin at gcc dot gnu.org
  2020-11-10  8:29 ` cvs-commit at gcc dot gnu.org
@ 2020-11-10  8:31 ` aldyh at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: aldyh at gcc dot gnu.org @ 2020-11-10  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
fixed

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

end of thread, other threads:[~2020-11-10  8:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 15:58 [Bug tree-optimization/97767] New: [11 Regression] ICE in extract_range_basic, at vr-values.c:1445 asolokha at gmx dot com
2020-11-09 16:40 ` [Bug tree-optimization/97767] [11 Regression] ICE in extract_range_basic, at vr-values.c:1445 since r11-4532-g054d7b9f6f6816a8 marxin at gcc dot gnu.org
2020-11-10  8:29 ` cvs-commit at gcc dot gnu.org
2020-11-10  8:31 ` aldyh 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).