diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-14 15:38:35 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-14 15:38:35 +0000 |
commit | d2e0a8dd949ab874c6d66f97106bd5c270e2fa7d (patch) | |
tree | e8a99a0386e8f6bece630700da5915c8a312c2d9 /test/CodeGen/integer-overflow.c | |
parent | fdc82ccb3f2b23a89e7002fe8238e1422b00f96a (diff) |
Diffstat (limited to 'test/CodeGen/integer-overflow.c')
-rw-r--r-- | test/CodeGen/integer-overflow.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/test/CodeGen/integer-overflow.c b/test/CodeGen/integer-overflow.c index 6a7c3e51ee1b..0b28bc5b8a2d 100644 --- a/test/CodeGen/integer-overflow.c +++ b/test/CodeGen/integer-overflow.c @@ -65,13 +65,37 @@ void test1() { // TRAPV: getelementptr inbounds i32, i32* // CATCH_UB: getelementptr inbounds i32, i32* - // PR9350: char increment never overflows. - extern volatile signed char PR9350; + // PR9350: char pre-increment never overflows. + extern volatile signed char PR9350_char_inc; // DEFAULT: add i8 {{.*}}, 1 // WRAPV: add i8 {{.*}}, 1 // TRAPV: add i8 {{.*}}, 1 // CATCH_UB: add i8 {{.*}}, 1 - ++PR9350; + ++PR9350_char_inc; + + // PR9350: char pre-decrement never overflows. + extern volatile signed char PR9350_char_dec; + // DEFAULT: add i8 {{.*}}, -1 + // WRAPV: add i8 {{.*}}, -1 + // TRAPV: add i8 {{.*}}, -1 + // CATCH_UB: add i8 {{.*}}, -1 + --PR9350_char_dec; + + // PR9350: short pre-increment never overflows. + extern volatile signed short PR9350_short_inc; + // DEFAULT: add i16 {{.*}}, 1 + // WRAPV: add i16 {{.*}}, 1 + // TRAPV: add i16 {{.*}}, 1 + // CATCH_UB: add i16 {{.*}}, 1 + ++PR9350_short_inc; + + // PR9350: short pre-decrement never overflows. + extern volatile signed short PR9350_short_dec; + // DEFAULT: add i16 {{.*}}, -1 + // WRAPV: add i16 {{.*}}, -1 + // TRAPV: add i16 {{.*}}, -1 + // CATCH_UB: add i16 {{.*}}, -1 + --PR9350_short_dec; // PR24256: don't instrument __builtin_frame_address. __builtin_frame_address(0 + 0); |