xref: /llvm-project/compiler-rt/test/safestack/lto.c (revision e5f025dad932591b2a9d5394da8c901acdff0346)
1b64d0b1eSPeter Collingbourne // REQUIRES: lto
2b64d0b1eSPeter Collingbourne 
3b64d0b1eSPeter Collingbourne // RUN: %clang_lto_safestack %s -o %t
4b64d0b1eSPeter Collingbourne // RUN: %run %t
5b64d0b1eSPeter Collingbourne 
6b64d0b1eSPeter Collingbourne // Test that safe stack works with LTO.
7*e5f025daSAaron Ballman int puts(const char *);
8b64d0b1eSPeter Collingbourne 
main()9b64d0b1eSPeter Collingbourne int main() {
10b64d0b1eSPeter Collingbourne   char c[] = "hello world";
11b64d0b1eSPeter Collingbourne   puts(c);
12b64d0b1eSPeter Collingbourne   return 0;
13b64d0b1eSPeter Collingbourne }
14