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

int
foo (void)
{
  static const int a = 0.5;
  static const int b = (int) 13.5 + 1;
  return a + b;
}