My r15-8904-ge200f53a555651 changed the std::vector initializer-list
constructor so that it calls a new _M_range_initialize_n function
instead of _M_range_initialize. Change the scan-tree-dump pattern in
this g++.dg test to match the new gimple output.

gcc/testsuite/ChangeLog:

        * g++.dg/tree-ssa/initlist-opt1.C: Match _M_range_initialize_n
        instead of _M_range_initialize.
---

Would anybody prefer a different pattern?

e.g. just {_M_range_initialize_n<const char\* const\*} without
the second template argument and '>' would work, and would be correct
for the gcc-14 backport where the new function only has one template
parameter.

Or is it better to be more explicit about the full signature here, and
then use {_M_range_initialize_n<const char\* const\*>} for gcc-14?

 gcc/testsuite/g++.dg/tree-ssa/initlist-opt1.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/tree-ssa/initlist-opt1.C 
b/gcc/testsuite/g++.dg/tree-ssa/initlist-opt1.C
index 89abdd90a82..2b9089acd82 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/initlist-opt1.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/initlist-opt1.C
@@ -4,7 +4,7 @@
 // { dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } }
 
 // Test that we do range-initialization from const char *.
-// { dg-final { scan-tree-dump {_M_range_initialize<const char\* const\*>} 
"gimple" } }
+// { dg-final { scan-tree-dump {_M_range_initialize_n<const char\* const\*, 
const char\* const\*>} "gimple" } }
 // { dg-final { scan-tree-dump {static const char.*72} "gimple" } }
 
 #include <string>
-- 
2.49.0

Reply via email to