RISC-V: Error if function declared with different interrupt modes.
authorKito Cheng <kito.cheng@gmail.com>
Thu, 12 Jul 2018 19:59:09 +0000 (19:59 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 12 Jul 2018 19:59:09 +0000 (12:59 -0700)
commit8528f27bda0fd315eef48827c10a9c488071ceb3
treeb66502e693e5e6a21f3dafc9da0ccfcf3df98c9d
parent9b4520336913e7015415fa921ea1de89ac98cfa9
RISC-V: Error if function declared with different interrupt modes.

gcc/
2018-07-06  Kito Cheng  <kito.cheng@gmail.com>
        * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
        (riscv_expand_epilogue): Add assertion to check interrupt mode.
        (riscv_set_current_function): Extract getting interrupt type to new
        function.
        (riscv_get_interrupt_type): New function.
        (riscv_merge_decl_attributes): New function, checking interrupt type is
        same.
        (TARGET_MERGE_DECL_ATTRIBUTES): Define.

gcc/testsuite/
2018-07-06  Kito Cheng  <kito.cheng@gmail.com>
        * gcc.target/riscv/interrupt-conflict-mode.c: New.

From-SVN: r262607
gcc/ChangeLog
gcc/config/riscv/riscv.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/riscv/interrupt-conflict-mode.c [new file with mode: 0644]