shithub: mc

Download patch

ref: 56ddddaa8ea95295ebd7743a1c828f0365bf7bb8
parent: e084f0b744935182770b34045d72edc6f5e91048
author: Ori Bernstein <[email protected]>
date: Sat Jun 30 09:36:47 EDT 2012

Add test for matching constants.

--- a/8/simp.c
+++ b/8/simp.c
@@ -394,6 +394,8 @@
     if (exprop(n) == Ocons)
         return n->expr.args[1];
     else
+        /* FIXME: WRONG WRONG WRONG. Union vals 
+         * aren't only words. */
         return load(add(addr(n, tyword), wordsz));
 }
 
binary files /dev/null b/test/matchconst differ
--- a/test/tests
+++ b/test/tests
@@ -41,8 +41,10 @@
 B gsizeof	E	5
 B mkunion	E	0
 B matchint	E	84
+B matchconst	E	88
 B matchunion	E	84
 B matchargunion	E	69
+B matchbind	E	8
 F declmismatch
 F infermismatch
 F flow