Re: [PATCH] Do not erase warning data in gimple_set_location

2022-06-14 Thread Richard Biener via Gcc-patches
On Tue, Jun 14, 2022 at 12:49 PM Eric Botcazou wrote: > > > Hmm, I think instead of special-casing UNKNOWN_LOCATION > > what gimple_set_location should probably do is either not copy > > warnings at all or union them. Btw, gimple_set_location also > > removes a previously set BLOCK (but gimple_se

Re: [PATCH] Do not erase warning data in gimple_set_location

2022-06-14 Thread Eric Botcazou via Gcc-patches
> Hmm, I think instead of special-casing UNKNOWN_LOCATION > what gimple_set_location should probably do is either not copy > warnings at all or union them. Btw, gimple_set_location also > removes a previously set BLOCK (but gimple_set_block preserves > the location locus and diagnostic override).

Re: [PATCH] Do not erase warning data in gimple_set_location

2022-06-13 Thread Martin Sebor via Gcc-patches
On 6/13/22 05:15, Richard Biener wrote: On Fri, Jun 10, 2022 at 12:58 PM Eric Botcazou via Gcc-patches wrote: Hi, gimple_set_location is mostly invoked on newly built GIMPLE statements, so their location is UNKNOWN_LOCATION and setting it will clobber the warning data of the passed location,

Re: [PATCH] Do not erase warning data in gimple_set_location

2022-06-13 Thread Richard Biener via Gcc-patches
On Fri, Jun 10, 2022 at 12:58 PM Eric Botcazou via Gcc-patches wrote: > > Hi, > > gimple_set_location is mostly invoked on newly built GIMPLE statements, so > their location is UNKNOWN_LOCATION and setting it will clobber the warning > data of the passed location, if any. Hmm, I think instead of

Re: [PATCH] Do not erase warning data in gimple_set_location

2022-06-12 Thread Jeff Law via Gcc-patches
On 6/10/2022 4:57 AM, Eric Botcazou via Gcc-patches wrote: Hi, gimple_set_location is mostly invoked on newly built GIMPLE statements, so their location is UNKNOWN_LOCATION and setting it will clobber the warning data of the passed location, if any. Tested on x86-64/Linux, OK for mainline an

[PATCH] Do not erase warning data in gimple_set_location

2022-06-10 Thread Eric Botcazou via Gcc-patches
Hi, gimple_set_location is mostly invoked on newly built GIMPLE statements, so their location is UNKNOWN_LOCATION and setting it will clobber the warning data of the passed location, if any. Tested on x86-64/Linux, OK for mainline and 12 branch? 2022-06-10 Eric Botcazou * gimple.h