This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/22277] [4.1 Regression] ACATS ICE cc40001 in first_vi_for_offset, at tree-ssa-structalias.c:2566
- From: "dberlin at dberlin dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jul 2005 12:33:19 -0000
- Subject: [Bug tree-optimization/22277] [4.1 Regression] ACATS ICE cc40001 in first_vi_for_offset, at tree-ssa-structalias.c:2566
- References: <20050702130552.22277.laurent@guerby.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dberlin at gcc dot gnu dot org 2005-07-11 12:33 -------
Subject: Re: [4.1 Regression] ACATS ICE
cc40001 in first_vi_for_offset, at tree-ssa-structalias.c:2566
On Mon, 2005-07-11 at 08:48 +0000, reichelt at gcc dot gnu dot org
wrote:
> ------- Additional Comments From reichelt at gcc dot gnu dot org 2005-07-11 08:48 -------
> More compact C++ testcase:
>
> ======================================
> struct A
> {
> char c;
> int i;
> };
>
> A a;
>
> struct B
> {
> char c, d;
> };
>
> union C
> {
> A *p;
> B *q;
>
> C() : p(&a) {}
> char& foo() { return q->d; }
> };
>
> void bar() { C().foo() = 0; }
Yes, that will work too.
Note the part that bugs me severely is that you are accessing padding in
A. :) This is true in the original testcase as well
I'm not sure whether i should bother trying to do something sane in this
case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22277