File: test_nodevirtualize.cpp

package info (click to toggle)
libcrypto%2B%2B 8.9.0-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,960 kB
  • sloc: cpp: 110,116; asm: 10,493; sh: 8,937; makefile: 55
file content (19 lines) | stat: -rw-r--r-- 594 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <string>

// https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)

int main(int argc, char* argv[])
{
    // GCC 12 is removing live code. We don't know why.
    // https://github.com/weidai11/cryptopp/issues/1134 and
    // https://github.com/weidai11/cryptopp/issues/1141
#if defined(__linux__) && (GCC_VERSION >= 120000)
    // On successful compile -fno-devirtualize will be used
    // to work around the problem.
    ;;
#else
    int x[-1];
#endif
    return 0;
}