March 18, 2022 [Issue 22897] New: importC: segfault calling forward-declared static function through pointer | ||||
|---|---|---|---|---|
| ||||
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: nobody@puremagic.com Reporter: duser@neet.fi 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 -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply