Bug 14815 - -frename-registers produces incorrect code on ia64
Summary: -frename-registers produces incorrect code on ia64
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.3.3
: P2 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2004-04-01 23:16 UTC by Jonathan Butler
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: ia64-unknown-linux
Target: ia64-unknown-linux
Build: ia64-unknown-linux
Known to work:
Known to fail:
Last reconfirmed:


Attachments
IsWeirdness.cc (1.15 KB, text/plain)
2004-04-01 23:19 UTC, Jonathan Butler
Details
IsWeirdness.ii (gzipped) (101.43 KB, application/octet-stream)
2004-04-01 23:19 UTC, Jonathan Butler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Butler 2004-04-01 23:16:35 UTC
The attached code (IsWeirdness.{cc,i}) produces the correct result when compiled
with -O2 -finline-functions on ia64 and with -O3 on alpha, but produces the
incorrect result with -O3 on ia64, which leads me to the conclusion that
something's gone all funny with -frename-registers on ia64.

The code is a bit nonsensical, as I've reduced it as much as possible while
preserving the incorrect behavior, but it should print the number "-764".  With
-O3 on ia64, it prints "-528".
Comment 1 Jonathan Butler 2004-04-01 23:19:04 UTC
Created attachment 6028 [details]
IsWeirdness.cc
Comment 2 Jonathan Butler 2004-04-01 23:19:47 UTC
Created attachment 6029 [details]
IsWeirdness.ii (gzipped)
Comment 3 Andrew Pinski 2004-04-06 00:39:14 UTC
What bintuils are you using, as this could also be a bug in gas?
Comment 4 Jonathan Butler 2004-04-06 15:03:56 UTC
Subject: Re:  -frename-registers produces incorrect
 code on ia64

as -v returns:
GNU assembler version 2.14.90.0.7 (ia64-linux) using BFD version 2.14.90.0.7 
20031029 Debian GNU/Linux

pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-06 00:39 -------
> What bintuils are you using, as this could also be a bug in gas?
> 


Comment 5 Andrew Pinski 2004-07-18 03:36:36 UTC
Actually there was a fix to the mainline and I think the 3.4.0 branch where the problem with -frename-
registers and IA64 was a target problem rather than a generic code problem.
Comment 6 Steve Ellcey 2004-11-12 19:07:32 UTC
I have run this testcase with the 3.3.* and 3.4.* and ToT (pre-4.0) compilers on
IA64 linux.  The bug exists in all 3.3.* compilers (3.3.[012345]) and none of
the 3.4 compilers (3.4.[0123]).  Nor does it happen on ToT.  Are we still doing
3.3 patches?  If I knew what change between 3.3 and 3.4 fixed this I could look
into backporting it but I don't know what change fixed it and I don't know if it
is worth trying to find out.
Comment 7 Andrew Pinski 2004-11-12 19:29:40 UTC
Fixed in 3.4.0, 3.3.x is just on regression fixing mode and since this is most likely not a regression I am 
closing as fixed.