https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85403
Bug ID: 85403 Summary: internal compiler error: ... config/i386/i386.c:32347 Product: gcc Version: 8.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: hjl.tools at gmail dot com Target Milestone: --- [hjl@gnu-cfl-1 gcc]$ /export/build/gnu/gcc-cet-test/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc-cet-test/build-x86_64-linux/gcc/ /export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/mvc1.c -fcf-protection -mcet -fno-diagnostics-show-caret -fdiagnostics-color=never -ansi -pedantic-errors -lm -o ./mvc1.exe /export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/mvc1.c: In function \u2018foo.resolver\u2019: /export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/mvc1.c:27:1: error: \u2018-fcf-protection=full\u2019 requires Intel CET support. Use -mcet or both of -mibt and -mshstk options to enable CET during IPA pass: targetclone /export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/mvc1.c:27:1: internal compiler error: tree check: expected target_option_node, have error_mark in get_builtin_code_for_version, at config/i386/i386.c:32347 0x13624ff tree_check_failed(tree_node const*, char const*, int, char const*, ...) /export/gnu/import/git/sources/gcc/gcc/tree.c:9327 0x7ddca8 tree_check(tree_node*, char const*, int, char const*, tree_code) /export/gnu/import/git/sources/gcc/gcc/tree.h:3135 0x146134e get_builtin_code_for_version /export/gnu/import/git/sources/gcc/gcc/config/i386/i386.c:32347 0x1461b43 dispatch_function_versions /export/gnu/import/git/sources/gcc/gcc/config/i386/i386.c:32631 0x14629ab ix86_generate_version_dispatcher_body /export/gnu/import/git/sources/gcc/gcc/config/i386/i386.c:32967 0x1c16fcd create_dispatcher_calls /export/gnu/import/git/sources/gcc/gcc/multiple_target.c:97 0x1c18098 ipa_target_clone /export/gnu/import/git/sources/gcc/gcc/multiple_target.c:437 0x1c18104 execute /export/gnu/import/git/sources/gcc/gcc/multiple_target.c:466 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. [hjl@gnu-cfl-1 gcc]$ Since CET is applied to the whole program, it is correct to disallow -fcf-protection=full without -mcet. But compiler shouldn't crash.