testsuite: fix allocator-opt1.C FAIL with old ABI
commitbdda084bc4604467587447fbc4be1c8da0a12665
authorMarek Polacek <polacek@redhat.com>
Mon, 10 Jul 2023 20:21:58 +0000 (10 16:21 -0400)
committerMarek Polacek <polacek@redhat.com>
Thu, 20 Jul 2023 16:41:45 +0000 (20 12:41 -0400)
tree10d27a56fda706c91068c5ddd95ea477b9bdd34c
parent506f068e7d01ad2fb107185b8fb204a0ec23785c
testsuite: fix allocator-opt1.C FAIL with old ABI

Running
$ make check-g++ RUNTESTFLAGS='--target_board=unix\{-D_GLIBCXX_USE_CXX11_ABI=0,\} dg.exp=allocator-opt1.C'
yields:

FAIL: g++.dg/tree-ssa/allocator-opt1.C  -std=c++98  scan-tree-dump-times gimple "struct allocator D" 1
FAIL: g++.dg/tree-ssa/allocator-opt1.C  -std=c++14  scan-tree-dump-times gimple "struct allocator D" 1
FAIL: g++.dg/tree-ssa/allocator-opt1.C  -std=c++17  scan-tree-dump-times gimple "struct allocator D" 1
FAIL: g++.dg/tree-ssa/allocator-opt1.C  -std=c++20  scan-tree-dump-times gimple "struct allocator D" 1

=== g++ Summary for unix/-D_GLIBCXX_USE_CXX11_ABI=0 ===

=== g++ Summary for unix ===

because in the old ABI we get two "struct allocator D".  This patch
follows r14-658 although I'm not quite sure I follow the logic there.

gcc/testsuite/ChangeLog:

* g++.dg/tree-ssa/allocator-opt1.C: Force _GLIBCXX_USE_CXX11_ABI to 1.
gcc/testsuite/g++.dg/tree-ssa/allocator-opt1.C