1 /* PR sanitizer/58443 */ 2 /* { dg-do compile } */ 3 /* { dg-options "-fsanitize=undefined -w" } */ 4 5 int foo(int u,int o)6foo (int u, int o) 7 { 8 return u >> o; 9 } 10 11 int bar(int u,int o)12bar (int u, int o) 13 { 14 return u / o; 15 } 16 17 /* { dg-final { scan-assembler "__ubsan_handle_divrem_overflow" } } */ 18 /* { dg-final { scan-assembler "__ubsan_handle_shift_out_of_bounds" } } */ 19