On 08/21/2018 02:43 AM, Richard Biener wrote: > On Mon, 20 Aug 2018, Bernd Edlinger wrote: [ snip. ]
>> Yes, I found some peanuts on my way. >> >> For instance this fix for PR middle-end/86121 survives bootstrap on >> it's own, and fixes one xfail. >> >> Is it OK for trunk? > > Yes, that's OK for trunk. Agreed. Seems like a nice independent bugfix and I don't think it adversely affects anything else under current discussion. In fact, not folding here makes it easier to warn about incorrect code elsewhere. > >>> Btw, I don't think we want sth like >>> flag_assume_zero_terminated_char_arrays or even make it default at >>> -Ofast. >>> >> >> Yes, I agree. Is there a consensus about this? > > Well, it's my own opinion of course. Show me a benchmark that > improves with -fassume-zero-terminated-char-arrays. Certainly > for security reasons it sounds a dangerous thing (and the documentation > needs a more thorough description of what it really means). I certainly don't want to see a flag. We've already got way too many; adding another for marginal behavior just seems wrong. > >> If yes, I go ahead and remove that option again. >> >> BTW: I needed this option in a few test cases, that insist in checking the >> optimizer to eliminate stuff, based on the VRP info. (6 +/-1 or so). > > Any example? > >> But we can as well remove those test cases. Bernd, if there are specific tests that you want to see removed, we should discuss them. I think we can all agree that if a test depends on C semantics rather than GIMPLE semantics for optimization/codegen, then removing it seems like the right thing to do as the test is just wrong for GCC. If the test is meant to issue a warning or avoid a false positive, then we should defer -- I'd like to not lose the warnings if at all possible. A test which verifies correct optimization seems like it should be discussed. I'd be more inclined to xfail those rather than remove them completely -- particularly for a test which isn't a good indicator of the real world code typically seen by gcc. Jeff