summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/debug/pr29609-1.c
blob: 85069ebd650efac884e845d5ae9ccb21cbd9d047 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* PR debug/29609 */
/* Verify that breakpoint on the break is hit.
   This version of the test just checks that it can be compiled, linked
   and executed, further testing is done in corresponding gcc.dg/dwarf2/
   test and hopefully in gdb testsuite.  */
/* { dg-do run } */
/* { dg-options "-O0 -g -dA" } */

extern void abort (void);

int
foo (void)
{
  int a, i;

  for (i = 1; i <= 10; i++)
    {
      if (i < 3)
	a = 1;
      else
	break;
      a = 5;
    }
  return a;
}

int
main (void)
{
  if (foo () != 5)
    abort ();
  return 0;
}