public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/103155] New: [12 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:813
@ 2021-11-09 11:33 asolokha at gmx dot com
  2021-11-09 13:16 ` [Bug ipa/103155] " marxin at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: asolokha at gmx dot com @ 2021-11-09 11:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103155
           Summary: [12 Regression] ICE in get_expr_operands, at
                    tree-ssa-operands.c:813
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 51755
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51755&action=edit
Partially reduced testcase

g++-12.0.0-alpha20211107 snapshot (g:962ff7d2849e1fa6a1fe0535aa2dec5c2b9a32a6)
ICEs when compiling the following line, extracted from
libstdc++-v3/testsuite/performance/ext/pb_ds/priority_queue_text_pop_mem.cc, w/
-std=c++20 -O3 -fopenacc -g --param ipa-cp-eval-threshold=0
-Ilibstdc++-v3/testsuite/util:

#include <performance/priority_queue/mem_usage/pop_test.hpp>

% g++-12.0.0 -std=c++20 -O3 -fopenacc -g --param ipa-cp-eval-threshold=0
-Ilibstdc++-v3/testsuite/util -c tvl87d85.cc
during IPA pass: inline
In function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pointer
std::__cxx11::basic_string<_CharT, _Traits,
_Alloc>::_M_create(std::__cxx11::basic_string<_CharT, _Traits,
_Alloc>::size_type&, std::__cxx11::basic_string<_CharT, _Traits,
_Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>;
_Alloc = std::allocator<char>]':
cc1plus: internal compiler error: in get_expr_operands, at
tree-ssa-operands.c:813
0x839310 operands_scanner::get_expr_operands(tree_node**, int)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-ssa-operands.c:813
0x13198e9 operands_scanner::get_expr_operands(tree_node**, int)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-ssa-operands.c:834
0x131a53f operands_scanner::parse_ssa_operands()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-ssa-operands.c:990
0x131b3eb operands_scanner::build_ssa_operands()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-ssa-operands.c:1005
0x131b4ff update_stmt_operands(function*, gimple*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-ssa-operands.c:1147
0xe52a56 update_stmt_if_modified
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/gimple-ssa.h:185
0xe52a56 update_stmt_if_modified
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/gimple-ssa.h:182
0xe52a56 update_modified_stmt
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/gimple-iterator.c:44
0xe52a56 gsi_insert_after(gimple_stmt_iterator*, gimple*, gsi_iterator_update)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/gimple-iterator.c:544
0xe4932f gimple_seq_add_stmt(gimple**, gimple*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/gimple.c:1315
0x11fe566 remap_gimple_stmt
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-inline.c:2014
0x1203003 copy_bb
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-inline.c:2054
0x1204622 copy_cfg_body
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-inline.c:3088
0x1204622 copy_body
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-inline.c:3341
0x1207693 tree_function_versioning(tree_node*, tree_node*,
vec<ipa_replace_map*, va_gc, vl_embed>*, ipa_param_adjustments*, bool,
bitmap_head*, basic_block_def*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/tree-inline.c:6369
0xcdf5ec cgraph_node::materialize_clone()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/cgraphclones.c:1141
0xccd8a5 cgraph_node::get_untransformed_body()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/cgraph.c:3907
0xcdf47f cgraph_node::materialize_clone()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/cgraphclones.c:1111
0xccd8a5 cgraph_node::get_untransformed_body()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/cgraph.c:3907
0xf28857 maybe_materialize_called_clones
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/gcc/ipa-inline-transform.c:720

Partially reduced contents of that file is in attachment.

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

* [Bug ipa/103155] [12 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:813
  2021-11-09 11:33 [Bug ipa/103155] New: [12 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:813 asolokha at gmx dot com
@ 2021-11-09 13:16 ` marxin at gcc dot gnu.org
  2021-11-09 19:46 ` asolokha at gmx dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-09 13:16 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-11-09
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Hm, I can't reproduce the problem, both for the partially reduced testcase and
the including line.

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

* [Bug ipa/103155] [12 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:813
  2021-11-09 11:33 [Bug ipa/103155] New: [12 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:813 asolokha at gmx dot com
  2021-11-09 13:16 ` [Bug ipa/103155] " marxin at gcc dot gnu.org
@ 2021-11-09 19:46 ` asolokha at gmx dot com
  2021-11-10  2:32 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: asolokha at gmx dot com @ 2021-11-09 19:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Arseny Solokha <asolokha at gmx dot com> ---
It ICEs on both my machines, but I cannot reproduce it on godbolt. Give me some
time to see if I manage to get something meaningful out of it w/ gdb.

% gcc-12.0.0 -v
Using built-in specs.
COLLECT_GCC=gcc-12.0.0
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-unknown-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211107/work/gcc-12-20211107/configure
--host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-unknown-linux-gnu/gcc-bin/12.0.0
--includedir=/usr/lib/gcc/x86_64-unknown-linux-gnu/12.0.0/include
--datadir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/12.0.0
--mandir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/12.0.0/man
--infodir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/12.0.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-unknown-linux-gnu/12.0.0/include/g++-v12
--with-python-dir=/share/gcc-data/x86_64-unknown-linux-gnu/12.0.0/python
--enable-languages=c,c++ --enable-obsolete --enable-secureplt --disable-werror
--with-system-zlib --disable-nls --disable-libunwind-exceptions
--enable-checking=yes --disable-esp --enable-libstdcxx-time
--disable-libstdcxx-pch --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --disable-multilib
--with-multilib-list=m64 --disable-fixed-point --enable-targets=all
--enable-libgomp --disable-libssp --disable-libada --disable-systemtap
--enable-valgrind-annotations --disable-vtable-verify --disable-libvtv
--without-zstd --enable-lto --with-isl --disable-isl-version-check
--disable-libsanitizer --enable-default-pie --enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20211107 (experimental) (GCC)

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

* [Bug ipa/103155] [12 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:813
  2021-11-09 11:33 [Bug ipa/103155] New: [12 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:813 asolokha at gmx dot com
  2021-11-09 13:16 ` [Bug ipa/103155] " marxin at gcc dot gnu.org
  2021-11-09 19:46 ` asolokha at gmx dot com
@ 2021-11-10  2:32 ` pinskia at gcc dot gnu.org
  2021-11-10  3:25 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-10  2:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I am able to reproduce this at r12-4982-g962ff7d2849 as described in the bug,
trying to see if a latter revision fixed the problem.

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

* [Bug ipa/103155] [12 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:813
  2021-11-09 11:33 [Bug ipa/103155] New: [12 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:813 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2021-11-10  2:32 ` pinskia at gcc dot gnu.org
@ 2021-11-10  3:25 ` pinskia at gcc dot gnu.org
  2021-11-10  3:45 ` pinskia at gcc dot gnu.org
  2021-11-10  8:05 ` jamborm at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-10  3:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> I am able to reproduce this at r12-4982-g962ff7d2849 as described in the
> bug, trying to see if a latter revision fixed the problem.

It is also broken at r12-4993 but not at r12-5076.  Still bisecting.

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

* [Bug ipa/103155] [12 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:813
  2021-11-09 11:33 [Bug ipa/103155] New: [12 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:813 asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2021-11-10  3:25 ` pinskia at gcc dot gnu.org
@ 2021-11-10  3:45 ` pinskia at gcc dot gnu.org
  2021-11-10  8:05 ` jamborm at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-10  3:45 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=103099,
                   |                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=103107
         Resolution|---                         |FIXED
   Target Milestone|---                         |12.0
             Status|WAITING                     |RESOLVED

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed by r12-5003-g239d82d4c05b30632 which makes sense based on the backtrace
being inside the inliner and -g is needed.

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

* [Bug ipa/103155] [12 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:813
  2021-11-09 11:33 [Bug ipa/103155] New: [12 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:813 asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2021-11-10  3:45 ` pinskia at gcc dot gnu.org
@ 2021-11-10  8:05 ` jamborm at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jamborm at gcc dot gnu.org @ 2021-11-10  8:05 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu.org

--- Comment #6 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Yep, almost certainly an instance of missed unsharing and thus a duplicate for
PR 103099.  Sorry for the breakage.

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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09 11:33 [Bug ipa/103155] New: [12 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:813 asolokha at gmx dot com
2021-11-09 13:16 ` [Bug ipa/103155] " marxin at gcc dot gnu.org
2021-11-09 19:46 ` asolokha at gmx dot com
2021-11-10  2:32 ` pinskia at gcc dot gnu.org
2021-11-10  3:25 ` pinskia at gcc dot gnu.org
2021-11-10  3:45 ` pinskia at gcc dot gnu.org
2021-11-10  8:05 ` jamborm 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).