I just tried to compile the Linux kernel 2.6.23.1 with the GNU C compiler version 4.3 snapshot 20071012 under valgrind.
valgrind said gcc -Wp,-MD,scripts/genksyms/.genksyms.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o scripts/genksyms/genksyms.o scripts/genksyms/genksyms.c ==22718== Conditional jump or move depends on uninitialised value(s) ==22718== at 0xA7ECC3: global_conflicts (sparseset.h:90) ==22718== by 0xA52856: rest_of_handle_global_alloc (global.c:533) ==22718== by 0x643328: execute_one_pass (passes.c:1117) ==22718== by 0x6434FF: execute_pass_list (passes.c:1170) ==22718== by 0x643514: execute_pass_list (passes.c:1171) ==22718== by 0x71EA9F: tree_rest_of_compilation (tree-optimize.c:404) ==22718== by 0x89B7E1: cgraph_expand_function (cgraphunit.c:1060) ==22718== by 0x89DC4B: cgraph_optimize (cgraphunit.c:1123) ==22718== by 0x4160CD: c_write_global_declarations (c-decl.c:8077) ==22718== by 0x6C41DF: toplev_main (toplev.c:1052) ==22718== by 0x52BAAE3: (below main) (in /lib64/libc-2.5.so) ==22718== Preprocessed source code attached. Flag -O2 required. -- Summary: valgrind error with -O2 for linux kernel code Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dcb314 at hotmail dot com GCC host triplet: sue-linux-x86_64 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33796