public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/97560] New: [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708
@ 2020-10-24  8:50 asolokha at gmx dot com
  2020-10-24  8:57 ` [Bug tree-optimization/97560] " jakub at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: asolokha at gmx dot com @ 2020-10-24  8:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97560
           Summary: [11 Regression] ICE: tree check: expected tree that
                    contains 'decl common' structure, have 'component_ref'
                    in tree_could_trap_p, at tree-eh.c:2708
           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-alpha20201018 snapshot (g:1e70b1a358b6ce3b894f284d88fbb90518d45cc0)
ICEs when compiling the following testcase, reduced from
test/libcxx/containers/sequences/list/list.cons/db_move.pass.cpp from the
libcxx 10.0.1 test suite, w/ -O2 -fno-tree-forwprop -fnon-call-exceptions:

template <typename>
struct pv;

template <typename CY>
struct pv<CY &> {
  typedef CY g7;
};

template <typename Q6>
typename pv<Q6>::g7 hq (Q6 &&lb)
{
  return static_cast<typename pv<Q6>::g7 &&> (lb);
}

struct fk {
  fk *j6;
  fk *od;
};

fk *qi;

struct xz : fk {
  xz (xz &&)
  {
    qi = this;

    if (j6)
      od = this;
  }
};

struct el {
  struct {
    xz ls;
  } eu;
};

struct be : el {
};

be l1 = hq (l1);

% g++-11.0.0 -O2 -fno-tree-forwprop -fnon-call-exceptions -c um06grxw.cpp
during GIMPLE pass: evrp
um06grxw.cpp: In function 'void __static_initialization_and_destruction_0(int,
int)':
um06grxw.cpp:41:16: internal compiler error: tree check: expected tree that
contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at
tree-eh.c:2708
   41 | be l1 = hq (l1);
      |                ^
0x7e046c tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/tree.c:9903
0x785391 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/tree.h:3417
0x785391 tree_could_trap_p(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/tree-eh.c:2708
0x1087624 stmt_could_throw_1_p
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/tree-eh.c:2868
0x1087624 stmt_could_throw_p(function*, gimple*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/tree-eh.c:2922
0x1089035 stmt_could_throw_p(function*, gimple*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/tree-eh.c:2894
0x1089035 stmt_can_throw_internal(function*, gimple*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/tree-eh.c:2996
0x12ca68a infer_value_range(gimple*, tree_node*, tree_code*, tree_node**)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/tree-vrp.c:1331
0x1b1d42f non_null_ref::process_name(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/gimple-range-cache.cc:102
0x1b1d544 non_null_ref::non_null_deref_p(tree_node*, basic_block_def*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/gimple-range-cache.cc:60
0x1b1d544 non_null_ref::non_null_deref_p(tree_node*, basic_block_def*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/gimple-range-cache.cc:53
0x1b1eda9 ranger_cache::ssa_range_in_bb(irange&, tree_node*, basic_block_def*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/gimple-range-cache.cc:555
0x1b1f0cd ranger_cache::iterative_cache_update(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/gimple-range-cache.cc:638
0x1b1f5f2 ranger_cache::fill_block_cache(tree_node*, basic_block_def*,
basic_block_def*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/gimple-range-cache.cc:808
0x1b1fda6 ranger_cache::block_range(irange&, basic_block_def*, tree_node*,
bool)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/gimple-range-cache.cc:589
0x1b18784 gimple_ranger::range_on_entry(irange&, basic_block_def*, tree_node*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/gimple-range.cc:909
0x1b18eeb gimple_ranger::range_of_expr(irange&, tree_node*, gimple*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/gimple-range.cc:880
0x130cb4d range_query::value_of_expr(tree_node*, gimple*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/value-query.cc:85
0x19b4831 hybrid_folder::value_of_expr(tree_node*, gimple*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/gimple-ssa-evrp.c:235
0x11c0594 substitute_and_fold_engine::replace_uses_in(gimple*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/tree-ssa-propagate.c:871

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

* [Bug tree-optimization/97560] [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708
  2020-10-24  8:50 [Bug tree-optimization/97560] New: [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 asolokha at gmx dot com
@ 2020-10-24  8:57 ` jakub at gcc dot gnu.org
  2020-10-24  8:59 ` [Bug tree-optimization/97560] [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 since r11-3685 jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-10-24  8:57 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
                 CC|                            |aldyh at gcc dot gnu.org,
                   |                            |amacleod at redhat dot com,
                   |                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |11.0

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

* [Bug tree-optimization/97560] [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 since r11-3685
  2020-10-24  8:50 [Bug tree-optimization/97560] New: [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 asolokha at gmx dot com
  2020-10-24  8:57 ` [Bug tree-optimization/97560] " jakub at gcc dot gnu.org
@ 2020-10-24  8:59 ` jakub at gcc dot gnu.org
  2020-10-24 16:26 ` aldyh at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-10-24  8:59 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-10-24
            Summary|[11 Regression] ICE: tree   |[11 Regression] ICE: tree
                   |check: expected tree that   |check: expected tree that
                   |contains 'decl common'      |contains 'decl common'
                   |structure, have             |structure, have
                   |'component_ref' in          |'component_ref' in
                   |tree_could_trap_p, at       |tree_could_trap_p, at
                   |tree-eh.c:2708              |tree-eh.c:2708 since
                   |                            |r11-3685
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r11-3685-gfcae5121154d1c3382b056bcc2c563cedac28e74

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

* [Bug tree-optimization/97560] [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 since r11-3685
  2020-10-24  8:50 [Bug tree-optimization/97560] New: [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 asolokha at gmx dot com
  2020-10-24  8:57 ` [Bug tree-optimization/97560] " jakub at gcc dot gnu.org
  2020-10-24  8:59 ` [Bug tree-optimization/97560] [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 since r11-3685 jakub at gcc dot gnu.org
@ 2020-10-24 16:26 ` aldyh at gcc dot gnu.org
  2020-10-24 16:43 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: aldyh at gcc dot gnu.org @ 2020-10-24 16:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
$ ./cc1plus a.c -O2 -fno-tree-forwprop -fnon-call-exc
eptions -quiet
$

Is this still an issue?  I can't reproduce on trunk, and I see the PR was
reported against a snapshot from 18-oct.  A lot has changed in trunk in a week.

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

* [Bug tree-optimization/97560] [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 since r11-3685
  2020-10-24  8:50 [Bug tree-optimization/97560] New: [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2020-10-24 16:26 ` aldyh at gcc dot gnu.org
@ 2020-10-24 16:43 ` jakub at gcc dot gnu.org
  2020-10-26 18:31 ` aldyh at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-10-24 16:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Seems it doesn't ICE anymore since
r11-4200-g966fdb2e12c0347aa3f9efaf5f4e1cd8237fa024
Thus I think we want the testcase into the testsuite and close this as fixed.

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

* [Bug tree-optimization/97560] [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 since r11-3685
  2020-10-24  8:50 [Bug tree-optimization/97560] New: [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2020-10-24 16:43 ` jakub at gcc dot gnu.org
@ 2020-10-26 18:31 ` aldyh at gcc dot gnu.org
  2020-10-27  6:31 ` cvs-commit at gcc dot gnu.org
  2020-10-27 13:46 ` cvs-commit at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: aldyh at gcc dot gnu.org @ 2020-10-26 18:31 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

* [Bug tree-optimization/97560] [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 since r11-3685
  2020-10-24  8:50 [Bug tree-optimization/97560] New: [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2020-10-26 18:31 ` aldyh at gcc dot gnu.org
@ 2020-10-27  6:31 ` cvs-commit at gcc dot gnu.org
  2020-10-27 13:46 ` cvs-commit at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-27  6:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 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:18cb6195fda69ea8ab8b8a5290dd8c9f8d52b0e6

commit r11-4404-g18cb6195fda69ea8ab8b8a5290dd8c9f8d52b0e6
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Tue Oct 27 07:29:42 2020 +0100

    Add test for pr97560.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/97560
            * g++.dg/pr97560.C: New test.

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

* [Bug tree-optimization/97560] [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 since r11-3685
  2020-10-24  8:50 [Bug tree-optimization/97560] New: [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 asolokha at gmx dot com
                   ` (5 preceding siblings ...)
  2020-10-27  6:31 ` cvs-commit at gcc dot gnu.org
@ 2020-10-27 13:46 ` cvs-commit at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-27 13:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:31ec7242e1ff1e8da376ec9ffef10b07ac562881

commit r11-4430-g31ec7242e1ff1e8da376ec9ffef10b07ac562881
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Oct 27 14:45:15 2020 +0100

    testsuite: restrict test to c++11 and later [PR97590]

    2020-10-27  Jakub Jelinek  <jakub@redhat.com>

            PR tree-optimization/97560
            PR testsuite/97590
            * g++.dg/pr97560.C: Require c++11 effective target and add comment
            with PR number.

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

end of thread, other threads:[~2020-10-27 13:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-24  8:50 [Bug tree-optimization/97560] New: [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 asolokha at gmx dot com
2020-10-24  8:57 ` [Bug tree-optimization/97560] " jakub at gcc dot gnu.org
2020-10-24  8:59 ` [Bug tree-optimization/97560] [11 Regression] ICE: tree check: expected tree that contains 'decl common' structure, have 'component_ref' in tree_could_trap_p, at tree-eh.c:2708 since r11-3685 jakub at gcc dot gnu.org
2020-10-24 16:26 ` aldyh at gcc dot gnu.org
2020-10-24 16:43 ` jakub at gcc dot gnu.org
2020-10-26 18:31 ` aldyh at gcc dot gnu.org
2020-10-27  6:31 ` cvs-commit at gcc dot gnu.org
2020-10-27 13:46 ` cvs-commit 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).