X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fratests.cs;h=870d9c719e0bbbc7276ce8493f95b4823eee535e;hb=c118dae7d3dd5fa8fb3cefeb837b61d5240b9f48;hp=a41d24f4b507862a2db588770950f2e495b1965c;hpb=d53d136156d8313fcf7ea66a8836cde263c7a934;p=mono.git diff --git a/mono/mini/ratests.cs b/mono/mini/ratests.cs index a41d24f4b50..870d9c719e0 100644 --- a/mono/mini/ratests.cs +++ b/mono/mini/ratests.cs @@ -347,4 +347,37 @@ public class Tests { return 0; } + + public static string return_string (string s) { + for (int i = 0; i < 1000; ++i) + ; + return s; + } + + public static int test_0_switch_critical_edges () { + // A spill load is inserted at the end of the bblock containing the OP_BR_REG, + // overwriting the source reg of the OP_BR_REG. The edge is not really + // a critical edge, since its source bblock only has 1 exit, but it must + // be treated as such. + for (int i=0; i < UInt16.MaxValue; i++) { + Char c = Convert.ToChar (i); + switch (i) { + case 0x0009: + case 0x000A: + case 0x000B: + case 0x2028: + case 0x2029: + case 0x202F: + case 0x205F: + case 0x3000: + //Console.WriteLine ((i.ToString () + (int)c)); + return_string ((i.ToString () + (int)c)); + break; + default: + break; + } + } + + return 0; + } }