eccp optimized the assert away!?!, anyway I wanna fix the real error first...
authorMatthias Braun <matze@braunis.de>
Tue, 2 Sep 2008 09:23:51 +0000 (09:23 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 2 Sep 2008 09:23:51 +0000 (09:23 +0000)
[r21637]

ir/be/test/fehler142.c

index 790028f..095399b 100644 (file)
@@ -1,15 +1,10 @@
-#include <assert.h>
-
-void foo(float zNear, float zFar)
+float foo(float zNear, float zFar)
 {
-       float v;
        float depth = zFar - zNear;
 
-       v = -2 * zFar * zNear / depth;
-       assert(v < 0);
+       return -2 * zFar * zNear / depth;
 }
 
 int main(void) {
-       foo(4, 2048);
-       return 0;
+       return foo(4, 2048) >= 0;
 }