summaryrefslogtreecommitdiff
path: root/test/asan/TestCases/Linux/globals-gc-sections.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/asan/TestCases/Linux/globals-gc-sections.cc')
-rw-r--r--test/asan/TestCases/Linux/globals-gc-sections.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/asan/TestCases/Linux/globals-gc-sections.cc b/test/asan/TestCases/Linux/globals-gc-sections.cc
new file mode 100644
index 000000000..72a9e9498
--- /dev/null
+++ b/test/asan/TestCases/Linux/globals-gc-sections.cc
@@ -0,0 +1,13 @@
+// RUN: %clangxx_asan %s -o %t -Wl,--gc-sections -ffunction-sections -mllvm -asan-globals=0
+// RUN: %clangxx_asan %s -o %t -Wl,--gc-sections -ffunction-sections -mllvm -asan-globals=1
+
+// https://code.google.com/p/address-sanitizer/issues/detail?id=260
+// XFAIL: *
+
+int undefined();
+
+int (*unused)() = undefined;
+
+int main() {
+ return 0;
+}