blob: 33b348f1d987032050761ed6ccd4eea483250245 [file] [log] [blame]
/* PR sanitizer/79757 */
/* { dg-do run } */
/* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
/* { dg-options "-fsanitize=undefined" } */
int
main (void)
{
int
div (int n)
{
int i = 5 / n;
return i;
}
int
shift (int n)
{
int i = 5 << n;
return i;
}
int j = shift (100);
int i = div (0);
return 0;
}
/* { dg-output "shift exponent 100 is too large for \[^\n\r]*-bit type 'int'\[^\n\r]*(\n|\r\n|\r)" } */
/* { dg-output "\[^\n\r]*division by zero" } */