===================================================================
@@ -9456,6 +9456,7 @@ cxx_eval_constant_expression (const constexpr_call
case FUNCTION_DECL:
case TEMPLATE_DECL:
case LABEL_DECL:
+ case OVERLOAD:
return t;
case PARM_DECL:
===================================================================
@@ -0,0 +1,8 @@
+// PR c++/60254
+// { dg-do compile { target c++11 } }
+
+template<typename T> bool foo(T)
+{
+ int i;
+ static_assert(foo(i), "Error"); // { dg-error "non-constant condition|constexpr function" }
+}
===================================================================
@@ -0,0 +1,10 @@
+// PR c++/60254
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ template<typename T> bool foo(T)
+ {
+ static_assert(foo(0), "Error"); // { dg-error "non-constant condition" }
+ }
+};