Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle6.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
line wrap: on
line source
// Test lambda mangling // { dg-do compile { target { c++11 && c++17_down } } } // { dg-require-weak "" } // { dg-options "-fno-inline" } template<typename T> struct R { static int x; }; // "int i;" makes the op() non-constexpr in C++17. In C++20, it does not. template<typename T> int R<T>::x = []{int i; return 1;}(); template int R<int>::x; // Type of lambda in intializer of R<int>::x: N1RIiE1xMUlvE_E // Corresponding operator(): _ZNK1RIiE1xMUlvE_clEv // { dg-final { scan-assembler "_ZNK1RIiE1xMUlvE_clEv" } } // { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZNK1RIiE1xMUlvE_clEv" { target { ! { *-*-mingw* *-*-cygwin } } } } }