1 // { dg-do compile }
2 // { dg-options "-Wall -Wdeprecated -Werror" }
3 module asm3;
4
test1()5 void test1() nothrow // { dg-error "nothrow function 'asm3.test1' may throw" }
6 {
7 asm { } // { dg-error "asm statement is assumed to throw - mark it with 'nothrow' if it does not" }
8 }
9
test2()10 void test2() pure
11 {
12 asm { } // { dg-error "asm statement is assumed to be impure - mark it with 'pure' if it is not" }
13 }
14
test3()15 void test3() @nogc
16 {
17 asm { } // { dg-error "asm statement is assumed to use the GC - mark it with '@nogc' if it does not" }
18 }
19
test4()20 void test4() @safe
21 {
22 asm { } // { dg-error "asm statement is assumed to be @system - mark it with '@trusted' if it is not" }
23 }
24
25