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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [uninit-pred-2_b.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
/* { dg-do compile } */
2
/* { dg-options "-Wuninitialized -O2" } */
3
 
4
int g;
5
void bar (void);
6
void blah (int);
7
 
8
int foo (int n, int m, int r)
9
{
10
  int flag = 0;
11
  int v;
12
 
13
  if (n)
14
    {
15
      v = r;
16
      flag = 1;
17
    }
18
 
19
  if (m)
20
    g++;
21
  else
22
    bar();
23
 
24
  /* Wrong guard */
25
  if (!flag)
26
    blah(v); /* { dg-warning "uninitialized" "real uninitialized var warning" } */
27
 
28
  return 0;
29
}

powered by: WebSVN 2.1.0

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