Re: [Qemu-devel] [PATCH] util/iov: Fix -O1 uninitialized variable warning

2013-07-18 Thread Richard Henderson
On 07/18/2013 09:36 AM, Peter Maydell wrote: > On 18 July 2013 17:14, Richard Henderson wrote: >> At -O2, code in the form >> >> if (p) A; B; if (p) C; >> >> may be rearranged via "jump threading" into >> >> if (p) { A; B; C; } else { B; } >> >> But at -O1 this doesn't happen and we -Werror ou

Re: [Qemu-devel] [PATCH] util/iov: Fix -O1 uninitialized variable warning

2013-07-18 Thread Peter Maydell
On 18 July 2013 17:14, Richard Henderson wrote: > At -O2, code in the form > > if (p) A; B; if (p) C; > > may be rearranged via "jump threading" into > > if (p) { A; B; C; } else { B; } > > But at -O1 this doesn't happen and we -Werror out here on > the "may be used uninitialized" orig_len. P

[Qemu-devel] [PATCH] util/iov: Fix -O1 uninitialized variable warning

2013-07-18 Thread Richard Henderson
At -O2, code in the form if (p) A; B; if (p) C; may be rearranged via "jump threading" into if (p) { A; B; C; } else { B; } But at -O1 this doesn't happen and we -Werror out here on the "may be used uninitialized" orig_len. Perform this transform by hand so that -O1 remains a viable debugg