PHIOPT: move factor_out_conditional_operation over to use gimple_match_op
[official-gcc.git] / gcc / testsuite / g++.dg / abi / lambda-static-1.C
blob6299733fe2115b357392f9fe2707c0eb12a168d6
1 // { dg-do compile { target { c++14 && comdat_group } } }
2 // { dg-additional-options -fno-inline }
4 inline auto lamby () 
6   return [] {};
9 void direct ()
11   lamby ()();
14 void indirect ()
16   void (*invoke) () = lamby ();
18   invoke ();
21 // The call operator and the static invoker should be comdat, but not
22 // the same group.  (that would be a compiler incompatibility)
24 // { dg-final { scan-assembler ".section\[\t ]*.text._ZZ5lambyvENKUlvE_clEv,\[^\n\r]*,_ZZ5lambyvENKUlvE_clEv,comdat" { target { { ! *-*-solaris2.* } || { gas } } } } }
25 // { dg-final { scan-assembler ".section\[\t ]*.text._ZZ5lambyvENUlvE_4_FUNEv,\[^\n\r]*,_ZZ5lambyvENUlvE_4_FUNEv,comdat" { target { { ! *-*-solaris2.* } || { gas } } } } }
26 // { dg-final { scan-assembler ".group\[\t \]*_ZZ5lambyvENKUlvE_clEv,\[^\n\r\]*,#comdat" { target { *-*-solaris2.* && { ! gas } } } } }
27 // { dg-final { scan-assembler ".group\[\t \]*_ZZ5lambyvENUlvE_4_FUNEv,\[^\n\r\]*,#comdat" { target { *-*-solaris2.* && { ! gas } } } } }