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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-08-30
                 CC|                            |jason at gcc dot gnu.org
     Ever confirmed|0                           |1
      Known to fail|                            |7.3.0, 8.2.0, 9.0

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to programmer from comment #0)
> PS: Which version should I choose if multiple versions are affected: stable,
> trunk or [the first version with that regression]?

It doesn't really matter. We use other fields to track which versions the
regression affects.

Reduced:

template<typename T, T t> struct integral_constant {
  static constexpr T value = t;
};

enum class Enum : unsigned {};

struct Pod {
  unsigned val;

  constexpr operator Enum() const {
    return static_cast<Enum>(val);
  }
};

template<unsigned N>
constexpr void foo() {
  using Foo = integral_constant<Enum, Pod{N}>;
}

int main() {
  foo<2>();
}


This started to ICE with r241425:

            PR c++/77656
            * pt.c (convert_template_argument): Call convert_nontype_argument
            on value-dependent but not type-dependent arguments.
            (convert_nontype_argument): Handle value-dependent arguments.
            (canonicalize_expr_argument): New.
            (deducible_expression, unify): Skip CONVERT_EXPR.
            * error.c (dump_template_argument): Likewise.
            * mangle.c (write_expression): Likewise.

And then started giving the current error with r257311 which relaxed an
assertion to stop the ICE:

            PR c++/84125
            * typeck.c (build_address): Relax the assert when
            processing_template_decl.

Because of the ICE I can't tell when the error started.

Reply via email to