This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/26643] [4.0/4.1/4.2 Regression] Linux matroxfb_probe miscompiled
- From: "rakdver at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Mar 2006 01:01:11 -0000
- Subject: [Bug middle-end/26643] [4.0/4.1/4.2 Regression] Linux matroxfb_probe miscompiled
- References: <bug-26643-1216@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from rakdver at gcc dot gnu dot org 2006-03-14 01:01 -------
The following patch should fix the problem. I am fairly sure a similar check
used to be somewhere in ivopts, but it probably got lost when MEM_REFs were
introduced (I am somewhat surprised ivopts do not ICE and produce something
that actually resembles a correct code in this case...)
Index: tree-ssa-loop-ivopts.c
===================================================================
*** tree-ssa-loop-ivopts.c (revision 111993)
--- tree-ssa-loop-ivopts.c (working copy)
*************** find_interesting_uses_address (struct iv
*** 1482,1489 ****
/* Ignore bitfields for now. Not really something terribly complicated
to handle. TODO. */
! if (TREE_CODE (base) == COMPONENT_REF
! && DECL_NONADDRESSABLE_P (TREE_OPERAND (base, 1)))
goto fail;
if (STRICT_ALIGNMENT
--- 1482,1490 ----
/* Ignore bitfields for now. Not really something terribly complicated
to handle. TODO. */
! if (TREE_CODE (base) == BIT_FIELD_REF
! || (TREE_CODE (base) == COMPONENT_REF
! && DECL_NONADDRESSABLE_P (TREE_OPERAND (base, 1))))
goto fail;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26643