1 /* PR debug/37616 */
2 /* Test that one can put breakpoints onto continue, exitlab and break
3    and actually see program reaching those breakpoints.  */
4 /* { dg-do compile } */
5 /* { dg-options "-O0 -gdwarf -dA" } */
6 
7 extern void abort (void);
8 
9 int
foo(int parm)10 foo (int parm)
11 {
12   int varj, varm;
13 
14   for (varj = 0; varj < 10; varj++)
15     {
16       if (varj == 5)
17 	continue;
18       if (varj == 7 && !parm)
19 	goto exitlab;
20       if (varj == 9)
21 	break;
22       varm = varj;
23     }
24 
25 exitlab:
26   return varm;
27 }
28 
29 int
main(void)30 main (void)
31 {
32   if (foo (0) != 6)
33     abort ();
34   if (foo (1) != 8)
35     abort ();
36   return 0;
37 }
38 
39 /* { dg-final { scan-assembler "pr37616.c:17" } } */
40 /* { dg-final { scan-assembler "pr37616.c:19" } } */
41 /* { dg-final { scan-assembler "pr37616.c:21" } } */
42