Bug 55224 - [4.8 Regression] FAIL: gcc.target/i386/tailcall-1.c scan-assembler jmp
Summary: [4.8 Regression] FAIL: gcc.target/i386/tailcall-1.c scan-assembler jmp
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: 4.8.0
Assignee: Uroš Bizjak
URL: http://gcc.gnu.org/ml/gcc-patches/201...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-06 22:10 UTC by H.J. Lu
Modified: 2012-11-07 19:35 UTC (History)
4 users (show)

See Also:
Host:
Target: i686
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-11-07 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2012-11-06 22:10:17 UTC
On Linux/ia32, revision 193229:

http://gcc.gnu.org/ml/gcc-cvs/2012-11/msg00176.html

caused:

FAIL: gcc.target/i386/tailcall-1.c scan-assembler jmp
Comment 1 Uroš Bizjak 2012-11-07 15:23:17 UTC
(In reply to comment #0)
> On Linux/ia32, revision 193229:
> 
> http://gcc.gnu.org/ml/gcc-cvs/2012-11/msg00176.html
> 
> caused:
> 
> FAIL: gcc.target/i386/tailcall-1.c scan-assembler jmp

The referred revision removed a bit too much. Following patch fixes the problem:

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c  (revision 193296)
+++ config/i386/i386.c  (working copy)
@@ -4638,6 +4638,8 @@ ix86_function_ok_for_sibcall (tree decl, tree exp)
       if (!rtx_equal_p (a, b))
        return false;
     }
+  else if (VOID_TYPE_P (TREE_TYPE (DECL_RESULT (cfun->decl))))
+    ;
   else if (!rtx_equal_p (a, b))
     return false;
Comment 2 uros 2012-11-07 19:30:53 UTC
Author: uros
Date: Wed Nov  7 19:30:48 2012
New Revision: 193305

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193305
Log:
	PR target/55224
	* config/i386/i386.c (ix86_function_ok_for_sibcall): Put back exception
	to make a sibcall if one of the functions has void return type.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
Comment 3 Uroš Bizjak 2012-11-07 19:32:55 UTC
Fixed.
Comment 4 uros 2012-11-07 19:35:29 UTC
Author: uros
Date: Wed Nov  7 19:35:25 2012
New Revision: 193306

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193306
Log:
	PR target/55224
	* config/i386/i386.c (ix86_function_ok_for_sibcall): Put back exception
	to make a sibcall if one of the functions has void return type.


Modified:
    trunk/gcc/config/i386/i386.c