http://bugzilla.novell.com/show_bug.cgi?id=587220 http://bugzilla.novell.com/show_bug.cgi?id=587220#c0 Summary: incorrect "may be used uninitialized" warning Classification: openSUSE Product: openSUSE 11.3 Version: Factory Platform: PowerPC-64 OS/Version: openSUSE 11.3 Status: NEW Severity: Normal Priority: P5 - None Component: Development AssignedTo: pth@novell.com ReportedBy: jeffm@novell.com QAContact: qa@suse.de Found By: Development Blocker: --- Created an attachment (id=347713) --> (http://bugzilla.novell.com/attachment.cgi?id=347713) Flags used to call gcc Building arch/powerpc/kvm/book3s.c from the 2.6.34-rc1 kernel results in a build failure due to the use of -Werror and an incorrect "may be used uninitialized" warning. cc1: warnings being treated as errors /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/arch/powerpc/kvm/book3s.c: In function '__kvmppc_vcpu_run': /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.33/arch/powerpc/kvm/book3s.c:1102:23: error: 'ext_bkp.vrsave' may be used uninitialized in this function The chunk in question is the following: struct thread_struct ext_bkp; bool save_vec = current->thread.used_vr; [...] #ifdef CONFIG_ALTIVEC /* Save Altivec state in stack */ if (save_vec) { if (current->thread.regs->msr & MSR_VEC) giveup_altivec(current); memcpy(ext_bkp.vr, current->thread.vr, sizeof(ext_bkp.vr)); ext_bkp.vscr = current->thread.vscr; ext_bkp.vrsave = current->thread.vrsave; } ext_bkp.used_vr = current->thread.used_vr; #endif [...] #ifdef CONFIG_ALTIVEC /* Restore Altivec state from stack */ if (save_vec && current->thread.used_vr) { memcpy(current->thread.vr, ext_bkp.vr, sizeof(ext_bkp.vr)); current->thread.vscr = ext_bkp.vscr; current->thread.vrsave= ext_bkp.vrsave; } current->thread.used_vr = ext_bkp.used_vr; #endif save_vec is set once at the top of the function and is not changed. ext_bkp.vrsave is set within the save_vec if statement and read within the next one, and not at all outside of either. I'll attach the .c, the .i, and the gcc build options. gcc version 4.5.0 20100302 (experimental) [trunk revision 157166] (SUSE Linux) -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.