PR c++/77907 - static init and PMF
* constexpr.c (cxx_eval_constant_expression): Use cp_fold_convert. From-SVN: r242906
This commit is contained in:
parent
c190974fe5
commit
f9438bbb2e
@ -1,3 +1,8 @@
|
||||
2016-11-27 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/77907
|
||||
* constexpr.c (cxx_eval_constant_expression): Use cp_fold_convert.
|
||||
|
||||
2016-11-24 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR bootstrap/78493
|
||||
|
@ -4226,7 +4226,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,
|
||||
{
|
||||
if (same_type_ignoring_top_level_qualifiers_p (type,
|
||||
TREE_TYPE (op)))
|
||||
STRIP_NOPS (t);
|
||||
return cp_fold_convert (type, op);
|
||||
else
|
||||
{
|
||||
if (!ctx->quiet)
|
||||
|
@ -1,6 +1,7 @@
|
||||
// PR c++/77907
|
||||
// { dg-do run { target c++11 } }
|
||||
// { dg-options "-O2" }
|
||||
// { dg-options "-O2 -save-temps" }
|
||||
// { dg-final { scan-assembler-not "static_initialization" } }
|
||||
|
||||
struct A {
|
||||
int foo () { return 1; }
|
||||
|
Loading…
Reference in New Issue
Block a user