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

--- Comment #3 from kelvin at gcc dot gnu.org ---
I had begun to look at this before Segher resolved it as invalid.

One thing I had observed that their are some questionable practices in the
rijndael-simd.cpp code.  I had not yet dug deeply enough to confirm that these
would actually cause problems.

A patch that I merged with the trunk about the time this code began to fail
changed the Power8 back-end to select more efficient instructions whenever
vectors are "known" to be aligned.  This patch also became more aggressive in
its assessment of which vectors are aligned.  In some cases, the instructions
generated under the assumption that vectors are properly aligned in memory will
"fail silently", producing undefined or unexpected results, when supplied with
an address that is not properly aligned.

While we were previously very conservative, we now consider that any pointer
declared to refer to a vector is aligned on a multiple of the vector size. 
This means you cannot "safely" coerce "int *" to "vector int *", as happens,
for example, around line 715 of rijndael-simd.cpp.

There are various other places in this same source file that look suspicious to
me.

Reply via email to