This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.


[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

OB-3.1.1 & egcs-1.1.1: Optimization error.



Host:
Linux: 2.0.36
glibc-2.0.7-29
egcs-2.91.60 19981201 (egcs-1.1.1 release)

Bug:
An error is reported during the ORBacus runtest.

File: TestAny.cpp
Line: 334

for(i = 0, d = 0 ; d < 10 ; i++, d += 0.1)
   TEST((*vp)[i] == d);


The original compilation for this file was:
c++ -c -I. -I../include -I/usr/local/JTC-1.0.5/include -DNDEBUG  -O
--no-implicit-templates -Wall -Wno-return-type TestAny.cpp

I recompiled it without Optimization:
c++ -c -I. -I../include -I/usr/local/JTC-1.0.5/include -DNDEBUG
--no-implicit-templates -Wall -Wno-return-type TestAny.cpp

Thus, everything run fine.

As d is a double type, I suspect the d += 0.1 statement.
(*vp)[i] return a double value. vp is a DoubleSeq.
Maybe this bug is related to a previous one.
for egcs gurus...

A+

--
Jean-Michel Paris - Software Engineer
SITA Group http://www.sita.int
Internetworking Products & Services Program
Bât Héraklion - 1041 Route des Dolines
Sophia Antipolis
06560 VALBONNE - FRANCE
Tel: +33-(0)4.92.96.64.95
Fax: +33-(0)4.92.96.64.91
mailto:Jean-Michel.Paris@pt.nce.sita.int