https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66221
Bug ID: 66221 Summary: [CHKP, 6 regression] lto1: error: type variant has different TYPE_ARG_TYPES Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: ienkovich at gcc dot gnu.org Target Milestone: --- Check added by r222991 reveals a problem with function types created for instrumented functions. >cat test1.c int test1 (const char *p) { return (int)(*p); } >cat test2.c int test1 (const char *); int main (int argc, const char **argv) { return test1 (argv[0]); } >gcc test1.c test2.c -O0 -flto -fcheck-pointer-bounds -mmpx lto1: error: type variant has different TYPE_ARG_TYPES <function_type 0x7f7056a34bd0 type <integer_type 0x7f7056843690 int public SI size <integer_cst 0x7f705683fdf8 constant 32> unit size <integer_cst 0x7f705683fe10 constant 4> align 32 symtab 0 alias set -1 canonical type 0x7f7056843690 precision 32 min <integer_cst 0x7f705683fdb0 -2147483648> max <integer_cst 0x7f705683fdc8 2147483647> pointer_to_this <pointer_type 0x7f705685a7e0>> QI size <integer_cst 0x7f705683fca8 type <integer_type 0x7f7056843150 bitsizetype> constant 8> unit size <integer_cst 0x7f705683fcc0 type <integer_type 0x7f70568430a8 sizetype> constant 1> align 8 symtab 0 alias set 0 canonical type 0x7f7056a34bd0 arg-types <tree_list 0x7f7056a31550 value <pointer_type 0x7f7056a34b28 type <integer_type 0x7f7056a34a80 char> unsigned DI size <integer_cst 0x7f705683fbb8 constant 64> unit size <integer_cst 0x7f705683fbd0 constant 8> align 64 symtab 0 alias set 0 canonical type 0x7f705685a7e0 pointer_to_this <pointer_type 0x7f7056a3b1f8>> chain <tree_list 0x7f7056852938 value <void_type 0x7f705685a000 void>>> pointer_to_this <pointer_type 0x7f7056a3b930>> <function_type 0x7f7056a34c78 type <integer_type 0x7f7056843690 int public SI size <integer_cst 0x7f705683fdf8 constant 32> unit size <integer_cst 0x7f705683fe10 constant 4> align 32 symtab 0 alias set -1 canonical type 0x7f7056843690 precision 32 min <integer_cst 0x7f705683fdb0 -2147483648> max <integer_cst 0x7f705683fdc8 2147483647> pointer_to_this <pointer_type 0x7f705685a7e0>> QI size <integer_cst 0x7f705683fca8 type <integer_type 0x7f7056843150 bitsizetype> constant 8> unit size <integer_cst 0x7f705683fcc0 type <integer_type 0x7f70568430a8 sizetype> constant 1> align 8 symtab 0 alias set 0 canonical type 0x7f7056a34c78 arg-types <tree_list 0x7f7056a31528 value <pointer_type 0x7f7056a34b28 type <integer_type 0x7f7056a34a80 char> unsigned DI size <integer_cst 0x7f705683fbb8 constant 64> unit size <integer_cst 0x7f705683fbd0 constant 8> align 64 symtab 0 alias set 0 canonical type 0x7f705685a7e0 pointer_to_this <pointer_type 0x7f7056a3b1f8>> chain <tree_list 0x7f7056a31500 value <pointer_bounds_type 0x7f705685a0a8 __bounds_type> chain <tree_list 0x7f7056a314d8 value <void_type 0x7f705685a000 void>>>>> lto1: internal compiler error: verify_type failed 0xf81484 verify_type(tree_node const*) /gnumnt/msticlxl7_users/ienkovic/issues/mpx/gcc/gcc/tree.c:12971 0x6c12c4 lto_fixup_state /gnumnt/msticlxl7_users/ienkovic/issues/mpx/gcc/gcc/lto/lto.c:2849 0x6c143b lto_fixup_decls /gnumnt/msticlxl7_users/ienkovic/issues/mpx/gcc/gcc/lto/lto.c:2881 0x6c1d2e read_cgraph_and_symbols /gnumnt/msticlxl7_users/ienkovic/issues/mpx/gcc/gcc/lto/lto.c:3102 0x6c29b3 lto_main() /gnumnt/msticlxl7_users/ienkovic/issues/mpx/gcc/gcc/lto/lto.c:3479