Debian Codegraph @

gcc/testsuite/gdc.dg/asm3.d

raw
1 // { dg-do compile }
2 // { dg-options "-Wall -Wdeprecated -Werror" }
3 module asm3;
4
5 void test1() nothrow
6 {
7 asm { } // { dg-error "'asm' statement is assumed to throw - mark it with 'nothrow' if it does not" }
8 }
9
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
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
20 void test4() @safe
21 {
22 asm { } // { dg-error ".asm. statement without .@trusted. annotation is not allowed in a .@safe. function" }
23 }
24