[Open64-devel] (no subject)
Brought to you by:
ributzka,
suneeljain
From: Cheng, Bu Q. <bu....@in...> - 2002-02-07 06:23:07
|
> > source file: > > > > static void bitfields(); > > struct fields > > { > > unsigned x1:1; > > unsigned x2:2; > > unsigned x3:3; > > unsigned :1; /* just because it can be done */ > > unsigned x4:4; > > }; > > struct fields *bf() > > { > > static struct fields f; > > return(&f); > > } > > void bitfields() > > { > > struct fields *bf(); > > Filename = "c35.c"; > > bf()->x3 = 3; > > bf()->x2 = 2; > > iequals(0, bf()->x3 *= bf()->x2, 6); > > } > > main() > > { > > bitfields(); > > } When doing, sgicc -ipa -O2 c35.c util.c -keep -show Result ***** Reached first test ***** ERROR in c35.c at line 45: (4) != (6) The bug is cause when doing ebo. ebo use sxt_sequence()(ebo_special.cxx) to merge two instructions into one. dep r1 = r2, r3, pos1, leng1 extra.u r4 = r1, pos2, leng2 ----> and_i r4=r3, leng2 sxt_sequence make a mistake. When pos1 <= pos2 && (pos1 + leng1) >= (pos2 + leng2). It will do above merge. It's wrong since if pos1 < pos2 not '='(just like the IR of c35.c). The merge will change the semantic of program. Thanks ChengBuQi |