[Bug c++/81917] [7 Regression] internal compiler error: in finish_member_declaration, at cp/semantics.c:3004

2019-11-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81917

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||8.0
 Resolution|--- |FIXED
   Target Milestone|7.5 |8.0
  Known to fail||7.5.0

--- Comment #11 from Richard Biener  ---
Fixed in GCc 8.

[Bug c++/81917] [7 Regression] internal compiler error: in finish_member_declaration, at cp/semantics.c:3004

2019-06-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81917

--- Comment #10 from Jonathan Wakely  ---
(In reply to Jonathan Wakely from comment #9)
> Is the fix safe to backport to gcc-7-branch?

I've just confirmed that backporting r257542 does fix the ice-on-valid example.

[Bug c++/81917] [7 Regression] internal compiler error: in finish_member_declaration, at cp/semantics.c:3004

2019-06-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81917

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
   Last reconfirmed|2017-08-22 00:00:00 |2019-6-24

--- Comment #9 from Jonathan Wakely  ---
FWIW a user has sent me an ice-on-valid reproducer for this as well. After
reduce it's:

template  struct b { static constexpr int c = a; };
template  using d = b;
template  struct h { template  using f = g; };
template  using j = i;
template  using k = void;
template  class l> struct r {
  template  using f = l;
};
template  using aa = typename o::template f;
template  struct s {
  template  using f = aa;
};
template  struct t {
  template 
  using f = typename h::template f::template f...>;
};
template  struct ab {
  template  using f = typename o::template f;
};
template  struct ac {
  template  using f = typename o::template f;
};
template  using ad = ab, n...>;
struct ae;
struct v {
  template  using f = t, r>::f;
};
template  class, class...>
struct IsValidT_impl {};
template  class g, typename... p>
struct IsValidT_impl>, g, p...> : d {};
struct w {
  template  class g, class... p>
  using f = IsValidT_impl;
};
template  class ag> struct x {
  template  using f = ag;
};
template 
struct y : aa::template f {
  using aj = aa;
  aj ak();
};
namespace f {
template  using am = decltype(g().ak().an(0, al()));
struct z {
  template  friend auto operator==(j::c, ae>, g) {}
  template  friend auto operator==(g, j::c, ae>) {}
};
template  struct ao : z {};
} // namespace f
using ap = r;
struct aq {
  template  auto an(ar at, as au) { return at == au;
}
};
namespace av {
template  struct aw : aq {};
} // namespace av
using ax = x;
namespace ay {
template  struct az : aa {};
} // namespace ay
using u = x;
namespace ba {
template  struct bb : aa {};
} // namespace ba
using bc = x;
struct ae : y {};
int main() {
  ae a;
  a == 0;
}


This compiles OK since r257542 but still fails with GCC 7:

81917.ii: In instantiation of 'struct IsValidT_impl':
81917.ii:49:37:   required by substitution of 'template auto
f::operator==(g, j::c, ae>) [with g = ae]'
81917.ii:72:8:   required from here
81917.ii:32:8: error: redefinition of 'struct IsValidT_impl'
 struct IsValidT_impl>, g, p...> : d {};
^~
81917.ii:32: confused by earlier errors, bailing out


Is the fix safe to backport to gcc-7-branch?

[Bug c++/81917] [7 Regression] internal compiler error: in finish_member_declaration, at cp/semantics.c:3004

2018-12-06 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81917

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|7.4 |7.5