summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/integer-overflow.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-03-01 00:03:48 +0000
committerChris Lattner <sabre@nondot.org>2011-03-01 00:03:48 +0000
commit2e72da947c48005ed14ca78f61f7a43abf4c58e9 (patch)
tree4078b31e5c9ad55dd1216d360ba63a612c22724f /clang/test/CodeGen/integer-overflow.c
parent49d15b959ea449d891f4204914bdcefe4daf79fc (diff)
downloadbcm5719-llvm-2e72da947c48005ed14ca78f61f7a43abf4c58e9.tar.gz
bcm5719-llvm-2e72da947c48005ed14ca78f61f7a43abf4c58e9.zip
-fwrapv should turn off the inbounds markers from geps used for pointer
arithmetic. This is part of PR9256, it would be great if someone else wired up -fno-strict-overflow in the driver to -fwrapv. llvm-svn: 126718
Diffstat (limited to 'clang/test/CodeGen/integer-overflow.c')
-rw-r--r--clang/test/CodeGen/integer-overflow.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGen/integer-overflow.c b/clang/test/CodeGen/integer-overflow.c
index 103cc8427bb..066ef895744 100644
--- a/clang/test/CodeGen/integer-overflow.c
+++ b/clang/test/CodeGen/integer-overflow.c
@@ -49,4 +49,12 @@ void test1() {
// TRAPV: llvm.sadd.with.overflow.i32({{.*}}, i32 -1)
// TRAPV_HANDLER: foo(
--a;
+
+
+ // -fwrapv should turn off inbounds for GEP's, PR9256
+ extern int* P;
+ ++P;
+ // DEFAULT: getelementptr inbounds i32*
+ // WRAPV: getelementptr i32*
+ // TRAPV: getelementptr inbounds i32*
}
OpenPOWER on IntegriCloud