summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/asm-pr24146.c
blob: 0b1be7da7de099201cb4afe878715666c06001ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */

/* Test that asm with no outputs are treated as volatile.  */

void f(int x)
{
  __asm__ ("extended asm not discarded" : : "r" (x));
}

void g (void)
{
  __asm__ ("simple asm not discarded");
}
/* { dg-final { scan-assembler "extended asm not discarded" } } */
/* { dg-final { scan-assembler "simple asm not discarded" } } */