libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / plugin / infoleak-uninit-size-2.c
bloba8a383f4b2d391e55c34abae862901061ed5f937
1 /* Reduced from infoleak ICE seen on Linux kernel with
2 -Wno-analyzer-use-of-uninitialized-value.
4 Verify that we complain about the uninit value when
5 -Wno-analyzer-use-of-uninitialized-value isn't supplied. */
7 /* { dg-do compile } */
8 /* { dg-options "-fanalyzer" } */
9 /* { dg-require-effective-target analyzer } */
11 extern unsigned long
12 copy_to_user(void* to, const void* from, unsigned long n);
14 unsigned long
15 test_uninit_size (void *to, void *from)
17 unsigned long n;
18 char buf[16];
19 return copy_to_user(to, from, n); /* { dg-warning "use of uninitialized value 'n'" } */