Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/c-c++-common/ubsan/opts-4.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 /* { dg-do compile } */ | |
2 /* { dg-options "-fsanitize=undefined -fno-sanitize-recover=integer-divide-by-zero -fno-sanitize-recover=shift -fdump-tree-optimized" } */ | |
3 /* { dg-skip-if "" { *-*-* } { "-flto -fno-fat-lto-objects" } } */ | |
4 /* { dg-final { scan-tree-dump-times "__ubsan_handle_divrem_overflow_abort" 1 "optimized" } } */ | |
5 /* { dg-final { scan-tree-dump-times "__ubsan_handle_shift_out_of_bounds_abort" 1 "optimized" } } */ | |
6 /* { dg-final { scan-tree-dump-times "__ubsan_handle_type_mismatch_v1" 1 "optimized" } } */ | |
7 /* { dg-final { scan-tree-dump-not "__ubsan_handle_type_mismatch_v1_abort" "optimized" } } */ | |
8 | |
9 int | |
10 foo (int x, int y) | |
11 { | |
12 return x / y; | |
13 } | |
14 | |
15 int | |
16 bar (int x, int y) | |
17 { | |
18 return x << y; | |
19 } | |
20 | |
21 enum E { E0, E1, E2, E3 }; | |
22 | |
23 enum E | |
24 baz (enum E *x) | |
25 { | |
26 return *x; | |
27 } |