mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
18 lines
347 B
D
18 lines
347 B
D
/*
|
|
REQUIRED_ARGS: -O
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail5908.d(16): Error: divide by zero
|
|
fail_compilation/fail5908.d(17): Error: divide by zero
|
|
---
|
|
*/
|
|
|
|
// This bug is caught by the dmd optimizer - other backends might not catch it or give a different message
|
|
|
|
int main()
|
|
{
|
|
int a = 1;
|
|
int b = 0;
|
|
return (a % b) +
|
|
(a / b);
|
|
}
|