public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "acoplan at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/103690] [12 Regression] ICE: in build2, at tree.c:4985 with -g -O2 -fno-tree-dce -fno-tree-dse -fno-tree-fre --param=max-jump-thread-duplication-stmts=94 since r12-2591-g2e96b5f14e402569
Date: Wed, 15 Dec 2021 20:05:24 +0000	[thread overview]
Message-ID: <bug-103690-4-VkBiCxA55d@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103690-4@http.gcc.gnu.org/bugzilla/>

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

Alex Coplan <acoplan at gcc dot gnu.org> changed:

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

--- Comment #4 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Here's a slightly cleaned up testcase which fails with the same options FWIW:

typedef int *int_ptr;
struct __normal_iterator {
  int *_M_current;
  __normal_iterator(const int_ptr &__i) : _M_current(__i) {}
  void foo() { __normal_iterator(_M_current - 1); }
};
void deallocate(int *);
struct vector {
  int *_M_start;
  int *_M_finish;
  __normal_iterator end() { return _M_finish; }
  int back() {
    __normal_iterator t = _M_finish;
    t.foo();
  }
  void foo();
};
int *p1, *p2;
int last, result;
void vector::foo() {
  for (int i; i;)
    while (i) {
      __normal_iterator t1 = end();
      int *p3, *__old_start = _M_start, *__new_finish;
      long __count = &last - __old_start;
      if (__count > 0)
        __builtin_memmove(&result, __old_start, __count);
      p1 = &result + __count;
      p2 = p1 + 1;
      __count = _M_finish - t1._M_current;
      if (__count)
        __builtin_memmove(p2, t1._M_current, __count);
      p3 = p2 + __count;
      __new_finish = p3;
      if (__old_start)
        deallocate(__old_start);
      _M_finish = __new_finish;
      back();
    }
}

also confirmed on aarch64-linux-gnu.

  parent reply	other threads:[~2021-12-15 20:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-13 19:26 [Bug tree-optimization/103690] New: [12 Regression] ICE: in build2, at tree.c:4985 with -O2 -fno-tree-dce -fno-tree-dse -fno-tree-fre --param=max-jump-thread-duplication-stmts=94 zsojka at seznam dot cz
2021-12-13 22:30 ` [Bug tree-optimization/103690] [12 Regression] ICE: in build2, at tree.c:4985 with -g " pinskia at gcc dot gnu.org
2021-12-13 22:51 ` pinskia at gcc dot gnu.org
2021-12-13 23:02 ` pinskia at gcc dot gnu.org
2021-12-14 10:03 ` [Bug tree-optimization/103690] [12 Regression] ICE: in build2, at tree.c:4985 with -g -O2 -fno-tree-dce -fno-tree-dse -fno-tree-fre --param=max-jump-thread-duplication-stmts=94 since r12-2591-g2e96b5f14e402569 marxin at gcc dot gnu.org
2021-12-15 20:05 ` acoplan at gcc dot gnu.org [this message]
2021-12-16 17:17 ` aldyh at gcc dot gnu.org
2022-01-04 10:21 ` rguenth at gcc dot gnu.org
2022-01-04 12:17 ` cvs-commit at gcc dot gnu.org
2022-01-04 12:17 ` rguenth 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-103690-4-VkBiCxA55d@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).