http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39612
--- Comment #12 from Zdenek Dvorak <rakdver at gcc dot gnu.org> 2012-01-16 16:25:05 UTC --- (In reply to comment #11) > Re-confirmed on trunk with the testcase in comment #4 and -Os: > > > ./cc1 -quiet t.c -Os -Wall -fdump-tree-all > t.c: In function 'f2': > t.c:4:11: warning: 'inter[0]' is used uninitialized in this function > [-Wuninitialized] > t.c:4:11: warning: 'inter[1]' is used uninitialized in this function > [-Wuninitialized] > > There is also a store data-race introduced by LIM when the loop header > is not copied. I suppose the real fix is to disable SM if the loop > header is not copied. I do not think this is the right way. Disabling a valid (and fairly important) optimization in order to silence a warning seems a bit extreme. I am not sure what you mean by "a store data-race". Also, the warning is at least morally right. If R <= 1, the original code will pass inter to foo uninitialized, which probably is not intended. So, the right thing to do could be issuing "may be used uninitialized" warning instead of "is used uninitialized" one.