i386: Check -mindirect-branch/-mfunction-return with -fcf-protection
authorH.J. Lu <hongjiu.lu@intel.com>
Thu, 21 Feb 2019 13:41:53 +0000 (13:41 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Thu, 21 Feb 2019 13:41:53 +0000 (05:41 -0800)
commiteb74a883e812fc1a05fbf9cfa572043c4ee5af39
tree077f9d71109cdbd4db0f636b04a167617907deb2
parent8be53488681304e4f4261fa41215a5bedea8f7b4
i386: Check -mindirect-branch/-mfunction-return with -fcf-protection

Issue an error when -mindirect-branch or -mfunction-return are used
with incompatible -fcf-protection.

gcc/

PR target/87412
* config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
error for -mindirect-branch/-mfunction-return with incompatible
-fcf-protection.

gcc/testsuite/

PR target/87412
* gcc.target/i386/pr87412-1.c: New file.
* gcc.target/i386/pr87412-2.c: Likewise.
* gcc.target/i386/pr87412-3.c: Likewise.
* gcc.target/i386/pr87412-4.c: Likewise.

From-SVN: r269068
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr87412-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr87412-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr87412-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr87412-4.c [new file with mode: 0644]