(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
m68k/
pr47192.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -mcpu=51qe -fdisable-ipa-pure-const -fdump-rtl-pro_and_epilogue" } */
       3  /* { dg-final { scan-rtl-dump-times "unspec_volatile" 1 "pro_and_epilogue"} } */
       4  
       5  
       6  char F(short *ty);
       7  
       8  short V(char cmd)
       9  {
      10    static short st256;
      11    static short stc;
      12    short sc;
      13    short scd;
      14    short d;
      15  
      16    F(&sc);
      17  
      18    if (cmd == 4)
      19    {
      20      st256 = 0;
      21      d = 0;
      22    }
      23    else
      24    {
      25      scd = sc - stc;
      26      if (scd < -128)
      27      {
      28        scd += 256;
      29      }
      30      d = st256 >> 8;
      31      st256 -= d << 8;
      32    }
      33    stc = sc;
      34    return d;
      35  }
      36