Hi,
I'm running the Pro64 on an IRIX/MIPS machine and have a problem with
the c front-end.
gfec translates this simple program
int main( void )
{
unsigned int a;
a = 1;
return a;
}
to the following
_INT32 main()
{
_UINT32 a;
a = 0U;
return * (_INT32 *)(&a);
} /* main */
Note tha a 0 and not a 1 is being assigned to a. The .B file looks like
this:
LOC 1 3 unsigned int a;
LOC 1 4
LOC 1 5 a = 1;
U4INTCONST 0 (0x0)
U4STID 0 <2,1,a> T<8,.predef_U4,4>
If I declare a as a signed int or as a long (signed or unsigned, it
doesn't matter) it works fine.
My binaries of the Pro64 are N32 mips-4.
Does anyone out there have any idea of what might be happenning? I've
been doing some debugging and I think that perhaps the problem is due to
an ill performed conversion of the constant to the type of the variable,
but I'm not sure.
Thank you,
Eduard
_____________________________________________________________________
o o o Eduard Santamaria Barnadas
o o o Department of Computer Architecture
o o o Universitat Politecnica de Catalunya Phone: +34 934 011 649
C/ Jordi Girona, 1-3
Campus Nord, Modul C6 - S103
U P C 08034 - BARCELONA (SPAIN) mailto:esantama@xxxxxxxxx
_____________________________________________________________________
|