x86: Check interrupt instead of noreturn attribute
commitbb98f71bac8aace4e685e648a81dfaf365123833
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 25 Feb 2024 21:14:39 +0000 (25 13:14 -0800)
committerH.J. Lu <(no_default)>
Mon, 26 Feb 2024 10:31:06 +0000 (26 02:31 -0800)
tree41728126aebe1e8e46d5de5270fef2abef8d75fc
parentf12697f3298566412386e5d70dc48a431e09b75f
x86: Check interrupt instead of noreturn attribute

ix86_set_func_type checks noreturn attribute to avoid incompatible
attribute error in LTO1 on interrupt functions.  Since TREE_THIS_VOLATILE
is set also for _Noreturn without noreturn attribute, check interrupt
attribute for interrupt functions instead.

gcc/

PR target/114097
* config/i386/i386-options.cc (ix86_set_func_type): Check
interrupt instead of noreturn attribute.

gcc/testsuite/

PR target/114097
* gcc.target/i386/pr114097-1.c: New test.
gcc/config/i386/i386-options.cc
gcc/testsuite/gcc.target/i386/pr114097-1.c [new file with mode: 0644]