Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / test-403.cs
1 // Compiler options: -unsafe
2
3 // this tests making a pointer to a pointer
4
5 using System;
6
7 unsafe class Foo
8 {
9         public static int Main ()
10         {
11                 int a;
12                 int *b;
13                 int **c;
14
15                 a = 42;
16                 b = &a;
17                 c = &b;
18                 
19                 Console.WriteLine ("*c == b : {0}", *c == b);
20                 Console.WriteLine ("**c == a : {0}", **c == a);
21
22                 if (*c == b && **c == a)
23                 {
24                         Console.WriteLine ("Test passed");
25                         return 0;
26                 }
27                 else
28                 {
29                         Console.WriteLine ("Test failed");
30                         return 1;
31                 }
32         }
33 }