Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions regression-tests/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ else
exec_out_dir="$expected_results_dir/gcc-13"
elif [[ "$compiler_version" == *"g++-14"* ]]; then
exec_out_dir="$expected_results_dir/gcc-14"
elif [[ "$compiler_version" == *"g++-15"* ||
"$compiler_version" == *"g++ (Ubuntu 15"*
]]; then
exec_out_dir="$expected_results_dir/gcc-15"
else
printf "Unhandled compiler version:\n$compiler_version\n\n"
exit 2
Expand Down
5 changes: 5 additions & 0 deletions regression-tests/test-results/gcc-15-c++2b/gcc-version.output
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
gcc (Ubuntu 15.2.0-4ubuntu4) 15.2.0
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello world
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
v as X< 0> = 0
v as X< 1> = 1
v as X< 2> = 2
v as X< 3> = 3
v as X< 4> = 4
v as X< 5> = 5
v as X< 6> = 6
v as X< 7> = 7
v as X< 8> = 8
v as X< 9> = 9
v as X<10> = 10
v as X<11> = 11
v as X<12> = 12
v as X<13> = 13
v as X<14> = 14
v as X<15> = 15
v as X<16> = 16
v as X<17> = 17
v as X<18> = 18
v as X<19> = 19
as_const(v) as X< 0> = 0
as_const(v) as X< 1> = 1
as_const(v) as X< 2> = 2
as_const(v) as X< 3> = 3
as_const(v) as X< 4> = 4
as_const(v) as X< 5> = 5
as_const(v) as X< 6> = 6
as_const(v) as X< 7> = 7
as_const(v) as X< 8> = 8
as_const(v) as X< 9> = 9
as_const(v) as X<10> = 10
as_const(v) as X<11> = 11
as_const(v) as X<12> = 12
as_const(v) as X<13> = 13
as_const(v) as X<14> = 14
as_const(v) as X<15> = 15
as_const(v) as X<16> = 16
as_const(v) as X<17> = 17
as_const(v) as X<18> = 18
as_const(v) as X<19> = 19
move(v) as X< 0> = 0
move(v) as X< 1> = 1
move(v) as X< 2> = 2
move(v) as X< 3> = 3
move(v) as X< 4> = 4
move(v) as X< 5> = 5
move(v) as X< 6> = 6
move(v) as X< 7> = 7
move(v) as X< 8> = 8
move(v) as X< 9> = 9
move(v) as X<10> = 10
move(v) as X<11> = 11
move(v) as X<12> = 12
move(v) as X<13> = 13
move(v) as X<14> = 14
move(v) as X<15> = 15
move(v) as X<16> = 16
move(v) as X<17> = 17
move(v) as X<18> = 18
move(v) as X<19> = 19
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
x + x = 4.000000
x + x diff order 1 = 2.000000
x + x diff order 2 = 0.000000
x + x diff order 3 = 0.000000
x + x diff order 4 = 0.000000
x + x diff order 5 = 0.000000
x + x diff order 6 = 0.000000
0 - x = -2.000000
0 - x diff order 1 = -1.000000
0 - x diff order 2 = 0.000000
0 - x diff order 3 = 0.000000
0 - x diff order 4 = 0.000000
0 - x diff order 5 = 0.000000
0 - x diff order 6 = 0.000000
x^7 = 128.000000
x^7 diff order 1 = 448.000000
x^7 diff order 2 = 1344.000000
x^7 diff order 3 = 3360.000000
x^7 diff order 4 = 6720.000000
x^7 diff order 5 = 10080.000000
x^7 diff order 6 = 10080.000000
1/x = 0.500000
1/x diff order 1 = -0.250000
1/x diff order 2 = 0.250000
1/x diff order 3 = -0.375000
1/x diff order 4 = 0.750000
1/x diff order 5 = -1.875000
1/x diff order 6 = 5.625000
sqrt(x) = 1.414214
sqrt(x) diff order 1 = 0.353553
sqrt(x) diff order 2 = -0.088388
sqrt(x) diff order 3 = 0.066291
sqrt(x) diff order 4 = -0.082864
sqrt(x) diff order 5 = 0.145012
sqrt(x) diff order 6 = -0.326277
log(x) = 0.693147
log(x) diff order 1 = 0.500000
log(x) diff order 2 = -0.250000
log(x) diff order 3 = 0.250000
log(x) diff order 4 = -0.375000
log(x) diff order 5 = 0.750000
log(x) diff order 6 = -1.875000
exp(x) = 7.389056
exp(x) diff order 1 = 7.389056
exp(x) diff order 2 = 7.389056
exp(x) diff order 3 = 7.389056
exp(x) diff order 4 = 7.389056
exp(x) diff order 5 = 7.389056
exp(x) diff order 6 = 7.389056
sin(x) = 0.909297
sin(x) diff order 1 = -0.416147
sin(x) diff order 2 = -0.909297
sin(x) diff order 3 = 0.416147
sin(x) diff order 4 = 0.909297
sin(x) diff order 5 = -0.416147
sin(x) diff order 6 = -0.909297
cos(x) = -0.416147
cos(x) diff order 1 = -0.909297
cos(x) diff order 2 = 0.416147
cos(x) diff order 3 = 0.909297
cos(x) diff order 4 = -0.416147
cos(x) diff order 5 = -0.909297
cos(x) diff order 6 = 0.416147
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mixed-bounds-check.cpp2(9) int main(): Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
1
44
45
46
5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:126&, cpp2::impl::in<int>, cpp2::impl::in<int>) [with auto:126 = std::vector<int>; cpp2::impl::in<int> = const int]: Bounds safety violation
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
../../../include/cpp2util.h:10059:1: error: lambda-expression in template parameter type
../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’
mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
../../../include/cpp2util.h:10059:1: error: lambda-expression in template parameter type
../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’
mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
../../../include/cpp2util.h:10059:1: error: lambda-expression in template parameter type
../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’
mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
../../../include/cpp2util.h:10059:1: error: lambda-expression in template parameter type
../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’
mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
../../../include/cpp2util.h:10059:1: error: lambda-expression in template parameter type
../../../include/cpp2util.h:10096:59: note: in expansion of macro ‘CPP2_UFCS_’
mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
hello
2022
hello-ish
2022-ish
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1 "test"
0 ""
1 "test"
0 ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
true
false
"test.exe"
true
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
123
123
123
123
123
123
123456
123
123
123
123
123
123
123456
123456
123456
456
456
1e+10
1e+10
1e-10
1e-10
1e-10
1e-10
1e-10
1e-10
1e-10
123456
123456
456
456
1e+10
1e+10
1e-10
1e-10
1e-10
1e-10
1e-10
1e-10
1e-10
123
123
123
123
123
123
123456
123
123
123
123
123
123
123456
123456
456
1e+10
1e+10
1e-10
1e-10
1e-10
1e-10
1e-10
123456
456
1e+10
1e+10
1e-10
1e-10
1e-10
1e-10
1e-10
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
+X 1
+X 2
copy X 1
copy X 2
copy X 1
move X 2
+X 3
+X 4
copy X 3
copy X 4
move X 3
move X 4
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hello-ish maybe
2022-ish maybe
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
hello
2022
hello-ish
2022-ish
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
hello
2022
hello-ish
2022-ish
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

