[Issue 719] New: compiler segment faults if struct template is insanciated from another module

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 22 05:26:13 PST 2006


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

           Summary: compiler segment faults if struct template is
                    insanciated from another module
           Product: D
           Version: 0.177
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: thomas-dloop at kuehne.cn


(Originally posted by Burton Radons <burton-radons at smocky.com> on 2005-05-10
as news:d5s3cd$7tn$1 at digitaldaemon.com)

#
# struct TC(T){
#    void method(){
#       void inline_function(){
#       }
#    }
# }
#
# template TB(T){
#    alias TC!(T) tc_instance;
# }
#
# struct TA(T){
#    mixin TB!(T);
# }
#

#
# void main(){
#    TA!(int) variable;
# }
#

If main is in the same module as TA it compiles, otherwise the compiler
segfaults.

test cases:
http://dstress.kuehne.cn/compile/b/bug_20050510_A1.d
http://dstress.kuehne.cn/run/b/bug_20050510_A2.d

http://dstress.kuehne.cn/compile/b/bug_20050510_B1.d
http://dstress.kuehne.cn/run/b/bug_20050510_B2.d

http://dstress.kuehne.cn/compile/b/bug_20050510_C1.d
http://dstress.kuehne.cn/run/b/bug_20050510_C2.d

http://dstress.kuehne.cn/compile/b/bug_20050510_D1.d


-- 



More information about the Digitalmars-d-bugs mailing list