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,bcab66d98d510478,start X-Google-Attributes: gid103376,public From: rracine@myremarq.com (Roger Racine) Subject: Optimization Defaults Date: 1999/12/13 Message-ID: <38553cf0.22235803@newsnew.draper.com>#1/1 X-Deja-AN: 560196354 X-Trace: newsnew.draper.com 945112230 1633 140.102.40.31 (13 Dec 1999 19:10:30 GMT) NNTP-Posting-Date: 13 Dec 1999 19:10:30 GMT Newsgroups: comp.lang.ada X-Complaints-To: abuse@draper.com Date: 1999-12-13T19:10:30+00:00 List-Id: I have already forgotten the original thread this was in, but I have some more information for those who think I am being paranoid about not using high levels of optimization. Based on Robert Dewar's strong statement to trust the GCC optimizer, and based on my own knowledge of the use of the optimizer when building GCC itself, I suggested that there should be no problem using -O2 for GCC on a current project. Immediately someone said that he had gotten burned using GCC a couple years ago (version 2.7.2, I believe he said he was using) in two different ways (using C, but the optimizer is common, right?). In one case he was trying to use an initializer on a variable that was not used except in a call to another function, and the optimizer got rid of the initialization, so the value was incorrect. In the other case he had declared a variable "volatile", and the optimizer ignored it. In both cases the no-optimize case worked fine. He vaguely remembered other problems but could not think of more than these two specific cases. His thought was that most of the problems were in the area of embedded systems (such as the use of "volatile"), that would not be used as much on workstation tools (such as GCC). In any event, we will try the current version of GCC with the optimizer (we need the performance improvement). We can hope the problems my colleague saw were fixed. Unfortunately for this newsgroup, the project is being done in C. I have asked for permission to use Ada, but have not received an answer. Roger Racine