"disable_omit_fp" can now be included in MONO_DEBUG
[mono-project.git] / mcs / tests / test-716.cs
blob0d3edba8ab6a187ad09119c023ad1d0aafd5f607
1 using System;
2 using System.Reflection;
4 struct S
8 struct SS
10 static int i = 9;
13 struct SSS
15 static SSS Empty;
17 static SSS ()
19 Empty = new SSS ();
23 class C
27 class CC
29 static int i = 9;
32 class CCC
34 static CCC Empty;
36 static CCC ()
38 Empty = new CCC ();
42 class X
44 public static int Main ()
46 Type t = typeof (S);
47 if ((t.Attributes & TypeAttributes.BeforeFieldInit) == 0)
48 return 1;
50 t = typeof (SS);
51 if ((t.Attributes & TypeAttributes.BeforeFieldInit) == 0)
52 return 2;
54 t = typeof (SSS);
55 if ((t.Attributes & TypeAttributes.BeforeFieldInit) != 0)
56 return 3;
58 t = typeof (C);
59 if ((t.Attributes & TypeAttributes.BeforeFieldInit) == 0)
60 return 4;
62 t = typeof (CC);
63 if ((t.Attributes & TypeAttributes.BeforeFieldInit) == 0)
64 return 5;
66 t = typeof (CCC);
67 if ((t.Attributes & TypeAttributes.BeforeFieldInit) != 0)
68 return 6;
70 Console.WriteLine ("OK");
71 return 0;