Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Sat, 11 Jun 2005 14:33:32 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: gcc 3.4.4 optimization problem (was Re: Negative stats from rsync with 20050610 snapshot) Message-ID: <20050611183332.GA28883@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com References: <42AA611A DOT 2050605 AT acm DOT org> <20050611145713 DOT GA11065 AT calimero DOT vinschen DOT de> <42AB16FA DOT 4000701 AT familiehaase DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42AB16FA.4000701@familiehaase.de> User-Agent: Mutt/1.5.8i On Sat, Jun 11, 2005 at 06:53:14PM +0200, Gerrit P. Haase wrote: >Corinna Vinschen wrote: >>Gerrit, could you please follow up on this? It seems the simplest way is >>to just switch off -funit-at-a-time for the -O2 optimization. This is the >>patch we applied internally, if that's of any help for you: >> >>Index: gcc/opts.c >>=================================================================== >>RCS file: /cvs/cvsfiles/gcc/opts.c,v >>retrieving revision 1.3 >>diff -c -3 -p -r1.3 opts.c >>*** gcc/opts.c 16 Mar 2004 01:43:58 -0000 1.3 >>--- gcc/opts.c 23 Jul 2004 14:03:41 -0000 >>*************** decode_options (unsigned int argc, const >>*** 564,570 **** >> flag_delete_null_pointer_checks = 1; >> flag_reorder_blocks = 1; >> flag_reorder_functions = 1; >>- flag_unit_at_a_time = 1; >> } >> >> if (optimize >= 3) >>--- 564,569 ---- >> >>Otherwise, do you know by any chance, if there exists some fix for that >>problem? The above kludge is almost a year old, so there's a chance >>that somebody already found the fix. > >Where we had a problem was with -fschedule-insns2 >(flag_schedule_insns_after_reload): > >On Aug 18 15:27:41, Corinna wrote: >> Ich habe jetzt getestet und herausgefunden, dass durch simples >> Abschalten der -fschedule-insns2 alles so funktioniert wie es soll. >> Das gilt sowohl fuer cygserver, als auch fuer OpenSSH-3.9p1. > >I remember that I applied some patch for this, I think I missed it >this time. However, I hope this is fixed with gcc-3.4.x. > >Regarding unit-at-a-time I cannot remember right now if there was >discussion, there are known issues with this option, anyway I will >apply your kludge since I have not much time, I'm on a business trip >the next two weeks. I did a little more debugging on this and it seems like, in this case at least, the problem is that the newlib code is wrong. Compiling it with -Wstrict-aliasing revealed a problem. Correcting the strict aliasing problem seems to make rsync work better. There are also two other strict error warnings in newlib which I'll fix. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/