+2007-03-11 Zoltan Varga <vargaz@gmail.com>
+
+ * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
+ #81102.
+
+ * generics.2.cs: Add regression test.
+
2007-03-09 Wade berrier <wberrier@novell.com>
* mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
return 0;
}
+ public static int test_0_box_brtrue_opt_regress_81102 () {
+ if (new Foo<int>(5).ToString () == "null")
+ return 0;
+ else
+ return 1;
+ }
+
+ public class Foo<T1>
+ {
+ public Foo(T1 t1)
+ {
+ m_t1 = t1;
+ }
+
+ public override string ToString()
+ {
+ return Bar(m_t1 == null ? "null" : "null");
+ }
+
+ public String Bar (String s) {
+ return s;
+ }
+
+ readonly T1 m_t1;
+ }
+
public interface IMyHandler {
object Bar<T>();
}
link_bblock (cfg, bblock, tblock);
CHECK_BBLOCK (target, ip, tblock);
ins->inst_target_bb = tblock;
+ GET_BBLOCK (cfg, bbhash, tblock, ip);
+ link_bblock (cfg, bblock, tblock);
if (sp != stack_start) {
handle_stack_args (cfg, bblock, stack_start, sp - stack_start);
sp = stack_start;