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 c/36093] __align__ produces incorrect results in certain cases



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-05-01 09:44 -------
GCC 4.3 works for me.  I can confirm this with 4.2.3 and 4.1.2.

The problem is we end up with

  ivtmp.64 = (unsigned int) &foo[0].bar[(unsigned int) i]{lb: 0 sz: 128}.c[0];

(note the element size of 128, which is wrong -- it should be 256).  Probably
fixed with the gimplify.c/tree-ssa-ccp.c hunks of

2007-04-12  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/24689
        PR tree-optimization/31307
        * fold-const.c (operand_equal_p): Compare INTEGER_CST array
        indices by value.
        * gimplify.c (canonicalize_addr_expr): To be consistent with
        gimplify_compound_lval only set operands two and three of
        ARRAY_REFs if they are not gimple_min_invariant.  This makes
        it never at this place.
        * tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Likewise.

Yep.  I just confirmed that.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
      Known to fail|                            |4.2.3 4.1.2
      Known to work|                            |4.0.4 4.3.0
   Last reconfirmed|0000-00-00 00:00:00         |2008-05-01 09:44:57
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36093


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