The problem here is that the first line of the output contradicts the second line.

This is a trivial example, and I know that in this case, the loop is vectorized, because if I do something funny like "SomeFunction(100, a+1, a)", the application will crash. But for more complex applications, I would like to know: when I see messages like this, should I trust the last line or the line in capital letters, or is there some other output that I can look at?

Often, such messages are an indication the compiler has generated multiple versions, with selection to be made at run time. This one is a surprise, particularly since it doesn't appear to be checking for your bad case. I'd be curious if the same thing happens when vectorization is promoted by * restrict.

The same message and the same result with the keyword restrict. And I made a test run to confirm that vectorization does occur (see below). Probing the fool-proofness of the compiler may not be the most useful thing to do, but I just want to better understand the diagnostic messages. Thank you for the insight!

This is an artifact of how the compiler vectorizes the loop. It creates an outer loop with only one interation and inside this generates alternate code based on the total iterations of the original loop to either use memcpy or a vector loop

The message "remark: loop was not vectorized: not inner loop." is for the outer dummy loop the compiler has generated and the message "remark: LOOP WAS VECTORIZED" for the actual user loop which is vectorized.