http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50802

--- Comment #11 from dave.anglin at bell dot net 2011-11-07 16:11:55 UTC ---
On 11/7/2011 10:09 AM, rguenth at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50802
>
> --- Comment #10 from Richard Guenther<rguenth at gcc dot gnu.org>  2011-11-07 
> 15:09:54 UTC ---
> Weird.  My cross configured with
>
> /space/rguenther/src/svn/trunk/configure --enable-languages=c,c++,fortran
> --disable-nls --target=hppa2.0w-hp-hpux11.11
>
> does not reproduce this.  I'm using ./cc1 -O2 on arith-rand-ll.c, and I'm
> getting
>
> arith-rand-ll.c: In function 'main':
> arith-rand-ll.c:59:4: warning: incompatible implicit declaration of built-in
> function 'abort' [enabled by default]
> ...

I see the same if I remove the "-w" option from the test.

> not sure if that's related.
>
> > From your dump file:
>
> x_118: [0, +INF]  EQUIVALENCES: { x_5 D.2243_12 } (2 elements)
> xx_56: VARYING
> D.2297_58: [-32768, 32767]
>
> xx_56 = (short int) x_118;
> Folding statement: D.2297_58 = (int) xx_56;
> Folded into: D.2297_58 = (int) x_118;
>
> should be reproducible with
>
> extern void abort (void);
>
> long long unsigned int x = 1<<  (sizeof (short int) * 8);
>
> int main()
> {
>    if (x>= 0)
>      {
>        short int xx = (short int)x;
>        if (xx != 0)
>          abort ();
>      }
>    return 0;
> }
>
> but that works for me ... does this fail for you?  Looking at the above
The above  test doesn't fail.  I've attached the detail vrp dumps as 
they don't seem
to match what you described below.
> it _appears_ that x is signed!?  The reported value-range should be
>
> x_5: VARYING
>
> which it is indeed when compiling with my cross ...
>
> Is, by any chance, the middle-end sizetype == long long unsigned int?
> And for some weird reason those are mapped together?
>
Looking at the hwi issue, I see that need_64bit_hwint is not defined for 
this target,
or for the 32-bit hppa-linux target.  Test fails on both.  However, it 
doesn't fail on
hppa64-hp-hpux11.11 where need_64bit_hwint is defined (long is 64 bits).
Suspect a cross from hppa64-hp-hpux11.11 would work.

Reply via email to