diff options
author | Nathan Sidwell <nathan@acm.org> | 2016-12-12 12:52:37 -0500 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2016-12-12 12:52:37 -0500 |
commit | 88acc2e16743fc1e6384758c9a68cd6d2a8bbd46 (patch) | |
tree | e144ee82168a30bb3e355a038ccd3fffc0e0f803 /libiberty/testsuite | |
parent | d36cab83a963f5bb3773e0218cc02f63b0851d0b (diff) | |
download | gdb-88acc2e16743fc1e6384758c9a68cd6d2a8bbd46.zip gdb-88acc2e16743fc1e6384758c9a68cd6d2a8bbd46.tar.gz gdb-88acc2e16743fc1e6384758c9a68cd6d2a8bbd46.tar.bz2 |
Port c++/78252 from GCC
PR c++/78252
* cp-demangle.c (struct d_print_info): Add is_lambda_arg field.
(d_print_init): Initialize it.
(d_print_comp_inner) <DEMANGLE_COMPONENT_TEMPLATE_PARAM>: Check
is_lambda_arg for auto.
<DEMANGLE_COMPONENT_REFERENCE,
DEMANGLE_COMPONENT_RVALUE_REFERENCE>: Skip smashing check when
is_lambda_arg.
<DEMANGLE_COMPONENT_LAMBDA>: Increment is_lambda_arg around arg
printing.
* testsuite/demangle-expected: Add lambda auto mangling cases.
Diffstat (limited to 'libiberty/testsuite')
-rw-r--r-- | libiberty/testsuite/demangle-expected | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index af491d8..803decd 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -4634,3 +4634,32 @@ _Z12binary_rightIJLi1ELi2ELi3EEEv1AIXfRplT_LiEEE # ?: expression with missing third component could crash. AquT_quT_4mxautouT_4mxxx AquT_quT_4mxautouT_4mxxx + +# pr c++/78252 generic lambda mangling uses template parms, and leads +# to unbounded recursion if not dealt with properly +_Z7forwardIRZ3FoovEUlRT_E_EOS0_S1_ +Foo()::{lambda(auto:1&)#1}& forward<Foo()::{lambda(auto:1&)#1}&>(Foo()::{lambda(auto:1&)#1}&) + +_Z7forwardIZ3FoovEUlRiRT_E_EOS1_S2_ +Foo()::{lambda(int&, auto:1&)#1}&& forward<Foo()::{lambda(int&, auto:1&)#1}>(Foo()::{lambda(int&, auto:1&)#1}&) + +_Z7forwardIZ3FoovEUlRT_R1XIiEE0_EOS0_S1_ +Foo()::{lambda(auto:1&, X<int>&)#2}&& forward<Foo()::{lambda(auto:1&, X<int>&)#2}>(Foo()::{lambda(auto:1&, X<int>&)#2}&) + +_Z7forwardIZ3FoovEUlPA5_T_E1_EOS0_RS0_ +Foo()::{lambda(auto:1 (*&&forward<Foo()::{lambda(auto:1 (*) [5])#3}>(auto:1&)) [5])#3} + +_Z3eatIZ3FoovEUlRiRT_E_EvS2_ +void eat<Foo()::{lambda(int&, auto:1&)#1}>(Foo()::{lambda(int&, auto:1&)#1}&) + +_Z3eatIZ3FoovEUlRT_R1XIiEE0_EvS1_ +void eat<Foo()::{lambda(auto:1&, X<int>&)#2}>(Foo()::{lambda(auto:1&, X<int>&)#2}&) + +_Z3eatIZ3FoovEUlPA5_T_E1_EvRS0_ +void eat<Foo()::{lambda(auto:1 (*) [5])#3}>(Foo()::{lambda(auto:1 (*&) [5])#3}) + +_Z3eatIPiZ3FoovEUlPT_PT0_E4_EvRS1_RS3_ +void eat<int*, Foo()::{lambda(auto:1*, auto:2*)#6}>(int*&, Foo()::{lambda(auto:1*, auto:2*)#6}&) + +_Z3eatIPiZ3BarIsEvvEUlPsPT_PT0_E0_EvRS3_RS5_ +void eat<int*, void Bar<short>()::{lambda(short*, auto:1*, auto:2*)#2}>(int*&, void Bar<short>()::{lambda(short*, auto:1*, auto:2*)#2}&) |