Re: [PATCH] middle-end/100786 - constant folding from incompatible alias

2022-03-27 Thread Richard Biener via Gcc-patches
On Sat, 26 Mar 2022, FX wrote: > Hi Richard, > > The patch for PR100786 introduced a testcase that systematically fails on > darwin: > > FAIL: gcc.dg/torture/pr100786.c -O0 (test for excess errors) > FAIL: gcc.dg/torture/pr100786.c -O1 (test for excess errors) > FAIL: gcc.dg/torture/pr100

Re: [PATCH] middle-end/100786 - constant folding from incompatible alias

2022-03-26 Thread FX via Gcc-patches
Hi Richard, The patch for PR100786 introduced a testcase that systematically fails on darwin: FAIL: gcc.dg/torture/pr100786.c -O0 (test for excess errors) FAIL: gcc.dg/torture/pr100786.c -O1 (test for excess errors) FAIL: gcc.dg/torture/pr100786.c -O2 (test for excess errors) FAIL: gcc.

Re: [PATCH] middle-end/100786 - constant folding from incompatible alias

2022-01-20 Thread Richard Biener via Gcc-patches
ol_constant_value > which is only used from CCP (which looks suffering from the same issue) > and folding. Like the following. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. >From cc3f3c7428253c2326a00699f08bd89467b941f5 Mon Sep 17 00:00:00 2001 From: Richar

Re: [PATCH] middle-end/100786 - constant folding from incompatible alias

2022-01-20 Thread Richard Biener via Gcc-patches
On Thu, 20 Jan 2022, Jakub Jelinek wrote: > On Thu, Jan 20, 2022 at 02:58:21PM +0100, Richard Biener via Gcc-patches > wrote: > > The following avoids us ICEing doing constant folding from variables > > with aliases of different types. The formerly used fold_convert > > wasn't entirely correct e

Re: [PATCH] middle-end/100786 - constant folding from incompatible alias

2022-01-20 Thread Jakub Jelinek via Gcc-patches
On Thu, Jan 20, 2022 at 02:58:21PM +0100, Richard Biener via Gcc-patches wrote: > The following avoids us ICEing doing constant folding from variables > with aliases of different types. The formerly used fold_convert > wasn't entirely correct even for the cases it handled and using > a VIEW_CONVER

[PATCH] middle-end/100786 - constant folding from incompatible alias

2022-01-20 Thread Richard Biener via Gcc-patches
The following avoids us ICEing doing constant folding from variables with aliases of different types. The formerly used fold_convert wasn't entirely correct even for the cases it handled and using a VIEW_CONVERT_EXPR avoids the ICE. Reading from a larger alias will cause unfolded constants to app