Re: [PATCH] Preserve location in gimple_fold_builtin_memset

2021-10-29 Thread Richard Biener via Gcc-patches
On Fri, 29 Oct 2021, Jakub Jelinek wrote: > Hi! > > As mentioned yesterday, gimple_fold_builtin_memset doesn't preserve > locus which means e.g. the -Wstringop-overflow warnings are emitted as: > In function 'test_max': > cc1: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]

[PATCH] Preserve location in gimple_fold_builtin_memset

2021-10-29 Thread Jakub Jelinek via Gcc-patches
Hi! As mentioned yesterday, gimple_fold_builtin_memset doesn't preserve locus which means e.g. the -Wstringop-overflow warnings are emitted as: In function 'test_max': cc1: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] The function emits up to 2 new statements, but the lat