https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83097
--- Comment #2 from Janne Blomqvist <jb at gcc dot gnu.org> --- Author: jb Date: Wed Nov 22 19:19:13 2017 New Revision: 255072 URL: https://gcc.gnu.org/viewcvs?rev=255072&root=gcc&view=rev Log: PR 83097 Use __BYTE_ORDER__ predefined macro instead of runtime check By using the __BYTE_ORDER__ predefined macro we don't need the determine_endianness function anymore. Regtested on x86_64-pc-linux-gnu. libgfortran/ChangeLog: 2017-11-22 Janne Blomqvist <j...@gcc.gnu.org> PR libfortran/83097 * io/inquire.c (inquire_via_unit): Use __BYTE_ORDER__ predefined macro. * io/open.c (st_open): Likewise. * io/transfer.c (data_transfer_init): Likewise. * io/write.c (btoa_big): Likewise. (otoa_big): Likewise. (ztoa_big): Likewise. * libgfortran.h (big_endian): Remove variable. (GFOR_POINTER_TO_L1): Use __BYTE_ORDER__ macro. * runtime/main.c (determine_endianness): Remove function. (init): Remove call to determine_endianness. * runtime/minimal.c: Remove setting big_endian variable. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/io/inquire.c trunk/libgfortran/io/open.c trunk/libgfortran/io/transfer.c trunk/libgfortran/io/write.c trunk/libgfortran/libgfortran.h trunk/libgfortran/runtime/main.c trunk/libgfortran/runtime/minimal.c