www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - dmc internal error cg87 268

↑ ↓ ← Laurentiu Pancescu <plaur crosswinds.net> writes:
I got an internal error cg87/268 when compiling code below with DMC 
8.29n (latest stable version, AFAIK):

#include <math.h>
int main(void)
{
	float a = 1, b = 2, c = 3;
	float xxy;
	/*xxy = a + b * (a - c);*/
	xxy = (float)exp(xxy);
	a = xxy / (xxy + 1);
	return a + xxy;
}

It only happens with "dmc -o+all -c cg87_268.c".  Switching off any 
individual optimizations has no effect on the bug, but -o+none makes the 
error disappear.  Try to change the declaration of xxy into "double 
xxy;", and the cg87 doesn't appear any more, even with -o+all.

Regards,
   Laurentiu
Sep 29 2002
↑ ↓ "Walter" <walter digitalmars.com> writes:
This works with the beta compiler 8.30, see
www.digitalmars.com/download/freecompiler.html


"Laurentiu Pancescu" <plaur crosswinds.net> wrote in message
news:3D9766AB.3080808 crosswinds.net...
 I got an internal error cg87/268 when compiling code below with DMC
 8.29n (latest stable version, AFAIK):

 #include <math.h>
 int main(void)
 {
 float a = 1, b = 2, c = 3;
 float xxy;
 /*xxy = a + b * (a - c);*/
 xxy = (float)exp(xxy);
 a = xxy / (xxy + 1);
 return a + xxy;
 }

 It only happens with "dmc -o+all -c cg87_268.c".  Switching off any
 individual optimizations has no effect on the bug, but -o+none makes the
 error disappear.  Try to change the declaration of xxy into "double
 xxy;", and the cg87 doesn't appear any more, even with -o+all.

 Regards,
    Laurentiu

Sep 29 2002
↑ ↓ → Laurentiu Pancescu <plaur crosswinds.net> writes:
That's right, didn't take a look at that - thanks for pointing that out! 
  Is the beta compiler also available as DLL version? I have the CD, and 
for SpeakFreely it was much easier to use IDDE, instead of writing huge 
makefiles manually...

Laurentiu

Walter wrote:
 This works with the beta compiler 8.30, see
 www.digitalmars.com/download/freecompiler.html
 
 
 "Laurentiu Pancescu" <plaur crosswinds.net> wrote in message
 news:3D9766AB.3080808 crosswinds.net...
 
I got an internal error cg87/268 when compiling code below with DMC


Sep 30 2002