summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr18921-1.c
blob: b8c91aa0948a6d3a510630745dc4bcc3a3fb0d1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* PR middle-end/18921 */
/* { dg-do run } */
/* { dg-options "-O2" } */

extern void abort (void);

int foo (int k)
{
  unsigned char j = 0;
  (k ? 0 : j++) == -1;
  return j;
}

int main ()
{
  if (!foo (0))
    abort ();
  return 0;
}