diff options
author | Thomas Schwinge <tschwinge@baylibre.com> | 2025-03-20 17:25:14 +0100 |
---|---|---|
committer | Thomas Schwinge <tschwinge@baylibre.com> | 2025-04-16 16:07:07 +0200 |
commit | 0b2a2490bebd29acc4da18562eec7464601cbb05 (patch) | |
tree | f538dd7bf2eec3cb34fcec166f57a2fbf5796efb | |
parent | ca9cffe737d20953082333dacebb65d4261e0d0c (diff) | |
download | gcc-0b2a2490bebd29acc4da18562eec7464601cbb05.zip gcc-0b2a2490bebd29acc4da18562eec7464601cbb05.tar.gz gcc-0b2a2490bebd29acc4da18562eec7464601cbb05.tar.bz2 |
Add 'libgomp.c++/pr106445-1{,-O0}.C' [PR106445]
PR target/106445
libgomp/
* testsuite/libgomp.c++/pr106445-1.C: New.
* testsuite/libgomp.c++/pr106445-1-O0.C: Likewise.
-rw-r--r-- | libgomp/testsuite/libgomp.c++/pr106445-1-O0.C | 3 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c++/pr106445-1.C | 18 |
2 files changed, 21 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c++/pr106445-1-O0.C b/libgomp/testsuite/libgomp.c++/pr106445-1-O0.C new file mode 100644 index 0000000..bcd499c --- /dev/null +++ b/libgomp/testsuite/libgomp.c++/pr106445-1-O0.C @@ -0,0 +1,3 @@ +// { dg-additional-options -O0 } + +#include "pr106445-1.C" diff --git a/libgomp/testsuite/libgomp.c++/pr106445-1.C b/libgomp/testsuite/libgomp.c++/pr106445-1.C new file mode 100644 index 0000000..329ce62 --- /dev/null +++ b/libgomp/testsuite/libgomp.c++/pr106445-1.C @@ -0,0 +1,18 @@ +#include <vector> + +int main() +{ +#pragma omp target + { + { + std::vector<int> v; + if (!v.empty()) + __builtin_abort(); + } + { + std::vector<int> v(100); + if (v.capacity() < 100) + __builtin_abort(); + } + } +} |