Re: distinguishing gcc compilation valgrind false positives

2021-11-24 Thread Jeff Law via Gcc
On 11/24/2021 12:41 PM, Zdenek Sojka wrote: Hello Jeff, -- Původní e-mail -- Od: Jeff Law via Gcc Komu: Paul Floyd , gcc@gcc.gnu.org Datum: 24. 11. 2021 20:33:02 Předmět: Re: distinguishing gcc compilation valgrind false positives On 11/24/2021 12:15 PM, Paul Floyd vi

Re: Question about match.pd

2021-11-24 Thread Jeff Law via Gcc
On 11/24/2021 2:19 PM, Navid Rahimi via Gcc wrote: Hi GCC community, I have a question about pattern matching in match.pd. So I have a pattern like this [1]: #define CMP != bool f(bool c, int i) { return (c << i) CMP 0; } bool g(bool c, int i) { return c CMP 0;} It is verifiably correct to

Re: distinguishing gcc compilation valgrind false positives

2021-11-24 Thread Thomas Schwinge
Hi! On 2021-11-24T20:05:56+0100, Zdenek Sojka via Gcc wrote: > from time to time, I come upon a testcase that failed during the automated > runs, but passes during reduction; there are valgrind warnings present, > however. Thanks for looking into this. Please collect any Valgrind notes at

Question about match.pd

2021-11-24 Thread Navid Rahimi via Gcc
Hi GCC community, I have a question about pattern matching in match.pd. So I have a pattern like this [1]: #define CMP != bool f(bool c, int i) { return (c << i) CMP 0; } bool g(bool c, int i) { return c CMP 0;} It is verifiably correct to transfer f to g [2]. Although this pattern looks simple

Re: distinguishing gcc compilation valgrind false positives

2021-11-24 Thread Paul Floyd via Gcc
Hi the main reason why it looks like a false positive is that I've had these valgrind warnings ... since probably ever, but it was never causing issues. I cannot tell from the sources if there is anything wrong, so I am better asking here. Well, that's the nature of undefined behaviou

Re: distinguishing gcc compilation valgrind false positives

2021-11-24 Thread Jan Hubicka via Gcc
> ==5404== Conditional jump or move depends on uninitialised value(s) > ==5404==    at 0x25DAAD7: incorporate_penalties (ipa-cp.c:3282) > ==5404==    by 0x25DAAD7: good_cloning_opportunity_p(cgraph_node*, sreal, > sreal, profile_count, int) (ipa-cp.c:3340) I looked at this one (since it is in code

Re: distinguishing gcc compilation valgrind false positives

2021-11-24 Thread Zdenek Sojka via Gcc
Hello Jeff, -- Původní e-mail -- Od: Jeff Law via Gcc Komu: Paul Floyd , gcc@gcc.gnu.org Datum: 24. 11. 2021 20:33:02 Předmět: Re: distinguishing gcc compilation valgrind false positives " On 11/24/2021 12:15 PM, Paul Floyd via Gcc wrote: > > On 24/11/2021 20:05, Zdenek Sojka via

Re: distinguishing gcc compilation valgrind false positives

2021-11-24 Thread Jakub Jelinek via Gcc
On Wed, Nov 24, 2021 at 12:31:53PM -0700, Jeff Law via Gcc wrote: > Agreed.  Work from the assumption it's a real GCC issue until proven > otherwise. > > I believe GCC has annotations to help valgrind that are turned on by a magic > configuration option as well. True, but Zdenek has them turned o

Re: distinguishing gcc compilation valgrind false positives

2021-11-24 Thread Zdenek Sojka via Gcc
Hello Paul, (sorry for re-post, I didn't include the ML in the original reply) -- Původní e-mail -- Od: Paul Floyd via Gcc Komu: gcc@gcc.gnu.org Datum: 24. 11. 2021 20:16:33 Předmět: Re: distinguishing gcc compilation valgrind false positives " On 24/11/2021 20:05, Zdenek Sojka v

Re: distinguishing gcc compilation valgrind false positives

2021-11-24 Thread Jeff Law via Gcc
On 11/24/2021 12:15 PM, Paul Floyd via Gcc wrote: On 24/11/2021 20:05, Zdenek Sojka via Gcc wrote: Hello, from time to time, I come upon a testcase that failed during the automated runs, but passes during reduction; there are valgrind warnings present, however. How do I distinguish what w

Re: distinguishing gcc compilation valgrind false positives

2021-11-24 Thread Paul Floyd via Gcc
On 24/11/2021 20:05, Zdenek Sojka via Gcc wrote: Hello, from time to time, I come upon a testcase that failed during the automated runs, but passes during reduction; there are valgrind warnings present, however. How do I distinguish what warnings are valid and which are false positives? Is the

distinguishing gcc compilation valgrind false positives

2021-11-24 Thread Zdenek Sojka via Gcc
-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.0.0 20211124 (experimental) (GCC) The output is: $ x86_64-pc-linux-gnu-gcc `cat flags` -c -w mcf.ii -wrapper valgrind,-q,-- track-origins=yes ==5404== Invalid read of size 4 ==5404==    at 0x197B210: put