On Sun, Jul 11, 2021 at 10:48:17AM +0100, Roger Sayle wrote:
> /* { dg-do run } */
> /* { dg-options "-O2" } */
> unsigned int foo (unsigned int a)
> {
>   unsigned int u;

Can you please change the above line to
  unsigned int u = 0;
or add some other initializer,
or make it
  static unsigned int u;
?
With all those the testcase is still miscompiled without your patch,
but it doesn't use an indeterminate value in the comma expression's
lhs operand.

>   unsigned short b = __builtin_bswap16 (a);
>   return b >> (u, 12);
> }
> 
> int main (void)
> {
>   unsigned int x = foo (0x80);
>   if (x != 0x0008)
>     __builtin_abort ();
>   return 0;
> }
> 


        Jakub

Reply via email to