From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2eced66edb1c2869 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: gnat3.10 optimization O2 on win95 - problem Date: 1997/11/06 Message-ID: #1/1 X-Deja-AN: 287416210 References: X-Complaints-To: usenet@news.nyu.edu X-Trace: news.nyu.edu 878825928 13801 (None) 128.122.140.58 Organization: New York University Newsgroups: comp.lang.ada Date: 1997-11-06T00:00:00+00:00 List-Id: W P Berriss says <> It is a common misconception that a situation like this necessarily means that there is an optimization problem. Of course this could be the case (we do not see many optimization problems with GCC these days, but we have seen occasional examples, and indeed these examples are about evenly split between cases where optimization works, and no optimization fails, and vice versa). The point however is that if you write erroneous or legitimately non-deterministic code, it can very well be the case that the difference in behavior is perfectly legitimate, and does not represent a flaw in the compiler. In general when your program does not work, there are two possibilities. Either your program is wrong, or the compiler is wrong. The situation you report here is no different, and the same analysis holds. Usually the best thing to do is to spend at least some time assuming that it is your program, and debugging in the normal way. If this process gets nowhere and you start to be convinced that there really is a bug, then narrow it down as far as possible, and send it to report@gnat.com in the usual way.