blob: ebf560ab9805d37aa8c2a47f14e940bc19b8dd5e [file] [log] [blame]
Fariborz Jahanian65ad5a42010-04-18 21:01:23 +00001// RUN: %clang_cc1 -emit-llvm -o %t %s
2// PR6769
3
4struct X {
5 static void f();
6};
7
8void X::f() {
9 static int *i;
10 {
11 struct Y {
12 static void g() {
13 i = new int();
14 *i = 100;
15 (*i) = (*i) +1;
16 }
17 };
18 (void)Y::g();
19 }
20 (void)i;
21}
Fariborz Jahanian4c464b92010-05-26 21:45:50 +000022
23// pr7101
24void foo() {
25 static int n = 0;
26 struct Helper {
27 static void Execute() {
28 n++;
29 }
30 };
31 Helper::Execute();
32}
33