Bug in Linux X64 versions of IFort 11.1, 12.0

Bug in Linux X64 versions of IFort 11.1, 12.0

This bug report has its origins in a post by Alfredo Buttari "passing float _Complex from C to Fortran" with a C main calling a Fortran subroutine and passing a complex argument by value. Here is a program, entirely in Fortran, that reproduces the bug.

There is a mismatch in the argument passing scheme at the assembler/machine level in x64 mode. The caller passes the real and imaginary parts of the single argument in the two halves of xmm0, loading xmm0 from the stack with onemovsd. The subroutine expects the two parts in xmm0 and xmm1, which it moves onto the subroutine's stack with twomovss instructions. At this point, however, xmm1 contains junk.

We really appreciate the extra effort to provide this reproducer, mecej4. I reported this defectto Development (internal tracking id noted below) and will keep both posts updated with new status as I learn it.