]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/ext/asm8.C
re PR c/21419 (Accepts writting to const via asm)
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / ext / asm8.C
1 /* { dg-do compile } */
2
3 /* Test that asm with no outputs are treated as volatile. */
4
5 void f(int x)
6 {
7 __asm__ ("extended asm not discarded" : : "r" (x));
8 }
9
10 void g (void)
11 {
12 __asm__ ("simple asm not discarded");
13 }
14 /* { dg-final { scan-assembler "extended asm not discarded" } } */
15 /* { dg-final { scan-assembler "simple asm not discarded" } } */
16