This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/26643] [4.0/4.1/4.2 Regression] Linux matroxfb_probe miscompiled



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]