This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [trans-mem] _ITM_abortTransaction not considered as noreturn function


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]