From 08c6cbd2f55bbb046e5ec82a8933fbd662b4009d Mon Sep 17 00:00:00 2001 From: sandra Date: Wed, 25 Jul 2012 18:08:06 +0000 Subject: 2012-07-25 Sandra Loosemore Paul Brook PR target/53633 gcc/ * target.def (warn_func_return): New hook. * doc/tm.texi.in (TARGET_WARN_FUNC_RETURN): New hook. * doc/tm.texi: Regenerate. * doc/sourcebuild.texi (Effective-Target Keywords): Document naked_functions. * ipa-pure-const.c (warn_function_noreturn): Check targetm.warn_func_return. * tree-cfg.c (execute_warn_function_return): Likewise. * config/spu/spu.c (spu_warn_func_return): New. (TARGET_WARN_FUNC_RETURN): Define. * config/rx/rx.c (rx_warn_func_return): New. (TARGET_WARN_FUNC_RETURN): Define. * config/avr/avr.c (avr_warn_func_return): New. (TARGET_WARN_FUNC_RETURN): Define. * config/arm/arm.c (arm_warn_func_return): New. (TARGET_WARN_FUNC_RETURN): Define. * config/mcore/mcore.c (mcore_warn_func_return): New. (TARGET_WARN_FUNC_RETURN): Define. (saved_warn_return_type, saved_warn_return_type_count): Remove. (mcore_reorg, mcore_handle_naked_attribute): Remove warn_return hack. gcc/cp/ * decl.c (finish_function): Check targetm.warn_func_return. gcc/testsuite/ * lib/target-suports.exp (check_effective_target_naked_functions): New. * c-c++-common/pr53633.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189860 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/lib/target-supports.exp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/testsuite/lib') diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index dbe4086a193..6640ef24bfa 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -984,6 +984,14 @@ proc check_named_sections_available { } { }] } +# Return true if the "naked" function attribute is supported on this target. + +proc check_effective_target_naked_functions { } { + return [check_no_compiler_messages naked_functions assembly { + void f() __attribute__((naked)); + }] +} + # Return 1 if the target supports Fortran real kinds larger than real(8), # 0 otherwise. # -- cgit v1.2.1