aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/pr106181.c
blob: 6a78b78d35258ac4134e660600812ed7785e3855 (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <stdint.h>

void *
foo (int x)
{
  return __builtin_calloc (x * 1.1, 1); /* { dg-line calloc } */

  /* { dg-warning "use of floating-point arithmetic here might yield unexpected results" "warning" { target *-*-* } calloc } */
  /* { dg-message "operand '\(\\d|e|f|\\.|\\+|\)+' is of type 'double'" "note" { target *-*-* } calloc } */
  /* { dg-message "only use operands of an integer type inside the size argument" "note" { target *-*-* } calloc } */
}