Corrected date in changelog
[official-gcc.git] / gcc / testsuite / gcc.dg / debug / pr36690-2.c
blobddda18cf73c4b6b9e045067244134cd9a132297d
1 /* PR debug/36690 */
2 /* Verify that breakpoint can be put on goto f1, it is hit and
3 varz at that spot is defined and contains 5. Nowhere else
4 in the function should be varz in the scope.
5 This version of the test just checks that it can be compiled, linked
6 and executed, further testing is done in corresponding gcc.dg/dwarf2/
7 test and hopefully in gdb testsuite. */
8 /* { dg-do run } */
9 /* { dg-options "-O0 -g -dA" } */
11 int cnt;
13 void
14 bar (int i)
16 cnt += i;
19 void
20 foo (int i)
22 if (!i)
23 bar (0);
24 else
26 static int varz = 5;
27 goto f1;
29 bar (1);
30 f1:
31 bar (2);
34 int
35 main (void)
37 foo (0);
38 foo (1);
39 return 0;