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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [Wunreachable-1.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -Wunreachable-code" } */
3
 
4
extern void foo (void);
5
extern void baz (void);
6
 
7
void bar (int i)
8
{
9
  if (i < 2)
10
    {
11
      baz ();
12
      return;
13
    }
14
  else
15
    {
16
      if (i >= 4 && i <= 5)
17
        foo ();
18
      return;
19
    }
20
 
21
  baz ();       /* { dg-warning "will never be executed" "" } */
22
  baz ();
23
  baz ();
24
}

powered by: WebSVN 2.1.0

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