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