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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-12-24
      Known to work|                            |11.3.0
     Ever confirmed|0                           |1
            Summary|[12 Regression] Constant    |[12/13 Regression] Constant
                   |arguments in the new        |arguments in the new
                   |expression is not checked   |expression is not checked
                   |in unevaluated operand      |in unevaluated operand
      Known to fail|                            |12.1.0
   Target Milestone|---                         |12.3
           Keywords|                            |needs-bisection,
                   |                            |rejects-valid

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
Here is a rejects valid code:
template<class T>
concept C = requires
{
    new int[(int)sizeof(T) - 4];
};

template<typename T>
class CC {
    CC()  requires C<T> {
        new int[(int)sizeof(T) - 4];
    }
    CC()   {
    }
};

template class CC<char>;

Reply via email to