aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr58805.c
blob: dda0e4bdf4bd0af77c20ade2ab5994e042f158c9 (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
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre" } */

/* Type that matches the 'p' constraint.  */
#define TYPE void *

static inline
void bar (TYPE *r)
{
  TYPE t;
  __asm__ ("" : "=&p" (t), "=p" (*r));
}

void
foo (int n, TYPE *x, TYPE *y)
{
  if (n == 0)
    bar (x);
  else
    bar (y);
}

/* { dg-final { scan-tree-dump-times "__asm__" 2 "pre"} } */
/* { dg-final { cleanup-tree-dump "pre" } } */