1a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsieh// PR c++/55223 2a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsieh// { dg-options "-std=c++11 -fabi-version=0" } 3a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsieh// { dg-final { scan-assembler "_ZN8functionC1IZN1CIiE4testES_Ed_UliE_EET_" } } 4a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsieh 5a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsiehstruct function 6a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsieh{ 7a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsieh template <class U> function(U u) { } 8a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsieh}; 9a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsieh 10a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsiehtemplate<typename T> struct C 11a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsieh{ 12a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsieh static T test(function f = [](int i){return i;}) { } 13a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsieh}; 14a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsieh 15a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsiehint main() 16a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsieh{ 17a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsieh C<int>::test(); 18a0eb90e256eb3415794da4ad54cb6f54d95f5c96Andrew Hsieh} 19