Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/pr78973.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* PR c/78973 - warning: ‘memcpy’: specified size exceeds maximum object size Test case for what was initially thought to be a false positive but after deeper investigation turned out to be a true positive. { dg-do compile } { dg-options "-O2 -Wall" } */ static void f (void *p, int n) { if (n <= 4) __builtin_memset (p, 0, n); /* { dg-warning "exceeds maximum object size" "pr79073" { xfail ilp32 } } */ } void g (void *d, unsigned n) { if (n < 5) n = 5; f (d, n); }