[Issue 3053] cross imports produce repeated calls to a call destructor

2014-11-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3053

Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #3 from Walter Bright  ---
Since this works on 2.050 and fails on 2.039, I presume it is fixed.

--


[Issue 3053] cross imports produce repeated calls to a call destructor

2010-12-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3053



--- Comment #2 from brauning...@gmail.com 2010-12-21 18:19:38 PST ---
(In reply to comment #1)
> Cannot reproduce on Windows. Tried several compiler versions, including 2.030
> and 2.050.
> Compiled with noflags, and with -O, -unittest. Tried compiling obj files
> seperately. Tried all 6 combinations of ordering on the command line.
> In every case, there was only one destructor call.
> 
> Can someone reproduce this on Linux?

THIS IS A SESSION SHOWING THE BUG in linux. 
The 2.050 doesn't emit bug but 2.039. I hope this is util
--

solved> cd t
t> ls
expresion.d  makefile  newdawk.d  programa.d
t> dmd | head -1
Digital Mars D Compiler v2.050
t> make
dmd  -ofnewdawk *.d
t> newdawk 
dtor
t> cd ../t_on_dmd2.039/
t_on_dmd2.039> make
~/comp/D/dmd2.039/linux/bin/dmd  -ofnewdawk *.d
deferring sigaction_t
t_on_dmd2.039> newdawk 
dtor
dtor
dtor
dtor
dtor
dtor
t_on_dmd2.039> ls
expresion.d  makefile  newdawk  newdawk.d  newdawk.o  programa.d
t_on_dmd2.039> cat newdawk.d 
import programa;

void main()
{
auto prog = new Programa(); 
}
t_on_dmd2.039> cat programa.d 
import std.stdio;
import expresion;

class Programa 
{
Function fun;

   ~this()
{
writefln("dtor");
}
}
t_on_dmd2.039> cat expresion.d 
import programa;

struct Function
{
}
t_on_dmd2.039> 





t_on_dmd2.039> make clean
rm newdawk *.o ; true
t_on_dmd2.039> grep ARGS= makefile 
DARGS=
t_on_dmd2.039> vi makefile 
skipping 15 old session files
reading makefile

wrote makefile, 11 lines, 139 chars
t_on_dmd2.039> grep ARGS= makefile 
DARGS=-unittest
t_on_dmd2.039> make
~/comp/D/dmd2.039/linux/bin/dmd -unittest -ofnewdawk *.d
deferring sigaction_t
t_on_dmd2.039> newdawk 
dtor
dtor
dtor
dtor
dtor
dtor
dtor
dtor
dtor
dtor
dtor
dtor
dtor
dtor
t_on_dmd2.039> 



t_on_dmd2.039> cat /etc/slackware-version 
Slackware 13.1.0
t_on_dmd2.039> gcc --version
gcc (GCC) 4.4.4
Copyright (C) 2010 Free Software Foundation, Inc.
Esto es software libre; vea el código para las condiciones de copia.  NO hay
garantía; ni siquiera para MERCANTIBILIDAD o IDONEIDAD PARA UN PROPÓSITO EN
PARTICULAR

t_on_dmd2.039> ld --version
GNU ld (Linux/GNU Binutils) 2.20.51.0.8.20100412
Copyright 2010 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
t_on_dmd2.039> uname -a
Linux slackweiller 2.6.33.4-MEMOPRESARIO #14 SMP Mon Nov 15 01:13:57 AKST 2010
i686 AMD Sempron(tm) SI-42 AuthenticAMD GNU/Linux

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


[Issue 3053] cross imports produce repeated calls to a call destructor

2010-12-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3053



--- Comment #1 from Don  2010-12-16 16:28:09 PST ---
Cannot reproduce on Windows. Tried several compiler versions, including 2.030
and 2.050.
Compiled with noflags, and with -O, -unittest. Tried compiling obj files
seperately. Tried all 6 combinations of ordering on the command line.
In every case, there was only one destructor call.

Can someone reproduce this on Linux?

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