This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SIGSEGV inside a simple gfortran compiled code


On Fri, Jun 8, 2012 at 9:24 AM, Georgy Salnikov <sge@nmr.nioch.nsc.ru> wrote:
> On Thu, 7 Jun 2012, Andrew Pinski wrote:
>
>> > gfortran -m32 -malign-double -o test test.f
>>
>> -malign-double changes the ABI so don't use it unless you understand
>> that all libraries have to be built with that option.
>
> Thank you, Andrew!
>
> Yes, I know the danger with -malign-double. However, many developers also
> know it and try to design libraries in such a manner that they are still
> usable, even if compiled with different options.
>
> For example, libg77 did work independent of -malign-double presence in the
> main program. Libgfortran as of gcc-4.1.2 did as well. Modern libgfortran
> does also, provided that compiled and run under 32-bit OS. Only 32-bit +
> malign-double under 64-bit OS does not.
>
> It might be interesting, if it is stated that the -m32 -malign-double
> combination must never be used in any gfortran program due do intentional
> design of libgfortran, or it is something like an unknown bug?

-malign-double has never been taken into account in the design of
libgfortran. If it works for some version with some particular
combination of options and Fortran code, it's by chance, not by
design.

Thus Andrew's advice still stands.



-- 
Janne Blomqvist


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]