aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/pr94047.c
blob: a5796735c231ad787dc56c438e5cc662994afaab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
typedef struct list
{
  struct list *next;
} tlist;

void
bar (struct list *l)
{
  l->next = l->next->next;
}

void
foo (void)
{
  struct list l; /* { dg-message "region created on stack here" } */
  tlist t = l; /* { dg-warning "use of uninitialized value 'l'" } */
  for (;;)
    bar (&t);
}