1 // { dg-do run } 2 // Test that we properly evaluate the object parameter when accessing static 3 // members. 4 5 struct A { fA6 static void f () {} 7 static int i; 8 }; 9 10 int A::i; 11 12 int c = 0; 13 g()14A g () 15 { 16 ++c; 17 return A(); 18 } 19 main()20int main () 21 { 22 g().f(); 23 g().i = 42; 24 return (c != 2); 25 } 26