===================================================================
@@ -2607,7 +2607,6 @@ finish_compound_literal (tree type, tree compound_
if ((!at_function_scope_p () || CP_TYPE_CONST_P (type))
&& TREE_CODE (type) == ARRAY_TYPE
&& !TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
- && !cp_unevaluated_operand
&& initializer_constant_valid_p (compound_literal, type))
{
tree decl = create_temporary_var (type);
===================================================================
@@ -0,0 +1,11 @@
+// PR c++/61614
+// { dg-options "" }
+
+int Fn (...);
+
+void
+Test ()
+{
+ int j = Fn ((const int[]) { 0 }); // OK
+ unsigned long sz = sizeof Fn ((const int[]) { 0 }); // Error
+}