1  /* PR rtl-optimization/104839 */
       2  
       3  __attribute__((noipa)) short
       4  foo (void)
       5  {
       6    return -1;
       7  }
       8  
       9  __attribute__((noipa)) int
      10  bar (void)
      11  {
      12    short i = foo ();
      13    if (i == -2)
      14      return 2;
      15    long k = i;
      16    int j = -1;
      17    volatile long s = 300;
      18    if (k < 0)
      19      {
      20        k += s;
      21        if (k < 0)
      22  	j = 0;
      23      }
      24    else if (k >= s)
      25      j = 0;
      26    if (j != -1)
      27      return 1;
      28    return 0;
      29  }
      30  
      31  int
      32  main ()
      33  {
      34    if (bar () != 0)
      35      __builtin_abort ();
      36    return 0;
      37  }