[Issue 1485] Reference to enum member in circular import crashes DMD

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 26 00:36:03 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1485


kamm-removethis at incasoftware.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Windows                     |All
            Version|1.021                       |1.020




------- Comment #1 from kamm-removethis at incasoftware.de  2007-09-26 02:36 -------
This hard to diagnose segfault has recently caused major headache in a C++ to D
porting project. After some experimenting it became clear that something
connected with circular imports had to be the cause, but we never expected the
enum to be the culprit.

Our minimal testcase looks like this:

--- enumbug1.d ---
import enumbug2;
enum e { val }

--- enumbug2.d ---
import enumbug1;
const int i = e.val;

dmd -c enumbug1.d -> segmentation fault
dmd -c enumbug2.d -> ok


-- 



More information about the Digitalmars-d-bugs mailing list