+2017-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/35878
+ * init.c (std_placement_new_fn_p, build_new_1): Formatting fixes.
+
2017-03-21 Ville Voutilainen <ville.voutilainen@gmail.com>
PR c++/35878
- * cp/init.c (std_placement_new_fn_p): New.
+ * init.c (std_placement_new_fn_p): New.
(build_new_1): Call it.
2017-03-20 Jason Merrill <jason@redhat.com>
/* Determine whether an allocation function is a namespace-scope
non-replaceable placement new function. See DR 1748.
TODO: Enable in all standard modes. */
-static bool std_placement_new_fn_p (tree alloc_fn)
+static bool
+std_placement_new_fn_p (tree alloc_fn)
{
if ((cxx_dialect > cxx14) && DECL_NAMESPACE_SCOPE_P (alloc_fn))
{
So check for a null exception spec on the op new we just called. */
nothrow = TYPE_NOTHROW_P (TREE_TYPE (alloc_fn));
- check_new = flag_check_new
- || (nothrow && !std_placement_new_fn_p (alloc_fn));
+ check_new
+ = flag_check_new || (nothrow && !std_placement_new_fn_p (alloc_fn));
if (cookie_size)
{
+2017-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/35878
+ * g++.dg/init/pr35878_1.C: Rewrite directives to scan optimized
+ dump instead of assembler.
+ * g++.dg/init/pr35878_2.C: Likewise.
+ * g++.dg/init/pr35878_3.C: Likewise.
+
2017-03-21 Jakub Jelinek <jakub@redhat.com>
PR c/80097
-// { dg-options "-O2 --std=gnu++11" }
+// PR c++/35878
// { dg-do compile }
-// { dg-final { scan-assembler "test.*%rdi, %rdi" { target i?86-*-* x86_64-*-* } } }
+// { dg-options "-O2 -std=gnu++11 -fdump-tree-optimized" }
+// { dg-final { scan-tree-dump-times "v_\[0-9]+\\(D\\) \[=!]= 0" 1 "optimized" } }
+
#include <new>
#include <utility>
-// { dg-options "-O2 --std=gnu++17 -fcheck-new" }
+// PR c++/35878
// { dg-do compile }
-// { dg-final { scan-assembler "test.*%rdi, %rdi" { target i?86-*-* x86_64-*-* } } }
+// { dg-options "-O2 -std=gnu++17 -fcheck-new -fdump-tree-optimized" }
+// { dg-final { scan-tree-dump-times "v_\[0-9]+\\(D\\) \[=!]= 0" 1 "optimized" } }
+
#include <new>
#include <utility>
-// { dg-options "-O2 --std=gnu++17" }
+// PR c++/35878
// { dg-do compile }
-// { dg-final { scan-assembler-not "test.*%rdi, %rdi" { target i?86-*-* x86_64-*-* } } }
+// { dg-options "-O2 -std=gnu++17 -fdump-tree-optimized" }
+// { dg-final { scan-tree-dump-not "v_\[0-9]+\\(D\\) \[=!]= 0" "optimized" } }
+
#include <new>
#include <utility>