http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56293

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-02-12 
13:07:10 UTC ---
Some tests with ifort, which by default uses unaligned commons: The first test
case works, i.e. I/O with the unaligned "p" works. However, if one calls a user
procedure ("call foo(p)"), it segfaults.


Possible solutions:

a) Copy-in/copy-out around procedure calls - which is fun with large arrays.

b) Require the user to annotate the functions to possibly accept unaligned
input – or do so automatically. (With all the fun of third-party libraries like
LAPACK, BLAS, ...)

c) Simply deprecating the  -fno-align-commons flag, improving the wording of
the diagnostic and the description in the man page.

Somehow, I am in favour of (c).

The question is also whether one can construct a fully standard-conform example
which fails without -fno-align-commons – and whether some real-world code uses
COMMON in a way that would fails with alignments/padding.

Reply via email to