blob: 7d7cf7bfc7e5309e8e16dfb8a6fcd3e6e5c906fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/* { dg-additional-options "-ftrivial-auto-var-init=zero" } */
int foo(unsigned *len);
/* Modified version of reproducer that does use "len" before init. */
int test_2()
{
unsigned len;
int rc;
rc = len; /* { dg-warning "use of uninitialized value 'len'" } */
rc = foo(&len);
if (!rc)
rc = len;
return rc;
}
|