d: Merge upstream dmd 47871363d, druntime, c52e28b7, phobos 99e9c1b77.
[official-gcc.git] / gcc / testsuite / gdc.dg / asm3.d
blobd792b2474becc54f3a7e0d335380c8e88af8a1e8
1 // { dg-do compile }
2 // { dg-options "-Wall -Wdeprecated -Werror" }
3 module asm3;
5 void test1() nothrow
7 asm { } // { dg-error "'asm' statement is assumed to throw - mark it with 'nothrow' if it does not" }
10 void test2() pure
12 asm { } // { dg-error "'asm' statement is assumed to be impure - mark it with 'pure' if it is not" }
15 void test3() @nogc
17 asm { } // { dg-error "'asm' statement is assumed to use the GC - mark it with '@nogc' if it does not" }
20 void test4() @safe
22 asm { } // { dg-error "'asm' statement is assumed to be '@system' - mark it with '@trusted' if it is not" }