# HG changeset patch # User thomask # Date 1121966519 0 # Node ID 0f5c200f5c90a458dd3fd13ea494853e50f56eb8 # Parent d676a0f37317302f6df43079a3d4a81a8a0280a1 Post Pforzheim catch up 3 diff -r d676a0f37317 -r 0f5c200f5c90 Makefile --- a/Makefile Mon Jul 18 22:57:06 2005 +0000 +++ b/Makefile Thu Jul 21 17:21:59 2005 +0000 @@ -99,7 +99,7 @@ complex_done := complex.done flag_pattern := __DSTRESS_DFLAGS__ -.PHONY: all version basic_tools compile nocompile run norun complex clean distclean clean_log +.PHONY:: all version basic_tools compile nocompile run norun complex clean distclean clean_log .SUFFIXES: $(ext_run) $(ext_norun) $(ext_nocompile) $(ext_compile) # @@ -321,7 +321,9 @@ # # remove targets and all temp objects # -clean : $(sort $(subst $(complex_todo),clean,$(complex_makefiles))) nocompile_clean compile_clean norun_clean run_clean +complex_clean : $(sort $(subst $(complex_todo),clean,$(complex_makefiles))) + +clean : complex_clean nocompile_clean compile_clean norun_clean run_clean $(RM) $(z_rm) $(OBJ_DIR)/?*.* $(RM) run.sh norun.sh compile.sh nocompile.sh diff -r d676a0f37317 -r 0f5c200f5c90 complex/command_line/complex.mak --- a/complex/command_line/complex.mak Mon Jul 18 22:57:06 2005 +0000 +++ b/complex/command_line/complex.mak Thu Jul 21 17:21:59 2005 +0000 @@ -20,7 +20,7 @@ # NOTE: almost all tests can be written using __DSTRESS_DFLAGS__ # -.PHONY: \ +.PHONY:: \ complex/command_line/warning \ complex/command_line/$(complex_done) \ complex/command_line/clean diff -r d676a0f37317 -r 0f5c200f5c90 complex/linking/complex.mak --- a/complex/linking/complex.mak Mon Jul 18 22:57:06 2005 +0000 +++ b/complex/linking/complex.mak Thu Jul 21 17:21:59 2005 +0000 @@ -20,7 +20,7 @@ # NOTE: almost all tests can be written using __DSTRESS_DFLAGS__ # -.PHONY: \ +.PHONY:: \ complex/linking/warning \ complex/linking/$(complex_done) \ complex/linking/clean \ diff -r d676a0f37317 -r 0f5c200f5c90 complex/typeinfo_init/a.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/complex/typeinfo_init/a.d Thu Jul 21 17:21:59 2005 +0000 @@ -0,0 +1,14 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Victor Nakoryakov +// @date@ 2005-07-06 +// @uri@ news:dah2lp$2igf$1@digitaldaemon.com + +module /*dstress.*/complex.typeinfo_init.a; + +class TemplateClass(T){ + void* p = cast(void*)typeid(T); +} + diff -r d676a0f37317 -r 0f5c200f5c90 complex/typeinfo_init/b.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/complex/typeinfo_init/b.d Thu Jul 21 17:21:59 2005 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Victor Nakoryakov +// @date@ 2005-07-06 +// @uri@ news:dah2lp$2igf$1@digitaldaemon.com + +module /*dstress.*/complex.typeinfo_init.b; +import /*dstress.*/complex.typeinfo_init.a; + +class A{ + int a; +} + +int main(){ + TemplateClass!(A) tc = new TemplateClass!(A)(); + return 0; +} + diff -r d676a0f37317 -r 0f5c200f5c90 complex/typeinfo_init/complex.mak --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/complex/typeinfo_init/complex.mak Thu Jul 21 17:21:59 2005 +0000 @@ -0,0 +1,68 @@ +# GnuMakefile for DStress http://dmd.kuehne.cn/dstress.html +# Copyright (C) 2004 Thomas Kuehne +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +# +# NOTE: almost all tests can be written using __DSTRESS_DFLAGS__ +# + +.PHONY:: \ + complex/typeinfo_init/warning \ + complex/typeinfo_init/$(complex_done) \ + complex/typeinfo_init/clean \ + complex/typeinfo_init/dest + +complex/typeinfo_init/warning : + @echo "don't invoke this file directly, instead use DStress' root Makefile with the target \"complex/typeinfo_init/complex.done\", \"complex\" or \"all\"" + +complex/typeinfo_init/dest = \ + complex/typeinfo_init/typeinfo_init_01 \ + complex/typeinfo_init/typeinfo_init_02 + +# the actual target, will be called by root's "all" / "complex" target +complex/typeinfo_init/$(complex_done) : $(complex/typeinfo_init/dest) + +# +# compile all 3 files in 1 step -> link, execute +# +complex/typeinfo_init/typeinfo_init_01 : complex/typeinfo_init/a.d complex/typeinfo_init/b.d + @$(RM) -f complex/typeinfo_init/a.o complex/typeinfo_init/b.o + $(eval z_name = $@) + $(eval z_return = $(shell $(return__) "$(DMD) $(DFLAGS) -od$(OBJ_DIR) -of$@ complex/typeinfo_init/a.d complex/typeinfo_init/b.d $(to_log)")) + $(analyse_run) + +# +# compile 2 files in 3 steps -> link, execute +# +complex/typeinfo_init/typeinfo_init_02 : complex/typeinfo_init/a.d complex/typeinfo_init/b.d + @$(RM) -f complex/typeinfo_init/a.o complex/typeinfo_init/b.o + $(eval z_name = $@_A) + $(eval z_return = $(shell $(return__) "$(DMD) $(DFLAGS) $(z_flags) -c -ofcomplex/typeinfo_init/a.o complex/typeinfo_init/a.d $(to_log)")) + $(analyse_compile) + + $(eval z_name = $@_B) + $(eval z_return = $(shell $(return__) "$(DMD) $(DFLAGS) $(z_flags) -c -ofcomplex/typeinfo_init/b.o complex/typeinfo_init/b.d $(to_log)")) + $(analyse_compile) + + $(eval z_name = $@) + $(eval z_return = $(shell $(return__) "$(DMD) $(DFLAGS) -of$@ complex/typeinfo_init/a.o complex/typeinfo_init/b.o $(to_log)")) + $(analyse_run) + +# this will be called by root's "clean" target +complex/typeinfo_init/clean : + $(RM) complex/typeinfo_init/*.done $(complex/typeinfo_init/dest) + diff -r d676a0f37317 -r 0f5c200f5c90 nocompile/o/opAssign_03_A.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/o/opAssign_03_A.d Thu Jul 21 17:21:59 2005 +0000 @@ -0,0 +1,16 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ zwang +// @date@ 2005-07-20 +// @uri@ news:dbks21$1l6j$1@digitaldaemon.com + +// __DSTRESS_ELINE__ 14 + +module dstress.nocompile.o.opAssign_03_A; + +void main(){ + .0=0; +} + diff -r d676a0f37317 -r 0f5c200f5c90 nocompile/o/opAssign_03_B.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/o/opAssign_03_B.d Thu Jul 21 17:21:59 2005 +0000 @@ -0,0 +1,16 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ zwang +// @date@ 2005-07-20 +// @uri@ news:dbks21$1l6j$1@digitaldaemon.com + +// __DSTRESS_ELINE__ 14 + +module dstress.nocompile.o.opAssign_03_B; + +void main(){ + 0=0; +} + diff -r d676a0f37317 -r 0f5c200f5c90 nocompile/s/synchronized_01_A.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/s/synchronized_01_A.d Thu Jul 21 17:21:59 2005 +0000 @@ -0,0 +1,18 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Regan Heath +// @date@ 2005-07-07 +// @uri@ news:opstiqe10r23k2f5@nrage.netwin.co.nz + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.s.synchronized_01_A; + +void main(){ + ubyte[] data; + + synchronized(data) { + } +} diff -r d676a0f37317 -r 0f5c200f5c90 norun/r/retrun_07_A.d --- a/norun/r/retrun_07_A.d Mon Jul 18 22:57:06 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ Vathix -// @date@ 2005-07-14 -// @uri@ news:op.stwu8jtdl2lsvj@esi - -// __DSTRESS_ELINE__ 14 - -module dstress.norun.r.return_07_A; - -int foo(){ -} - -int main(){ - foo(); - return 0; -} \ No newline at end of file diff -r d676a0f37317 -r 0f5c200f5c90 norun/r/retrun_07_B.d --- a/norun/r/retrun_07_B.d Mon Jul 18 22:57:06 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ Vathix -// @date@ 2005-07-14 -// @uri@ news:op.stwu8jtdl2lsvj@esi - -// __DSTRESS_DFLAGS__ -inline -// __DSTRESS_ELINE__ 15 - -module dstress.norun.r.return_07_B; - -int foo(){ -} - -int main(){ - foo(); - return 0; -} \ No newline at end of file diff -r d676a0f37317 -r 0f5c200f5c90 run/i/inline_13_A.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/i/inline_13_A.d Thu Jul 21 17:21:59 2005 +0000 @@ -0,0 +1,47 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Uwe Salomon +// @date@ 2005-07-13 +// @uri@ news:op.studsoj86yjbe6@sandmann.maerchenwald.net + +module dstress.run.i.inline_13_A; + +struct NodeType(Key, T){ + NodeType* next; + uint hash; + Key key; +} + +struct HashIterator(Key, T){ + NodeType!(Key, T)* m_ptr; + + static HashIterator fromPtr(NodeType!(Key, T)* ptr){ + return *(cast(HashIterator*) &ptr); + } + + int opEquals(HashIterator iter){ + return (m_ptr == iter.m_ptr); + } +} + +struct Hash(Key, T){ + alias HashIterator!(Key, T) Iterator; + + Iterator end(){ + return Iterator.fromPtr(null); + } + +} + +int main(){ + Hash!(uint, uint) hash; + hash.Iterator iter; + + if ((iter = hash.end()) == hash.end){ + return 0; + } + + assert(0); +} diff -r d676a0f37317 -r 0f5c200f5c90 run/i/inline_13_B.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/i/inline_13_B.d Thu Jul 21 17:21:59 2005 +0000 @@ -0,0 +1,49 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Uwe Salomon +// @date@ 2005-07-13 +// @uri@ news:op.studsoj86yjbe6@sandmann.maerchenwald.net + +// __DSTRESS_DFLAGS__ -inline + +module dstress.run.i.inline_13_B; + +struct NodeType(Key, T){ + NodeType* next; + uint hash; + Key key; +} + +struct HashIterator(Key, T){ + NodeType!(Key, T)* m_ptr; + + static HashIterator fromPtr(NodeType!(Key, T)* ptr){ + return *(cast(HashIterator*) &ptr); + } + + int opEquals(HashIterator iter){ + return (m_ptr == iter.m_ptr); + } +} + +struct Hash(Key, T){ + alias HashIterator!(Key, T) Iterator; + + Iterator end(){ + return Iterator.fromPtr(null); + } + +} + +int main(){ + Hash!(uint, uint) hash; + hash.Iterator iter; + + if ((iter = hash.end()) == hash.end){ + return 0; + } + + assert(0); +} diff -r d676a0f37317 -r 0f5c200f5c90 run/s/synchronized_01_B.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/s/synchronized_01_B.d Thu Jul 21 17:21:59 2005 +0000 @@ -0,0 +1,18 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Regan Heath +// @date@ 2005-07-07 +// @uri@ news:opstiqe10r23k2f5@nrage.netwin.co.nz + +module dstress.run.s.synchronized_01_B; + +int main(){ + Object data = new Object(); + + synchronized(data) { + } + + return 0; +}