http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56293
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-12 12:39:55 UTC --- (In reply to comment #3) > Also occurs if one calls ("call foo(p)"): > subroutine foo(x) > real(16) :: x, y > y = x ! FAILS HERE > ! print *, y > end subroutine foo > instead of "print *, p". > > > The bug is probably somewhere in gcc/fortran/trans-common.c's. For instance at > build_common_decl, which uses: > > if (!com->is_bind_c) > DECL_ALIGN (decl) = BIGGEST_ALIGNMENT; > > or/and in "build_field", which has: > > known_align = (offset & -offset) * BITS_PER_UNIT; > if (known_align == 0 || known_align > BIGGEST_ALIGNMENT) > known_align = BIGGEST_ALIGNMENT; > > desired_align = update_alignment_for_field (rli, field, known_align); > if (desired_align > known_align) > (field) = 1; > > or … The problem is that you are in no way dealing with the interface mismatches in a correct way. Not that I think you can. I suggest to remove -fno-align-commons. Or is there a fortran way to say that subroutine foo(x) real(16) :: x, y may receive an unaligned x? It seems to me that with an -fno-align-commons common you cannot do very much. You'd have to make sure to always access it though the common and never pass pieces of it to another function (maybe the frontend could warn about this). Can you specify -fno-align-commons per common block?