www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 713] New: circular const definitions with module operator "." cause the compiler to segfault

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=713

           Summary: circular const definitions with module operator "."
                    cause the compiler to segfault
           Product: D
           Version: 0.177
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: thomas-dloop kuehne.cn


(Originally posted by Wang Zhen <nehzgnaw gmail.com> on 2006-02-17
as news:dt4ahd$2ikp$2 digitaldaemon.com)

segfaults:
#
# const int a = .b;
# const int b = a;
#

#
# const int a = b;
# const int b = .a;
#

doesn't segfault:
#
# const int a = .b;
# const int b = .a;
#

#
# const int a = b;
# const int b = a;
#

test cases:
http://dstress.kuehne.cn/nocompile/c/const_32_A.d
http://dstress.kuehne.cn/nocompile/c/const_32_B.d
http://dstress.kuehne.cn/nocompile/c/const_32_C.d
http://dstress.kuehne.cn/nocompile/c/const_32_D.d


-- 
Dec 22 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=713





------- Comment #1 from clugdbug yahoo.com.au  2009-04-02 15:03 -------
On D1, this now generates a "Stack overflow".
On D2, the equivalent code:

enum int a = .b;
enum int b = a;

hangs.


-- 
Apr 02 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=713


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |FIXED




--- Comment #2 from Don <clugdbug yahoo.com.au>  2009-05-14 04:56:00 PDT ---
Fixed DMD2.030 and 1.045

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 14 2009