shithub: scc

Download patch

ref: 4957aa7a96d1a90272f7efd1344800d476ab9aac
parent: 6fe9948519b756f46cb42fa132b158541f024222
author: Roberto E. Vargas Caballero <[email protected]>
date: Wed Jan 6 15:09:56 EST 2016

Fix mulf()

This function was using the limits from inteher types
instead of taking the float types.

--- a/cc1/fold.c
+++ b/cc1/fold.c
@@ -87,7 +87,7 @@
 mulf(TFLOAT l, TFLOAT r, Type *tp)
 {
 	struct limits *lim = getlimits(tp);
-	TFLOAT max = lim->max.i, min = lim->min.i;
+	TFLOAT max = lim->max.f, min = lim->min.f;
 
 	if (l > -1 && l <= 1 ||
 	    r > -1 && r <= 1 ||