------- Comment #7 from dominiq at lps dot ens dot fr 2010-08-06 21:09 ------- Thanks to Thomas König, the mystery is sorted out: both p1.f90 and p2.f90 contain a subroutine ijk_to_i_j_k. In p1 the subroutine has the right dummy arguments for the call, while the one in p2 has wrong ones. Due to
USE module_ijk_to_i_j_k ,ONLY:ijk_to_i_j_k in SUBROUTINE i_j_k_to_ijk(i_j_k,size,i,j,k), the call to ijk_to_i_j_k should use the one in p1 (as with 4.6) and not the one in p2 (as with 4.4 or 4.5). So if the above is right, the bug has been fixed in 4.6, but not backported to 4.5. Can you check where and with actual arguments the subroutine i_j_k_to_ijk is called in the full code? If all the calls are to the subroutine in p1, you can probably remove the one in p2. If both subroutines are called, some with the argument list corresponding to p1 and some with the argument list corresponding to p2, you can try to rename one of the subroutines. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45210