This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/19093] g++.dg/opt/max1.C fails on ia64 and x86_64
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Dec 2004 20:00:59 -0000
- Subject: [Bug other/19093] g++.dg/opt/max1.C fails on ia64 and x86_64
- References: <20041220195545.19093.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-20 20:00 -------
Actually it is just the testcase is invalid for 64bit targets (woops, my fault since I made it).
This patch should fix the problem:
Index: g++.dg/opt/max1.C
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/opt/max1.C,v
retrieving revision 1.2
diff -u -p -r1.2 max1.C
--- g++.dg/opt/max1.C 19 Dec 2004 20:11:15 -0000 1.2
+++ g++.dg/opt/max1.C 20 Dec 2004 19:59:13 -0000
@@ -10,7 +10,7 @@ long fff[10];
void f(long a)
{
int i;
- a = *((long*)(a+5)) >? *((long*)(a+1));
+ a = *((long*)(a+1+sizeof(long))) >? *((long*)(a+1));
for(i=0;i<10;i++)
fff[i] = a;
I will apply it to all the branches where this is effected, 3.3, 3.4, and the mainline when I get home later
today.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Component|middle-end |other
Ever Confirmed| |1
Keywords|wrong-code |
Last reconfirmed|0000-00-00 00:00:00 |2004-12-20 20:00:59
date| |
Target Milestone|--- |3.3.6
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19093