diff options
author | Ian Lance Taylor <iant@golang.org> | 2023-06-26 09:57:21 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2023-06-26 09:57:21 -0700 |
commit | aa1e672b5d99102b03eb5fb9c51609c45f62bff7 (patch) | |
tree | 886212591b1c9d127eaaf234a4a2e22452ea384a /gcc/testsuite/g++.dg | |
parent | 97e31a0a2a2d2273687fcdb4e5416aab1a2186e1 (diff) | |
parent | 3a39a31b8ae9c6465434aefa657f7fcc86f905c0 (diff) | |
download | gcc-devel/gccgo.zip gcc-devel/gccgo.tar.gz gcc-devel/gccgo.tar.bz2 |
Merge from trunk revision 3a39a31b8ae9c6465434aefa657f7fcc86f905c0.devel/gccgo
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp23/cplusplus.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp26/cplusplus.C | 3 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/diagnostic/missing-header-pr110164.C | 10 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/torture/pr110332.C | 16 |
4 files changed, 30 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/cpp23/cplusplus.C b/gcc/testsuite/g++.dg/cpp23/cplusplus.C index 29a941b..ff331c2 100644 --- a/gcc/testsuite/g++.dg/cpp23/cplusplus.C +++ b/gcc/testsuite/g++.dg/cpp23/cplusplus.C @@ -1,4 +1,4 @@ // { dg-do compile } // { dg-options "-std=c++23" } -static_assert(__cplusplus > 202002L); +static_assert(__cplusplus == 202302L); diff --git a/gcc/testsuite/g++.dg/cpp26/cplusplus.C b/gcc/testsuite/g++.dg/cpp26/cplusplus.C new file mode 100644 index 0000000..08c502e --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp26/cplusplus.C @@ -0,0 +1,3 @@ +// { dg-do compile { target c++26_only } } + +static_assert(__cplusplus > 202302L); diff --git a/gcc/testsuite/g++.dg/diagnostic/missing-header-pr110164.C b/gcc/testsuite/g++.dg/diagnostic/missing-header-pr110164.C new file mode 100644 index 0000000..1598007 --- /dev/null +++ b/gcc/testsuite/g++.dg/diagnostic/missing-header-pr110164.C @@ -0,0 +1,10 @@ +// { dg-require-effective-target c++11 } + +#include <map> + +std::array<int, 10> a1; /* { dg-error "incomplete type" } */ +/* { dg-message "'std::array' is defined in header '<array>'; this is probably fixable by adding '#include <array>'" "hint" { target *-*-* } .-1 } */ + +std::array<int, 10> a2 {5}; /* { dg-error "incomplete type" } */ +/* { dg-message "'std::array' is defined in header '<array>'; this is probably fixable by adding '#include <array>'" "hint" { target *-*-* } .-1 } */ + diff --git a/gcc/testsuite/g++.dg/torture/pr110332.C b/gcc/testsuite/g++.dg/torture/pr110332.C new file mode 100644 index 0000000..31dc93e --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr110332.C @@ -0,0 +1,16 @@ +// { dg-do compile } + +struct SlotIndex { int lie; }; +SlotIndex si7, si8; + +unsigned u9, u6; +bool b3, b4; +unsigned &value() { + return b4 ? u6 : u9; +} +void transferValues() { + unsigned RegIdx; + SlotIndex End; + RegIdx = value(); + End = b3 ? si7 : si8; +} |