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-2.c] - Blame information for rev 856

Go to most recent revision | 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 int foo (const char *);
5
extern void baz (void);
6
const char *a[] = { "one", "two" };
7
 
8
void bar (void)
9
{
10
  int i;
11
 
12
  for (i = 0; i < 2; i++)
13
    if (! foo (a[i]))
14
      return;
15
 
16
  baz ();       /* { dg-bogus "will never be executed" } */
17
  baz ();
18
  baz ();
19
}

powered by: WebSVN 2.1.0

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