[Bug c++/95468] [8/9/10/11 Regression] ICE in expression sfinae

ppalka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jun 3 15:23:59 GMT 2020


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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |ppalka at gcc dot gnu.org
            Summary|ICE in expression sfinae    |[8/9/10/11 Regression] ICE
                   |                            |in expression sfinae
           Keywords|ice-on-invalid-code         |ice-on-valid-code
   Target Milestone|---                         |8.5

--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
(In reply to kab from comment #1)
> This was labeled as "ice-on-invalid-code".  Am I missing something?  I don't
> see anything invalid here.

I just now adjusted the label to be "ice-on-valid-code" instead.

This seems to be a regression relative to GCC 4.8, which compiles the testcase
successfully (with -std=c++11).  We began ICEing on the testcase starting with
r0-122271.

Here is a reduced testcase:

template <int> struct a { };

struct c {
  template <int d> static constexpr bool condition() { return d; }
};

template<typename>
void foo() {
  using A = a<c::condition<bool(true)>()>;
}

void bar() {
  foo<int>();
}


More information about the Gcc-bugs mailing list