This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/85598] [7/8/9 Regression] Incorrect warning only at -O2 and -O3


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85598

--- Comment #9 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 22 Nov 2018, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85598
> 
> --- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Created attachment 45070
>   --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45070&action=edit
> gcc9-pr85598.patch
> 
> Hack that works for me, but perhaps it is too specialized.  Can gather
> statistics how many ranges it improved during bootstrap/regtest...

I'd rather have you at _least_ use value_range_base::union_ and friends
for this rather than open-coding it.  Note there's also
register_edge_assert_for which you conveniently can use to extract
"ranges" from conditions, see
evrp_range_analyzer::record_ranges_from_incoming_edge.

But yeah, it looks quite "special" :/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]