On Fri, Dec 08, 2017 at 09:49:22AM +0800, Christopher Li wrote: > On Fri, Dec 8, 2017 at 1:16 AM, Luc Van Oostenryck > <luc.vanoostenryck@xxxxxxxxx> wrote: > > Expressions involving the logical-not '!' does not > > call degenerate(). > > > > Since the result type is always 'int' and thus independent > > of the expression being negated, this has no effect on the > > type-checking but the linearization is wrong. > > For example, code like: > > int foo(void) > > { > > if (!arr) return 1; > > return 0; > > } > > generates: > > foo: > > load %r6 <- 0[arr] > > seteq.32 %r7 <- VOID, $0 > > ret.32 %r7 > > The 'load' being, obviously wrong. > > > > Fix this by adding the missing degenerate(). > > Good catch. This series looks good to me. > > Chris Thanks, -- Luc -- 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