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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [debug/] [pr37616.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* PR debug/37616 */
2
/* Test that one can put breakpoints onto continue, exitlab and break
3
   and actually see program reaching those breakpoints.
4
   This version of the test just checks that it can be compiled, linked
5
   and executed, further testing is done in corresponding gcc.dg/dwarf2/
6
   test and hopefully in gdb testsuite.  */
7
/* { dg-do run } */
8
/* { dg-options "-O0 -g -dA" } */
9
 
10
extern void abort (void);
11
 
12
int
13
foo (int parm)
14
{
15
  int varj, varm;
16
 
17
  for (varj = 0; varj < 10; varj++)
18
    {
19
      if (varj == 5)
20
        continue;
21
      if (varj == 7 && !parm)
22
        goto exitlab;
23
      if (varj == 9)
24
        break;
25
      varm = varj;
26
    }
27
 
28
exitlab:
29
  return varm;
30
}
31
 
32
int
33
main (void)
34
{
35
  if (foo (0) != 6)
36
    abort ();
37
  if (foo (1) != 8)
38
    abort ();
39
  return 0;
40
}

powered by: WebSVN 2.1.0

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