https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110817

--- Comment #12 from Zdenek Sojka <zsojka at seznam dot cz> ---
(In reply to Andrew Pinski from comment #11)
> (In reply to Zdenek Sojka from comment #10)
> > Probably related, even simpler testcase, failing everywhere at -O0:
> > 
> > $ cat testcase.c
> > typedef unsigned long __attribute__((__vector_size__ (8))) V;
> > 
> > int
> > main (void)
> > {
> >   V v = ~((V) { } <=0);
> >   if (v[0])
> >     __builtin_abort ();
> >   return 0;
> > }
> 
> But unsigned<=0 is always false and taking the bitwise not of that is always
> -1.

Interesting, all the gcc's starting from gcc-6 up to gcc-13 at -O0 to -O3
(including 32bit and 64bit targets) seem to "PASS" on this testcase.

... wait, no, (unsigned)0 <= 0 is TRUE ...

Reply via email to