[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug target/23453] [4.0/4.1 regression] miscompilation of PARI/GP on x86



------- Additional Comments From belyshev at depni dot sinp dot msu dot ru  2005-08-18 21:14 -------
Created an attachment (id=9543)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9543&action=view)
testcase, part2 (3112 bytes)

These two files are self-contained tescase for this bug, to compile use this
command:
gcc bug1.c bug2.c -O3 -fno-strict-aliasing -fomit-frame-pointer -march=i486

Seems that gcse2 miscompiles gauss_pivot_ker() from bug2.c, here is a diff
between code generated with -fno-gcse-after-reload and w/o that option:

	movl	$1, 100(%esp)
	movl	$0, 36(%esp)
-	.p2align 4,,15
-.L23:
	movl	100(%esp), %edi
+	movl	100(%esp), %ecx
	sall	$2, %edi
	pushl	$0
	pushl	$0
	pushl	$0
-	movl	100(%esp), %ecx
	movl	(%ecx,%edi), %ecx
	pushl	%ecx
	call	gauss_get_pivot_max

which is clearly wrong.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #9526 is|0                           |1
           obsolete|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23453

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.



Reply to: