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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [uninit-pred-6_b.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
 
2
/* { dg-do compile } */
3
/* { dg-options "-Wuninitialized -O2" } */
4
 
5
int g;
6
void bar();
7
void blah(int);
8
 
9
int foo (int n, int l, int m, int r)
10
{
11
  int v;
12
 
13
  if (n)
14
    if (l)
15
      v = r;
16
 
17
  if (m) g++;
18
  else   bar();
19
 
20
  if ( n && l)
21
      blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
22
 
23
  if (l)
24
    if (n)
25
      blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
26
 
27
  return 0;
28
}
29
 
30
int foo_2 (int n, int l, int m, int r)
31
{
32
  int v;
33
 
34
  if (n)
35
    if (l)
36
      v = r;
37
 
38
  if (m) g++;
39
  else   bar();
40
 
41
  if (n || l)
42
      blah (v); /* { dg-warning "uninitialized" "warning" } */
43
 
44
  return 0;
45
}
46
 

powered by: WebSVN 2.1.0

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