summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr37879.c
blob: 5dd252782c74fa7b45bc1665190d02c1a6946cf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* PR tree-optimization/37879 */
/* { dg-do compile } */
/* { dg-options "-O2" } */

static inline void bar (int) __attribute__ ((noreturn));
void baz () __attribute__ ((noreturn));

inline int
foo (int i)
{
  return i;
}

int i = 23;
static inline void
bar (int j)
{
  if (j)
    asm ("");
}		/* { dg-warning "does return" } */

void
baz ()
{
  int j;
  bar (foo (j = i++));
  asm ("");
}