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 and 12 branch? 2022-06-10 Eric Botcazou <ebotca...@adacore.com> * gimple.h (gimple_set_location): Do not copy warning data from the previous location when it is UNKNOWN_LOCATION. 2022-06-10 Eric Botcazou <ebotca...@adacore.com> testsuite/ * c-c++-common/nonnull-1.c: Remove XFAIL for C++.
OK for trunk and gcc-12. jeff