[trans-mem] _ITM_abortTransaction not considered as noreturn function

Patrick Marlier patrick.marlier@unine.ch
Tue Feb 15 17:33:00 GMT 2011


Dear Richard,

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().

Also I just want to point out that BUILT_IN_TM_START is missing in this 
switch/case but I think I figure out why it is ok to not have it (except 
in the case of nested transactions).

Thanks in advance for your time,

Patrick Marlier.

Index: calls.c
===================================================================
--- calls.c     (revision 170149)
+++ calls.c     (working copy)
@@ -473,9 +473,10 @@
      {
        switch (DECL_FUNCTION_CODE (fndecl))
         {
+       case BUILT_IN_TM_ABORT:
+         flags |= ECF_NORETURN;
         case BUILT_IN_TM_COMMIT:
         case BUILT_IN_TM_COMMIT_EH:
-       case BUILT_IN_TM_ABORT:
         case BUILT_IN_TM_IRREVOCABLE:
         case BUILT_IN_TM_GETTMCLONE_IRR:
         case BUILT_IN_TM_MEMCPY:



More information about the Gcc mailing list