https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102510
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2021-09-28 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Known to fail| |12.0 Keywords| |missed-optimization Summary|Function call has |Function call has |unnecessary aliasing check |unnecessary stride check --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- It's not an alias but we seem to not know that the array stride of the result is one and thus we version on that. I'm not sure whether fortran allows res(/1, 16, 2/) = add2vecs2(a, b) or so or why we know the inputs are not strided. The result comes in as array descriptor while the other arguments are pointers to a flat [8] array. Adding 'contiguous' yields Error: 'add2vecs2' at (1) has the CONTIGUOUS attribute but is not an array pointer or an assumed-shape or assumed-rank array so maybe it's really just a missed optimization in the Frontend?