aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/FrontendC++/2009-02-07-VolatileArrayRefHack.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-07 23:37:03 +0000
committerChris Lattner <sabre@nondot.org>2009-02-07 23:37:03 +0000
commit4f8542f31de057295f3ce323d11f6eb7115f059d (patch)
tree395dc6cf085eb62cb08fe1fa37095bcbc79d8c77 /llvm/test/FrontendC++/2009-02-07-VolatileArrayRefHack.cpp
parent2cf8c44e43a2b9bd1e3dc1155c3aaa5892911234 (diff)
downloadllvm-4f8542f31de057295f3ce323d11f6eb7115f059d.zip
llvm-4f8542f31de057295f3ce323d11f6eb7115f059d.tar.gz
llvm-4f8542f31de057295f3ce323d11f6eb7115f059d.tar.bz2
testcase for r64049 of llvm-gcc.
llvm-svn: 64050
Diffstat (limited to 'llvm/test/FrontendC++/2009-02-07-VolatileArrayRefHack.cpp')
-rw-r--r--llvm/test/FrontendC++/2009-02-07-VolatileArrayRefHack.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/FrontendC++/2009-02-07-VolatileArrayRefHack.cpp b/llvm/test/FrontendC++/2009-02-07-VolatileArrayRefHack.cpp
new file mode 100644
index 0000000..b8589b0
--- /dev/null
+++ b/llvm/test/FrontendC++/2009-02-07-VolatileArrayRefHack.cpp
@@ -0,0 +1,7 @@
+// RUN: %llvmgxx -S %s -o - | grep {volatile load}
+// PR3320
+
+void test(volatile int *a) {
+ // should be a volatile load.
+ a[0];
+}