On Tue, Nov 12, 2024 at 04:00:03PM +0100, Jan Hubicka wrote:
> Hi,
> with __builtin_operator_new we now can optimize away unused std::vectors.
> This adds testcases mentioned in the PR.
> 
> Regtested x86_64-linux and comitted.
> 
>       PR tree-optimization/96945
> 
> gcc/testsuite/ChangeLog:
> 
>       * g++.dg/tree-ssa/pr96945.C: New test.
> 
> diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr96945.C 
> b/gcc/testsuite/g++.dg/tree-ssa/pr96945.C
> new file mode 100644
> index 00000000000..4cb234c2f71
> --- /dev/null
> +++ b/gcc/testsuite/g++.dg/tree-ssa/pr96945.C
> @@ -0,0 +1,60 @@
> +/* { dg-do compile } */
> +// { dg-options "-O1 -fdump-tree-optimized -std=c++14" }

The normal way would be
// { dg-do compile { target c++14 } }
// { dg-options "-O1 -fdump-tree-optimized" }
so that it tests all C++ versions >= 14, not just one particular,
and doesn't mix comment styles.

        Jakub

Reply via email to