This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [trans-mem] _ITM_abortTransaction not considered as noreturn function
- From: Richard Henderson <rth at redhat dot com>
- To: Patrick Marlier <patrick dot marlier at unine dot ch>
- Cc: Aldy Hernandez <aldyh at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Tue, 15 Feb 2011 08:33:03 -0800
- Subject: Re: [trans-mem] _ITM_abortTransaction not considered as noreturn function
- References: <4D5A3ABF.2000509@unine.ch>
On 02/15/2011 12:35 AM, Patrick Marlier wrote:
> When I was looking at this problem of tail call optimization, I have
> found that _ITM_abortTransaction was not considered as a 'noreturn'
> function. Do you have any reason not doing this? If not, I propose to
> add ECF_NORETURN in calls.c:special_function_p().
DEF_TM_BUILTIN (BUILT_IN_TM_ABORT, "_ITM_abortTransaction",
BT_FN_INT, ATTR_TM_NORETURN_NOTHROW_LIST)
It's already marked noreturn. The big switch in special_function_p is
only there to add ECF_TM_OPS, for which we do not have an attribute.
Do you have a test case for the lack of noreturn? A trivial test here
says that it's present:
# BLOCK 6 freq:2
# PRED: 5 [0.0%] (true,exec)
Invalid sum of outgoing probabilities 0.0%
__builtin__ITM_abortTransaction (1);
# SUCC: 3 (ab,abcall)
Notice there's no fallthru edge.
r~