https://issues.dlang.org/show_bug.cgi?id=22897
Issue ID: 22897
Summary: importC: segfault calling forward-declared static
function through pointer
Product: D
Version: D2
Hardware: All
OS: Linux
Status: NEW
Keywords: ImportC, wrong-code
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
static void other(void);
int main()
{
void (*fn)(void) = other;
fn();
return 0;
}
static void other(void)
{
}
happens on linux but not windows
- direct calls work but taking the address gives an invalid pointer
- only functions that come before the body of other() are affected
--