* constexpr.c (maybe_constant_init): Pull out TARGET_EXPR_INITIAL. (cxx_eval_outermost_constant_expr): Don't return a CONSTRUCTOR with CONSTRUCTOR_NO_IMPLICIT_ZERO. (cxx_eval_call_expression): Clear CONSTRUCTOR_NO_IMPLICIT_ZERO. From-SVN: r241531
21 lines
290 B
C
21 lines
290 B
C
// { dg-do compile { target c++11 } }
|
|
// { dg-final { scan-assembler-not "_ZNSt10unique_ptrC1Ei" } }
|
|
|
|
namespace std {
|
|
struct unique_ptr {
|
|
constexpr unique_ptr(int) : p() { }
|
|
~unique_ptr() { }
|
|
void* p;
|
|
};
|
|
}
|
|
|
|
void f()
|
|
{
|
|
static std::unique_ptr p(1);
|
|
}
|
|
|
|
int main()
|
|
{
|
|
f();
|
|
}
|