[Issue 15047] New: "used before set" error with void initialization (only with -O)
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Sep 12 05:19:15 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=15047
Issue ID: 15047
Summary: "used before set" error with void initialization (only
with -O)
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: schuetzm at gmx.net
// xx.d
int testCopy()
{
int a = void;
int b = void;
int fun(int x) { int y = x; return y; }
b = fun(a);
return b;
}
# dmd -c -O xx.d
xx.d(7): Error: variable a used before set
# dmd -c xx.d
(no error)
This currently breaks compiling vibe.d with optimization for me:
vibe/core/core.d(1693,11): Error: variable a used before set
I'm going to try and see if I can get digger to work again...
--
More information about the Digitalmars-d-bugs
mailing list