hello

2023
hello-ish
2023-ish
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

hello

2022
hello-ish
2022-ish
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello [world]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
12234
12234
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mixed-initialization-safety-3-contract-violation.cpp2(25) void fill(cpp2::impl::out<std::__cxx11::basic_string<char> >, cpp2::impl::in<std::__cxx11::basic_string<char> >, cpp2::impl::in<int>): Contract violation: fill: value must contain at least count elements
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
>> [xyzzy]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
inspected vec : std::vector
inspected arr : std::array
inspected var : std::variant
inspected myt : my_type
inspected vec : std::vector
inspected arr : std::array
inspected var : std::variant
inspected myt : my_type
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
i is between 11 and 20
less than 20
i is between 10 and 30
v is empty
v is empty
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
rev dodgson
(no match)
the answer
zero
plugh
zero
1 or 2
1 or 2
3
integer -42
xyzzy
(no match)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
>> hello
>> big
>> world
** ** **
>> [hello]
>> [big]
>> [world]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
1 42
2 84
3 168
4 336
5 672
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# std::monostate

---
# int(42)
42 in(0,100)
---
# int(24)
24 in(0,100)
---
# std::optional<int>(100)
100 std::optional<int>(100)
---
# std::any(-100)

---
# *int(314)

---
# std::unique_ptr<int>(1000)

---
# my_variant(std::monostate)

---
# my_variant(int(42))

---
# my_variant(int(24))

---
# my_variant(std::optional<int>(100))

---
# my_variant(std::any(-100))

---
# my_variant(*int(314))

---
# my_variant(std::unique_ptr<int>(1000))

---
Loading
Loading