This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimization/8726: GCC 3.2.1 miscompiles Samba 2.2.7 on 32-bit sparc


The following reply was made to PR optimization/8726; it has been noted by GNATS.

From: "Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de>
To: Paul Eggert <eggert@twinsun.com>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: optimization/8726: GCC 3.2.1 miscompiles Samba 2.2.7 on 32-bit sparc
Date: Wed, 27 Nov 2002 14:05:17 +0100

 Hi,
 
 I can confirm this as a regression from 3.2. This is a somewhat
 modified example with types clean up a bit. Compile with -O2.
 The problem seems to be in the tail call optimizations.
 
 int fcntl_lock(int a, int b, int c, int d, double e, int f)
 {
   return f;
 }
 int vfswrap (int dummy, int a, int b, int c, int d, double e, int f)
 {
 	 return fcntl_lock(a, b, c, d, e, f);
 }
 int main (void)
 {
   return vfswrap (0, 1, 2, 3, 4, 5, 6);
 }
 
 The number of arguments and the placement of the double argument is
 important. From my tests it seems that the problem always arises if
 a 64bit argument is passed to vfswrap partly in register o5 and partly
 on the stack. Wenn passing all the arguments except the first one to 
 fcntl_lock the optimizer doesn't move the following stack argmuments
 when reusing the existing stack frame.
 
     regards  Christian
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]