[PATCH] A first step to fix 21541

Richard Guenther rguenth@tat.physik.uni-tuebingen.de
Sat May 14 20:26:00 GMT 2005


As a first step to fix PR21541, ICE on valid, this fixes the ICE
on the reduced testcase which happens to look like

typedef struct { char ch; } pstr;
const pstr ao = { 'O' };

void test1(void)
{
   *((char *)&ao.ch) = 1;
}

see the audit trail for an analysis.


Bootstrapped on x86_64-unknown-linux-gnu, tested on i686 and
x86_64.  The following new regressions (missed optimizations)
occour:

FAIL: g++.dg/opt/temp1.C execution test
FAIL: g++.dg/tree-ssa/ssa-sra-1.C scan-tree-dump-times link_error 0
FAIL: g++.dg/tree-ssa/ssa-sra-2.C scan-tree-dump-times link_error 0

FAIL: gcc.dg/tree-ssa/ltrans-5.c
FAIL: gcc.dg/tree-ssa/stdarg-2.c
FAIL: gcc.dg/tree-ssa/stdarg-4.c

the following still fail:

FAIL: gcc.c-torture/execute/20031215-1.c compilation,  -O2
FAIL: gcc.c-torture/execute/20031215-1.c compilation,  -O3
-fomit-frame-pointer
FAIL: gcc.c-torture/execute/20031215-1.c compilation,  -O3 -g
FAIL: gcc.c-torture/execute/20031215-1.c compilation,  -Os

I don't know if the sra failures are related to this patch.

Ok for mainline?

Thanks,
Richard.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix-20031215-1-2
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050514/5d3f13c2/attachment.ksh>


More information about the Gcc-patches mailing list