Re: [PATCH] middle-end/119204 - ICE with strcspn folding

2025-03-15 Thread H.J. Lu
On Tue, Mar 11, 2025 at 2:58 AM Richard Biener wrote: > > The following makes sure to convert the folded expression to the > original expression type. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? > > Thanks, > Richard. > > PR middle-end/119204 > * builtins.cc (fold_

Re: [PATCH] middle-end/119204 - ICE with strcspn folding

2025-03-12 Thread Andrew Pinski
On Wed, Mar 12, 2025 at 9:43 AM H.J. Lu wrote: > > On Tue, Mar 11, 2025 at 2:58 AM Richard Biener wrote: > > > > The following makes sure to convert the folded expression to the > > original expression type. > > > > Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? > > > > Thanks, > > Rich

Re: [PATCH] middle-end/119204 - ICE with strcspn folding

2025-03-12 Thread Jakub Jelinek
On Wed, Mar 12, 2025 at 09:41:01AM -0700, H.J. Lu wrote: > This caused: > > https://gcc.gnu.org/pipermail/gcc-regression/2025-March/081862.html This should have been fixed with r15-7981 already. Jakub

Re: [PATCH] middle-end/119204 - ICE with strcspn folding

2025-03-11 Thread Jakub Jelinek
On Tue, Mar 11, 2025 at 10:57:39AM +0100, Richard Biener wrote: > The following makes sure to convert the folded expression to the > original expression type. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? > > Thanks, > Richard. > > PR middle-end/119204 > * builtins.cc

[PATCH] middle-end/119204 - ICE with strcspn folding

2025-03-11 Thread Richard Biener
The following makes sure to convert the folded expression to the original expression type. Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? Thanks, Richard. PR middle-end/119204 * builtins.cc (fold_builtin_strcspn): Preserve the original expression type.