aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/ubsan/pr64289.c
blob: 1e38e6d3c29a8a645fc0d807983ba8542edffc01 (plain)
1
2
3
4
5
6
7
8
9
/* PR sanitizer/64289 */
/* { dg-do compile } */
/* { dg-options "-fsanitize=float-cast-overflow" } */

int
foo (int a)
{
  return (int) (0 ? 0 : a ? a : 0.5);
}