public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "slyfox at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/108110] [13 Regression] ice in modify_call, at ipa-param-manipulation.cc:700 with -std=c++14 -O3 -march=znver3 since r13-4685-g4834e9360f7bf4
Date: Mon, 02 Jan 2023 12:50:37 +0000	[thread overview]
Message-ID: <bug-108110-4-RdnxWY2z9j@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108110-4@http.gcc.gnu.org/bugzilla/>

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

Sergei Trofimovich <slyfox at gcc dot gnu.org> changed:

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

--- Comment #14 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Got a similar ICE on minetest-5.6.1. With a bit of manual cleanup reduced down
to the following:

//$ cat bug.cc
void __throw_out_of_range_fmt(...);
char *_M_p;
struct Trans_NS___cxx11_basic_string {
  long _M_string_length;
  long _M_check___pos;
  Trans_NS___cxx11_basic_string() {
    long __length = 0;
    _M_string_length = __length;
  }
  long size() { return _M_string_length; }
  long foo___pos;
  char foo() { return _M_p[foo___pos]; }
  int compare() { __throw_out_of_range_fmt(_M_check___pos, _M_string_length);
__builtin_trap(); }
};
bool str_starts_with(Trans_NS___cxx11_basic_string &str,
                     Trans_NS___cxx11_basic_string prefix) {
  if (str.size() < prefix.size())
    str.compare();
  for (; prefix.size();) {
    char __trans_tmp_2 = prefix.foo();
    if (__trans_tmp_2)
      return false;
  }
  __builtin_trap();
}
void testStartsWith() {
  Trans_NS___cxx11_basic_string s1, s2;
  str_starts_with(s1, s2);
}

$ g++ -Wall -Wextra  -O3  -c bug.cc
during IPA pass: inline
bug.cc: In function 'void testStartsWith()':
bug.cc:28:18: internal compiler error: in modify_call, at
ipa-param-manipulation.cc:700
   28 |   str_starts_with(s1, s2);
      |   ~~~~~~~~~~~~~~~^~~~~~~~
0x1cbdfd4 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char
const*, __va_list_tag (*) [1], diagnostic_t)
        ???:0
0x1cbec26 internal_error(char const*, ...)
        ???:0
0x753df0 fancy_abort(char const*, int, char const*)
        ???:0
0x723afe ipa_param_adjustments::modify_call(cgraph_edge*, bool) [clone .cold]
        ???:0
0xa4e735 cgraph_edge::redirect_call_stmt_to_callee(cgraph_edge*)
        ???:0
0xec8a13 redirect_all_calls(copy_body_data*, basic_block_def*)
        ???:0
0xece256 copy_body(copy_body_data*, basic_block_def*, basic_block_def*,
basic_block_def*) [clone .isra.0]
        ???:0
0xed1ded expand_call_inline(basic_block_def*, gimple*, copy_body_data*,
bitmap_head*)
        ???:0
0xed3b69 optimize_inline_calls(tree_node*)
        ???:0
0xc3f753 inline_transform(cgraph_node*)
        ???:0
0xd8d1ff execute_all_ipa_transforms(bool)
        ???:0
0xa54b3f cgraph_node::expand()
        ???:0
0xa5604d symbol_table::compile() [clone .part.0]
        ???:0
0xa58517 symbol_table::finalize_compilation_unit()
        ???:0

  parent reply	other threads:[~2023-01-02 12:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 19:03 [Bug c++/108110] New: ice in modify_call, at ipa-param-manipulation.cc:700 with -std=c++14 -O3 -march=native dcb314 at hotmail dot com
2022-12-14 19:10 ` [Bug ipa/108110] " dcb314 at hotmail dot com
2022-12-14 19:11 ` [Bug ipa/108110] [13 Regression] " pinskia at gcc dot gnu.org
2022-12-14 19:13 ` pinskia at gcc dot gnu.org
2022-12-14 22:54 ` dcb314 at hotmail dot com
2022-12-15  5:25 ` dcb314 at hotmail dot com
2022-12-15  5:51 ` dcb314 at hotmail dot com
2022-12-15  7:18 ` dcb314 at hotmail dot com
2022-12-15  7:47 ` dcb314 at hotmail dot com
2022-12-15  8:24 ` rguenth at gcc dot gnu.org
2022-12-15  8:36 ` dcb314 at hotmail dot com
2022-12-15  8:55 ` dcb314 at hotmail dot com
2022-12-15  9:14 ` dcb314 at hotmail dot com
2022-12-15 10:44 ` [Bug ipa/108110] [13 Regression] ice in modify_call, at ipa-param-manipulation.cc:700 with -std=c++14 -O3 -march=znver3 since r13-4685-g4834e9360f7bf4 marxin at gcc dot gnu.org
2022-12-15 10:47 ` marxin at gcc dot gnu.org
2022-12-18 19:03 ` manuel.lauss at googlemail dot com
2023-01-02 12:08 ` jakub at gcc dot gnu.org
2023-01-02 12:50 ` slyfox at gcc dot gnu.org [this message]
2023-01-04 13:41 ` jamborm at gcc dot gnu.org
2023-01-05 16:47 ` jamborm at gcc dot gnu.org
2023-01-06  8:13 ` slyfox at gcc dot gnu.org
2023-01-10 13:20 ` cvs-commit at gcc dot gnu.org
2023-01-10 13:21 ` jamborm at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-108110-4-RdnxWY2z9j@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).