Hi Luc, On 19 March 2017 at 15:22, Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> wrote: > On Fri, Mar 17, 2017 at 12:00:00AM +0000, Dibyendu Majumdar wrote: >> Hi, >> >> In this simple example: >> >> extern int printf(const char *, ...); >> int main(void) >> { >> printf("%f\n", (double)-1); >> return 0; >> } >> >> The linearized output is: >> >> main: >> .L0: >> <entry-point> >> symaddr.64 %r1 <- <anon symbol:000001BAAB487258> >> call.32 %r2 <- printf, %r1, $-1 >> ret.32 $0 >> >> The cast to double has been removed. I am trying to understand where >> this is happening as it seems to happen quite early on. Any tips on >> where I should look? > > This is fixed by the patch I sent two days ago: > https://patchwork.kernel.org/patch/9618765/ > I found that in the simplification phase no account is taken of the fact that a constant is floating point. Please try to run this test and let me know if it works. https://github.com/dibyendumajumdar/dmr_c/blob/master/tests/netlib/paranoia.c I had to switch off simplifications of instructions that have a floating point type. Regards Dibyendu -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html