mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
18 lines
278 B
D
18 lines
278 B
D
// REQUIRED_ARGS: -O
|
|
// https://issues.dlang.org/show_bug.cgi?id=20990
|
|
|
|
// foo() and bar() should produce the same code when
|
|
// optimized.
|
|
|
|
void foo(int* ptr)
|
|
{
|
|
if (ptr is null)
|
|
assert(false);
|
|
*ptr = 42;
|
|
}
|
|
|
|
void bar(int* ptr)
|
|
{
|
|
assert(ptr);
|
|
*ptr = 42;
|
|
}
|