This should get vectorized but isn't:
#include <stdlib.h>
typedef struct
{
int data[256];
} S;
void f()
{
S* restrict a = (S*) malloc( sizeof(S) );
S* restrict b = (S*) malloc( sizeof(S) );
for ( int i = 0; i < 256; ++i ) {
b->data[i] += a->data[i];
}
}
--
Summary: Operations on data in dynamically allocated structure
can't get vectorized
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nomis80 at nomis80 dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28802