https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55035
Jeffrey A. Law <law at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at redhat dot com Blocks| |19794 --- Comment #6 from Jeffrey A. Law <law at redhat dot com> --- Per this discussion: https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01996.html It's believed the reduced testcase in c#5 is an invalid reduction. A cursory review of the code in c#4 indicates that testcase is a valid reduction. We ought to be able to determine that the writes inside the two inner loops do not clobber recog_data.n_dups and thus the first and last loops iterate over the same space and every read of orig_dup[] in the last loop will have had a value set in the first loop. There's almost certainly a hideously complex missed jump threading opportunity in here. Conceptually it'd be exposed by duplicating the two inner loops, one duplicate would be reached when n_dups is zero the other when n_dups is nonzero after the first loop. The first duplicate will bypass the last loop the second duplicate would execute the final loop. The net result of all that copying and cfg transformations should in theory make the false positive warning go away. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19794 [Bug 19794] [meta-bug] Jump threading related bugs