From 8d35b1ad9725466d15b4dea7478637ec7602f808 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 1 Sep 2023 16:49:42 +0100 Subject: c++: Move new test to 'opt' sub-directory gcc/testsuite/ChangeLog: * g++.dg/pr110879.C: Moved to... * g++.dg/opt/pr110879.C: ...here. --- gcc/testsuite/g++.dg/opt/pr110879.C | 16 ++++++++++++++++ gcc/testsuite/g++.dg/pr110879.C | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 gcc/testsuite/g++.dg/opt/pr110879.C delete mode 100644 gcc/testsuite/g++.dg/pr110879.C (limited to 'gcc') diff --git a/gcc/testsuite/g++.dg/opt/pr110879.C b/gcc/testsuite/g++.dg/opt/pr110879.C new file mode 100644 index 0000000..7f0a0a8 --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/pr110879.C @@ -0,0 +1,16 @@ +// { dg-do compile } +// { dg-options "-O3 -fdump-tree-optimized" } + +#include + +std::vector f(std::size_t n) { + std::vector res; + for (std::size_t i = 0; i < n; ++i) { + res.push_back(i); + } + return res; +} + +// Reads of _M_finish should be optimized out. +// This regex matches all reads from res variable except for _M_end_of_storage field. +// { dg-final { scan-tree-dump-not "=\\s*\\S*res_(?!\\S*_M_end_of_storage;)" "optimized" } } diff --git a/gcc/testsuite/g++.dg/pr110879.C b/gcc/testsuite/g++.dg/pr110879.C deleted file mode 100644 index 7f0a0a8..0000000 --- a/gcc/testsuite/g++.dg/pr110879.C +++ /dev/null @@ -1,16 +0,0 @@ -// { dg-do compile } -// { dg-options "-O3 -fdump-tree-optimized" } - -#include - -std::vector f(std::size_t n) { - std::vector res; - for (std::size_t i = 0; i < n; ++i) { - res.push_back(i); - } - return res; -} - -// Reads of _M_finish should be optimized out. -// This regex matches all reads from res variable except for _M_end_of_storage field. -// { dg-final { scan-tree-dump-not "=\\s*\\S*res_(?!\\S*_M_end_of_storage;)" "optimized" } } -- cgit v1.1