https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63530

--- Comment #2 from Cong Hou <congh at google dot com> ---
This issue can also be reproduced on x86_64. Compile the following code with
options (assume the file name is t.c): -O2 -ftree-vectorize t.c
-fdump-tree-all-alias


#include <stdlib.h>

typedef struct {
  unsigned char map[256];
  int i;
} A, *AP;

AP foo(int n)
{
  AP b = malloc(sizeof(A));
  int i;
  for (i = n; i < 256; i++)
    b->map[i] = i;
  return b;
}

The from t.c.116t.vect we can find such a statement:

  # ALIGN = 8, MISALIGN = 0
  vectp_b.15_47 = b_5 + _48;

Here b_5 is obtained from malloc which can be 8 bytes aligned, but _48 is from
input parameter n, and the alignment of vectp_b.15_47 should be unknown instead
of 8 here. I suspect the ptr_info_def object of vectp_b.15_47 is just copied
from that of b_5, which is incorrect.

Reply via email to