www.digitalmars.com         C & C++   DMDScript  

c++ - bug report

reply "Eduardo Nunes" <edfpn hotmail.com> writes:
Walter,

The compiler generate bad code for CMatrix::rotate method, when used with
the switches,
-5 -o+all.
but correct code without -5 switch.
in attach is a example code.

btw, what is the pentium favored code guidelines used by the compiler,
besides code reordering?

Thanks,

Eduardo Nunes
ed sky3d.com



begin 666 bug2.cpp
M(VEN8VQU9&4 /'-T9&EO+F ^#0HC:6YC;'5D92 \;6%T:"YH/ T*#0IC;&%S
M<R!#36%T<FEX#0I[#0H)9&]U8FQE(&U;,39=.PT*<'5B;&EC. T*"79O:60 
M<F]T871E*&1O=6)L92!R>"QD;W5B;&4 <GDL9&]U8FQE(')Z*3L-"GT[#0H-
M"G9O:60 0TUA=')I>#HZ<F]T871E*&1O=6)L92!R>"QD;W5B;&4 <GDL9&]U
M8FQE(')Z*0T*>PT*"61O=6)L90EC>"QS>"QC>2QS>2QC>BQS>CL-" T*"6-X
M/6-O<RAR>"D["7-X/7-I;BAR>"D[#0H)8WD]8V]S*')Y*3L)<WD]<VEN*')Y
M*3L-" EC>CUC;W,H<GHI.PES>CUS:6XH<GHI.PT*#0H);5LP73TH8WDJ8WHI
M.PT*"6U;-%T]*"UC>2IS>BD[#0H);5LX73TH<WDI.PT*"6U;,3)=/3 N,#L-
M" T*"6U;,5T]*" H8WHJ<W I*G-Y*2LH8W J<WHI*3L-" EM6S5=/2 H8W J
M8WHI+2 H<W J<WDI*G-Z*2D[#0H);5LY73TH+2AC>2IS>"DI.PT*"6U;,3-=
M/3 N,#L-" T*"6U;,ET]*"AS>"IS>BDM*"AC>"IC>BDJ<WDI*3L-" EM6S9=
M/2 H8WHJ<W I*R H8W J<WDI*G-Z*2D[#0H);5LQ,%T]*&-X*F-Y*3L-" EM
M6S$T73TP+C [#0H-" EM6S-=/6U;-UT];5LQ,5T],"XP.PT*"6U;,35=/3$N
M,#L-"GT-" T*:6YT(&UA:6XH=F]I9"D-"GL-" E#36%T<FEX(&T[#0H-" EM
I+G)O=&%T92 P+C Q+" P+C$L(#$N,"D[#0H-" ER971U<FX ,#L-"GT`
`
end
Oct 24 2002
parent reply Jan Knepper <jan smartsoft.us> writes:
Eduardo Nunes wrote:

 The compiler generate bad code for CMatrix::rotate method, when used with
 the switches,
 -5 -o+all.
 but correct code without -5 switch.
 in attach is a example code.
Tried without the -o+all switch and with the -5 switch? Jan
Oct 24 2002
parent reply "Eduardo Nunes" <edfpn hotmail.com> writes:
"Jan Knepper" <jan smartsoft.us> wrote in message
news:3DB7F2B4.F33A72D1 smartsoft.us...
 Eduardo Nunes wrote:

 The compiler generate bad code for CMatrix::rotate method, when used
with
 the switches,
 -5 -o+all.
 but correct code without -5 switch.
 in attach is a example code.
Tried without the -o+all switch and with the -5 switch? Jan
yes, sc bug2.cpp (good code) sc -5 bug2.cpp (good code) sc -o+all bug2.cpp (good code) sc -5 -o+all bug2.cpp (bad code) from reading the generated code, the main difference and the crash point is: mov EAX,FLAT:_DATA[00h] mov EDX,FLAT:_DATA[04h] mov ECX,EAX mov 060h[EAX],EAX <<< crash, EAX=0, EDX=0 the compiler version is 8.30, Eduardo Nunes, ed sky3d.com
Oct 24 2002
parent "Walter" <walter digitalmars.com> writes:
Thanks, I'll take a look. -Walter
Oct 24 2002