diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2011-05-02 19:39:53 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2011-05-02 19:39:53 +0000 |
commit | 01af97d3b23bded2b2b21af19bbc6e4cce49e5b3 (patch) | |
tree | 64a10f4c4154739d4a8191d7e1b52ce497f4ebd6 /test/CodeGen/integer-overflow.c | |
parent | c3b054d250cdca485c71845089c316e10610ebad (diff) |
Notes
Diffstat (limited to 'test/CodeGen/integer-overflow.c')
-rw-r--r-- | test/CodeGen/integer-overflow.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/integer-overflow.c b/test/CodeGen/integer-overflow.c index 103cc8427bb07..1d460656a1c7a 100644 --- a/test/CodeGen/integer-overflow.c +++ b/test/CodeGen/integer-overflow.c @@ -49,4 +49,18 @@ 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* + + // PR9350: char increment never overflows. + extern volatile signed char PR9350; + // DEFAULT: add i8 {{.*}}, 1 + // WRAPV: add i8 {{.*}}, 1 + // TRAPV: add i8 {{.*}}, 1 + ++PR9350; } |