public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "malat at debian dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/111212] [13/14 Regression] internal compiler error: in extract_insn, at recog.cc:2791
Date: Mon, 28 Aug 2023 14:48:41 +0000	[thread overview]
Message-ID: <bug-111212-4-v7uv0iKVds@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111212-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from Mathieu Malaterre <malat at debian dot org> ---
reduced:

% g++  -maltivec -mcpu=power8 -O2 -c testcase.i
testcase.i:15:30: warning: '{anonymous}::m<f []> {anonymous}::n(a) [with f =
short int]' used but never defined
   15 | template <typename f> m<f[]> n(a);
      |                              ^
testcase.i: In function 'void f::o::b()':
testcase.i:66:25: error: unrecognizable insn:
   66 | void b() { bo(bj<s>()); }
      |                         ^
(insn 14 10 15 2 (set (reg:DI 127)
        (ashift:DI (reg:DI 126)
            (const_int 56 [0x38]))) "testcase.i":61:8 -1
     (nil))
during RTL pass: vregs
testcase.i:66:25: internal compiler error: in extract_insn, at recog.cc:2791
0x10813967 internal_error(char const*, ...)
        ???:0
0x10813a77 fancy_abort(char const*, int, char const*)
        ???:0
0x1041cb67 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ???:0
0x1041cba3 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        ???:0
0x10bc12b7 extract_insn(rtx_insn*)
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-13/README.Bugs> for instructions.


with:

% cat testcase.i
typedef int a;
typedef short b;
namespace c {
template <typename e> struct g { using h = e &; };
template <typename e> using i = typename g<e>::h;
template <typename e> struct k { using h = i<e>; };
template <typename e, typename = e> class ad;
template <typename e, typename l> class ad<e[], l> {
public:
  typename k<e>::h operator[](a);
};
} // namespace c
namespace {
template <typename f> using m = c::ad<f>;
template <typename f> m<f[]> n(a);
} // namespace
#pragma GCC target "cpu=power10"
namespace f {
namespace o {
template <typename q, a, int> struct p { using f = q; };
namespace detail {
template <typename f, a, int> struct aq { using h = p<f, 6, 0>; };
template <typename f, a, int as> struct at {
  static constexpr a au = 0;
  using h = typename aq<f, au, as>::h;
};
} // namespace detail
template <typename f, a aw, int as>
using ax = typename detail::at<f, aw, as>::h;
template <class ay> using az = typename ay::f;
namespace detail {
template <typename f, a, a bc, class bd, int as> struct be {
  static void bf(a, a) {
    ax<f, bc, as> d;
    bd()(f(), d);
  }
};
} // namespace detail
template <class bd, int as> class bg {
public:
  template <typename f> void operator()(f) {
    a bh;
    constexpr a bi = as;
    constexpr a bc{};
    detail::be<f, bi, bc, bd, as>::bf(1, bh);
  }
};
template <class bd> class bj {
public:
  template <typename f> void operator()(f r) { bg<bd, 0>()(r); }
};
template <class bk> void bl(bk bm) { bm(b()); }
template <class bk> void bn(bk bm) { bl(bm); }
template <class bk> void bo(bk bm) { bn(bm); }
struct s {
  template <class f, class ay> void operator()(f, ay) {
    ay bp;
    using bq = az<decltype(bp)>;
    a br;
    auto bs = n<bq>(br);
    bq bt[]{8, 5, 4, 4, 5, 4, 9, 8, 5};
    for (a j;;)
      bs[j] = bt[j];
  }
};
void b() { bo(bj<s>()); }
} // namespace o
} // namespace f

  parent reply	other threads:[~2023-08-28 14:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-28  7:54 [Bug target/111212] New: " malat at debian dot org
2023-08-28  7:56 ` [Bug target/111212] " malat at debian dot org
2023-08-28  9:26 ` [Bug target/111212] [13/14 Regression] " rguenth at gcc dot gnu.org
2023-08-28 14:48 ` malat at debian dot org [this message]
2023-08-30  2:31 ` linkw at gcc dot gnu.org
2023-08-30  2:42 ` linkw 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-111212-4-v7uv0iKVds@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).