OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr45083.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* PR tree-optimization/45083 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2 -Wuninitialized" } */
4
 
5
struct S { char *a; unsigned b; unsigned c; };
6
extern int foo (const char *);
7
extern void bar (int, int);
8
 
9
static void
10
baz (void)
11
{
12
  struct S cs[1];       /* { dg-message "was declared here" } */
13
  switch (cs->b)        /* { dg-warning "cs\[^\n\r\]*\\.b\[^\n\r\]*is used uninitialized" } */
14
    {
15
    case 101:
16
      if (foo (cs->a))  /* { dg-warning "cs\[^\n\r\]*\\.a\[^\n\r\]*may be used uninitialized" } */
17
        bar (cs->c, cs->b);     /* { dg-warning "cs\[^\n\r\]*\\.c\[^\n\r\]*may be used uninitialized" } */
18
    }
19
}
20
 
21
void
22
test (void)
23
{
24
  baz ();
25
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.