gcc/testsuite/gcc.dg/analyzer/pr106181.c
raw| 1 | #include <stdint.h> |
| 2 | |
| 3 | void * |
| 4 | foo (int x) |
| 5 | { |
| 6 | return __builtin_calloc (x * 1.1, 1); /* { dg-line calloc } */ |
| 7 | |
| 8 | /* { dg-warning "use of floating-point arithmetic here might yield unexpected results" "warning" { target *-*-* } calloc } */ |
| 9 | /* { dg-message "operand '\(\\d|e|f|\\.|\\+|\)+' is of type 'double'" "note" { target *-*-* } calloc } */ |
| 10 | /* { dg-message "only use operands of an integer type inside the size argument" "note" { target *-*-* } calloc } */ |
| 11 | } |