www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19655] New: DMD generates wrong code for some circular


          Issue ID: 19655
           Summary: DMD generates wrong code for some circular
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: puneet coverify.org

Created attachment 1729
  --> https://issues.dlang.org/attachment.cgi?id=1729&action=edit
Tar gzipped test case

Code attached. To reproduce the bug, untar and "make run" on a linux box. Note
that wrong code is generated only when files/modules are compiled separately
and then linked into an executable. That is how the included makefile compiles.

More on this thread on Dlang Forum -->
https://forum.dlang.org/thread/oqdzzgcyuvberlzurvrq forum.dlang.org

When the exeuctable is run, I get:

core.exception.AssertError grault.d(6): func1 was never called
??:? [0x4148b0]
??:? [0x4190ca]
??:? [0x4063ed]
??:? [0x402aa9]
??:? [0x4023c3]
??:? [0x402367]
??:? [0x40229f]
??:? [0x40608f]
??:? [0x405f87]
??:? [0x402324]
??:? __libc_start_main [0x7f96e3d2d82f]
??:? [0x402188]
makefile:12: recipe for target 'run' failed
make: *** [run] Error 1

Feb 06