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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
            Summary|[13 Regression] ICE in      |[12/13 Regression] ICE in
                   |build_min_non_dep_op_overlo |build_min_non_dep_op_overlo
                   |ad, at cp/tree.cc:3793      |ad, at cp/tree.cc:3793
                   |                            |since r12-5510

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #2)
> With release checking I see

Those are two separate testcases which just differ in 0,1 vs. 1,0.

Anyway, adjusted testcase so that it isn't so invalid:
struct S
{
  static int &operator[] (int x) { static int a[2]; return a[x]; }
};

template <int N>
int
foo ()
{
  S s;
  ++s[0, 1];
  return 0;
}
and without the template <int N> line is accepted with a pedwarn.
And, if it is changed to:
struct S
{
  int &operator[] (int x) { static int a[2]; return a[x]; }
};

template <int N>
int
foo ()
{
  S s;
  ++s[0, 1];
  return 0;
}
then it is also accepted with pedwarn without the template <int N> line and
otherwise ICEs already starting with r12-5510-gb38c9cf6d570f6.

Reply via email to