Debian Codegraph @

gcc/testsuite/gcc.dg/plugin/infoleak-uninit-size-1.c

raw
1 /* Reduced from infoleak ICE seen on Linux kernel with
2 -Wno-analyzer-use-of-uninitialized-value.
3
4 Verify that we don't ICE when complaining about an infoleak
5 when the size is uninitialized. */
6
7 /* { dg-do compile } */
8 /* { dg-options "-fanalyzer -Wno-analyzer-use-of-uninitialized-value" } */
9 /* { dg-require-effective-target analyzer } */
10
11 extern unsigned long
12 copy_to_user(void* to, const void* from, unsigned long n);
13
14 unsigned long
15 test_uninit_size (void *to, void *from)
16 {
17 unsigned long n;
18 char buf[16];
19 return copy_to_user(to, from, n);
20 }