[Bug middle-end/25125] [4.1 Regression] (short) ((int)(unsigned short) + (int)) is done in the wrong type
dave at hiauly1 dot hia dot nrc dot ca
gcc-bugzilla@gcc.gnu.org
Tue Dec 27 19:27:00 GMT 2005
------- Comment #20 from dave at hiauly1 dot hia dot nrc dot ca 2005-12-27 19:27 -------
Subject: Re: [4.1 Regression] (short) ((int)(unsigned short) + (int)) is done
in the wrong type
> > I am having tough time building the compiler for hppa2.0w-hp-hpux11.11.
> > These days gcc won't even allow you to build cc1 without an assembler and such.
>
> That's a regression. It always used to be possible to build
> cc1 on x86, etc. I'll take a look.
This seems to work for me on x86 linux:
../gcc/configure --with-gnu-as --disable-shared --disable-nls
--prefix=/home/dave/opt/gnu --target=hppa2.0w-hp-hpux11.11 &&
make &&
However, I'm getting different tree code with the x86 cross.
;; Function f (f)
f (a)
{
int D.1491;
<bb 2>:
if ((short int) a > 0) goto <L4>; else goto <L1>;
<L4>:;
D.1491 = 0;
goto <bb 4> (<L2>);
<L1>:;
D.1491 = (int) (short unsigned int) (short int) (a + 32768);
<L2>:;
return D.1491;
}
Not sure why? The native hppa build generates the same code using
the stage1 compiler. I have a few patches in my tree. The only one
that might be relevant is the fix for PR 25394.
Dave
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25125
More information about the Gcc-bugs
mailing list