d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / attributediagnostic_pure.d
bloba120dabf852d3c5b979648bfb6631732b9db8143
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/attributediagnostic_pure.d(20): Error: `pure` function `D main` cannot call impure function `attributediagnostic_pure.gc`
5 fail_compilation/attributediagnostic_pure.d(15): which wasn't inferred `pure` because of:
6 fail_compilation/attributediagnostic_pure.d(15): `asm` statement is assumed to be impure - mark it with `pure` if it is not
7 ---
8 */
10 // Issue 17374 - Improve inferred attribute error message
11 // https://issues.dlang.org/show_bug.cgi?id=17374
13 auto gc()
15 asm {}
18 void main() pure
20 gc();