https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106438
--- Comment #5 from Jeevitha <jeevitha at gcc dot gnu.org> --- Able to reproduce the error with a simple test case using the following compilation and linking commands. The issue occurs whenever we pass different ABIs during compilation and linking. jeevitha@ltcden2-lp1 nb_gcc_106438]$ cat t.c #include <stdio.h> typedef _Float128 GFC_REAL_17; GFC_REAL_17 a; GFC_REAL_17 b; int main() { GFC_REAL_17 sum = a + b; printf("a + b = %Lf\n", sum); return 0; } [jeevitha@ltcden2-lp1 nb_gcc_106438]$ /home/jeevitha/gcc_clean/build_gcc/nb_gcc_106438/./gcc/xgcc -B/home/jeevitha/gcc_clean/build_gcc/nb_gcc_106438/./gcc/ -c t.c -mabi=ieeelongdouble -O3 -o t.o -flto [jeevitha@ltcden2-lp1 nb_gcc_106438]$ /home/jeevitha/gcc_clean/build_gcc/nb_gcc_106438/./gcc/xgcc -B/home/jeevitha/gcc_clean/build_gcc/nb_gcc_106438/./gcc/ -flto t.o -mabi=ibmlongdouble -o t.out lto1: error: type variant differs by TYPE_MODE <real_type 0x7fffa0e716f8 __ieee128 KF size <integer_cst 0x7fffa0e40ee8 type <integer_type 0x7fffa0e701f8 bitsizetype> constant 128> unit-size <integer_cst 0x7fffa0e40f00 type <integer_type 0x7fffa0e70150 sizetype> constant 16> align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7fffa0e716f8 precision:128 pointer_to_this <pointer_type 0x7fffa1024c20>> lto1: error: ‘TYPE_CANONICAL’ is not compatible <real_type 0x7fffa0e716f8 __ieee128 KF size <integer_cst 0x7fffa0e40ee8 type <integer_type 0x7fffa0e701f8 bitsizetype> constant 128> unit-size <integer_cst 0x7fffa0e40f00 type <integer_type 0x7fffa0e70150 sizetype> constant 16> align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7fffa0e716f8 precision:128 pointer_to_this <pointer_type 0x7fffa1024c20>> lto1: error: ‘TYPE_MODE’ of ‘TYPE_CANONICAL’ is not compatible <real_type 0x7fffa0e716f8 __ieee128 KF size <integer_cst 0x7fffa0e40ee8 type <integer_type 0x7fffa0e701f8 bitsizetype> constant 128> unit-size <integer_cst 0x7fffa0e40f00 type <integer_type 0x7fffa0e70150 sizetype> constant 16> align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7fffa0e716f8 precision:128 pointer_to_this <pointer_type 0x7fffa1024c20>> <real_type 0x7fffa1024f68 GFC_REAL_17 TF size <integer_cst 0x7fffa0e40ee8 type <integer_type 0x7fffa0e701f8 bitsizetype> constant 128> unit-size <integer_cst 0x7fffa0e40f00 type <integer_type 0x7fffa0e70150 sizetype> constant 16> align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7fffa0e716f8 precision:128 pointer_to_this <pointer_type 0x7fffa1025400>> lto1: internal compiler error: ‘verify_type’ failed 0x13441b17 internal_error(char const*, ...) /home/jeevitha/gcc_clean/build_gcc/nb_gcc_106438/../../gcc/gcc/diagnostic-global-context.cc:491 0x11b990f7 verify_type(tree_node const*) /home/jeevitha/gcc_clean/build_gcc/nb_gcc_106438/../../gcc/gcc/tree.cc:14465 0x108fe62f lto_fixup_state /home/jeevitha/gcc_clean/build_gcc/nb_gcc_106438/../../gcc/gcc/lto/lto-common.cc:2657 0x108fe83f lto_fixup_decls /home/jeevitha/gcc_clean/build_gcc/nb_gcc_106438/../../gcc/gcc/lto/lto-common.cc:2682 0x108ff767 read_cgraph_and_symbols(unsigned int, char const**) /home/jeevitha/gcc_clean/build_gcc/nb_gcc_106438/../../gcc/gcc/lto/lto-common.cc:2929 0x108af727 lto_main() /home/jeevitha/gcc_clean/build_gcc/nb_gcc_106438/../../gcc/gcc/lto/lto.cc:658 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. lto-wrapper: fatal error: /home/jeevitha/gcc_clean/build_gcc/nb_gcc_106438/./gcc/xgcc returned 1 exit status compilation terminated. /usr/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status