changeset 605:0f5c200f5c90

Post Pforzheim catch up 3
author thomask
date Thu, 21 Jul 2005 17:21:59 +0000
parents d676a0f37317
children 13382c0e879a
files Makefile complex/command_line/complex.mak complex/linking/complex.mak complex/typeinfo_init/a.d complex/typeinfo_init/b.d complex/typeinfo_init/complex.mak nocompile/o/opAssign_03_A.d nocompile/o/opAssign_03_B.d nocompile/s/synchronized_01_A.d norun/r/retrun_07_A.d norun/r/retrun_07_B.d run/i/inline_13_A.d run/i/inline_13_B.d run/s/synchronized_01_B.d
diffstat 14 files changed, 272 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- 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
 
--- 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
--- 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 \
--- /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 <nail-mail@mail.ru>
+// @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);
+}
+
--- /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 <nail-mail@mail.ru>
+// @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;
+}
+
--- /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)
+
--- /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 <nehzgnaw@gmail.com>
+// @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;
+}
+
--- /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 <nehzgnaw@gmail.com>
+// @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;
+}
+
--- /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 <regan@netwin.co.nz>
+// @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) {
+	}
+}
--- 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 <chris@dprogramming.com>
-// @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
--- 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 <chris@dprogramming.com>
-// @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
--- /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 <post@uwesalomon.de>
+// @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);
+}
--- /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 <post@uwesalomon.de>
+// @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);
+}
--- /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 <regan@netwin.co.nz>
+// @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;
+}