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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [uninit-pred-9_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
 
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 < 10) && (m != 100)  && (r < 20) )
14
    v = r;
15
 
16
  if (m) g++;
17
  else  bar();
18
 
19
  if (l > 100)
20
    if ( (n <= 9) &&  (m < 100)  && (r < 19) )
21
      blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
22
 
23
  if ( (n <= 8) &&  (m < 99)  && (r < 19) )
24
      blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
25
 
26
  return 0;
27
}
28
 
29
int foo_2 (int n, int l, int m, int r)
30
{
31
  int v;
32
 
33
  if ( (n < 10) && (m != 100)  && (r < 20) )
34
    v = r;
35
 
36
  if (m) g++;
37
  else  bar();
38
 
39
  if (l > 100)
40
    if ( (n <= 8) &&  (m < 101)  && (r < 19) )
41
      blah(v); /* { dg-warning "uninitialized" "real warning" } */
42
 
43
  return 0;
44
}

powered by: WebSVN 2.1.0

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