This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/81450] Typedef with assume aligned builtin yields segmentation fault in nested loop
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Jul 2017 11:32:59 +0000
- Subject: [Bug tree-optimization/81450] Typedef with assume aligned builtin yields segmentation fault in nested loop
- Auto-submitted: auto-generated
- References: <bug-81450-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81450
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
> typedef double __attribute__((aligned (32))) AlignedDouble;
> AlignedDouble* A = aligned_doubles( size * size );
> A[j + i * size] += alpha;
here you say that &A[j+i*size] is aligned to 32 bytes because you dereference
A + j + i*size which is still of type AlignedDouble.
Maybe surprising but this it is.