summaryrefslogtreecommitdiff
path: root/test/safestack/lto.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/safestack/lto.c')
-rw-r--r--test/safestack/lto.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/safestack/lto.c b/test/safestack/lto.c
new file mode 100644
index 000000000000..6ee23a1c72f2
--- /dev/null
+++ b/test/safestack/lto.c
@@ -0,0 +1,12 @@
+// REQUIRES: lto
+
+// RUN: %clang_lto_safestack %s -o %t
+// RUN: %run %t
+
+// Test that safe stack works with LTO.
+
+int main() {
+ char c[] = "hello world";
+ puts(c);
+ return 0;
+}