------- Comment #4 from rguenth at gcc dot gnu dot org  2008-06-27 09:31 -------
The vectorizer creates an unaligned access.  -O -ftree-vectorize reproduces it.

_GLOBAL__I_foo:
.LFB10:
        xorps   %xmm0, %xmm0
        movaps  %xmm0, foo+4(%rip)
        movl    $foo+20, %eax
        movaps  %xmm0, (%rax)
        movaps  %xmm0, 16(%rax)
        ret

.globl foo
        .bss
        .align 32
        .type   foo, @object
        .size   foo, 52


        base_address: &foo
        offset from base address: 0
        constant offset from base address: 4
        step: 12
        aligned to: 128
        base_object: ((struct vector *) &foo)->x
        symbol tag: SMT.10

the base object looks wrong (or doesn't it include the constant offset?)

In the end it looks like the vectorizer simply ignores the first field of
the struct.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |irar at il dot ibm dot com,
                   |                            |rguenth at gcc dot gnu dot
                   |                            |org, spop at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
          Component|c++                         |tree-optimization
     Ever Confirmed|0                           |1
           Keywords|                            |wrong-code
      Known to work|3.4.6 4.0.1 4.2.3           |3.4.6 4.0.1 4.1.2 4.2.4
           Priority|P3                          |P1
   Last reconfirmed|0000-00-00 00:00:00         |2008-06-27 09:31:54
               date|                            |
            Summary|segfault in global          |[4.3/4.4 Regression]
                   |constructor with -O3        |segfault in global
                   |                            |constructor with -O3
   Target Milestone|---                         |4.3.2


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

Reply via email to