Skip to content

Commit 7ec6f7d

Browse files
committed
c++: Add testcase for issue fixed in GCC 15 [PR120126]
Patrick noticed that this PR's testcase has been fixed by the patch for PR c++/114292 (r15-7238-gceabea405ffdc8), more specifically the part that walks the type of DECL_EXPR DECLs. This simply adds the case to the testsuite. PR c++/120126 gcc/testsuite/ChangeLog: * g++.dg/cpp0x/lambda/lambda-ice33.C: New test.
1 parent 4f9c7b5 commit 7ec6f7d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// PR c++/120126
2+
// { dg-do compile { target c++11 } }
3+
4+
template <typename... Args>
5+
int sum(Args... args) {
6+
return [args...] { // { dg-error "parameter packs not expanded with" }
7+
typename decltype(args)::type temp;
8+
};
9+
}
10+
int main() {
11+
sum(1, 10);
12+
}

0 commit comments

Comments
 (0)