Index: src/tests/.expect/32/extension.txt
===================================================================
--- src/tests/.expect/32/extension.txt	(revision 950f7a72ccf248faed22f2bbd0d7542e24948798)
+++ src/tests/.expect/32/extension.txt	(revision 7527e6365628dd566e55f6dbeaca1521c6718837)
@@ -100,15 +100,2 @@
     ((void)((__extension__ __a__i_2 , __extension__ __b__i_2) , __extension__ __c__i_2));
 }
-__attribute__ ((constructor(),)) static void _init_extension(void){
-    int _global_init0;
-    ((void)((*((int *)(&__a__i_1)))=_global_init0) /* ?{} */);
-    int _global_init1;
-    ((void)((*((int *)(&__b__i_1)))=_global_init1) /* ?{} */);
-    int _global_init2;
-    ((void)((*((int *)(&__c__i_1)))=_global_init2) /* ?{} */);
-}
-__attribute__ ((destructor(),)) static void _destroy_extension(void){
-    ((void)((*((int *)(&__c__i_1)))) /* ^?{} */);
-    ((void)((*((int *)(&__b__i_1)))) /* ^?{} */);
-    ((void)((*((int *)(&__a__i_1)))) /* ^?{} */);
-}
Index: src/tests/.expect/32/gccExtensions.txt
===================================================================
--- src/tests/.expect/32/gccExtensions.txt	(revision 950f7a72ccf248faed22f2bbd0d7542e24948798)
+++ src/tests/.expect/32/gccExtensions.txt	(revision 7527e6365628dd566e55f6dbeaca1521c6718837)
@@ -5,8 +5,16 @@
 extern void exit(int __status);
 extern int printf(const char *__restrict __format, ...);
+extern int __x__i_1;
 int main(int __argc__i_1, const char **__argv__PPCc_1){
     asm ( "nop" :  :  :  );
     asm ( "nop" :  :  :  );
     asm ( "nop" :  :  :  );
+    static int __y__i_2;
+    int __src__i_2;
+    int __dst__i_2;
+    asm volatile ( "mov %1, %0\n\tadd $1, %0" :  :  :  );
+    asm volatile ( "mov %1, %0\n\tadd $1, %0" : "=r" ( __dst__i_2 ) :  :  );
+    asm volatile ( "mov %1, %0\n\tadd $1, %0" : "=r" ( __dst__i_2 ) : "r" ( __src__i_2 ) :  );
+    asm ( "mov %1, %0\n\tadd $1, %0" : "=r" ( __dst__i_2 ), "=r" ( __src__i_2 ) : [ __src__i_2 ] "r" ( __dst__i_2 ) : "r0" );
     double _Complex __c1__Xd_2;
     double _Complex __c2__Xd_2;
@@ -151,7 +159,7 @@
     struct s4 __y2__3ss4_2;
     ((void)___constructor__F_P3ss4_autogen___2(((struct s4 *)(&__y2__3ss4_2))));
-    int __m1__A0i_2[((long unsigned int )10)];
-    int __m2__A0A0i_2[((long unsigned int )10)][((long unsigned int )10)];
-    int __m3__A0A0i_2[((long unsigned int )10)][((long unsigned int )10)];
+    int __m1__A0i_2[((unsigned int )10)];
+    int __m2__A0A0i_2[((unsigned int )10)][((unsigned int )10)];
+    int __m3__A0A0i_2[((unsigned int )10)][((unsigned int )10)];
     int _retVal0 = { 0 };
     ((void)(_retVal0=0) /* ?{} */);
Index: src/tests/.expect/64/extension.txt
===================================================================
--- src/tests/.expect/64/extension.txt	(revision 950f7a72ccf248faed22f2bbd0d7542e24948798)
+++ src/tests/.expect/64/extension.txt	(revision 7527e6365628dd566e55f6dbeaca1521c6718837)
@@ -100,15 +100,2 @@
     ((void)((__extension__ __a__i_2 , __extension__ __b__i_2) , __extension__ __c__i_2));
 }
-__attribute__ ((constructor(),)) static void _init_extension(void){
-    int _global_init0;
-    ((void)((*((int *)(&__a__i_1)))=_global_init0) /* ?{} */);
-    int _global_init1;
-    ((void)((*((int *)(&__b__i_1)))=_global_init1) /* ?{} */);
-    int _global_init2;
-    ((void)((*((int *)(&__c__i_1)))=_global_init2) /* ?{} */);
-}
-__attribute__ ((destructor(),)) static void _destroy_extension(void){
-    ((void)((*((int *)(&__c__i_1)))) /* ^?{} */);
-    ((void)((*((int *)(&__b__i_1)))) /* ^?{} */);
-    ((void)((*((int *)(&__a__i_1)))) /* ^?{} */);
-}
Index: src/tests/.expect/64/gccExtensions.txt
===================================================================
--- src/tests/.expect/64/gccExtensions.txt	(revision 950f7a72ccf248faed22f2bbd0d7542e24948798)
+++ src/tests/.expect/64/gccExtensions.txt	(revision 7527e6365628dd566e55f6dbeaca1521c6718837)
@@ -5,8 +5,17 @@
 extern void exit(int __status);
 extern int printf(const char *__restrict __format, ...);
+extern int __x__i_1;
 int main(int __argc__i_1, const char **__argv__PPCc_1){
     asm ( "nop" :  :  :  );
     asm ( "nop" :  :  :  );
     asm ( "nop" :  :  :  );
+    static int __y__i_2;
+    int __src__i_2;
+    int __dst__i_2;
+    asm volatile ( "mov %1, %0\n\tadd $1, %0" :  :  :  );
+    asm volatile ( "mov %1, %0\n\tadd $1, %0" : "=r" ( __dst__i_2 ) :  :  );
+    asm volatile ( "mov %1, %0\n\tadd $1, %0" : "=r" ( __dst__i_2 ) : "r" ( __src__i_2 ) :  );
+    asm ( "mov %1, %0\n\tadd $1, %0" : "=r" ( __dst__i_2 ), "=r" ( __src__i_2 ) : [ __src__i_2 ] "r" ( __dst__i_2 ) : "r0" );
+    L2: L1: asm goto ( "frob %%r5, %1; jc %l[L1]; mov (%2), %%r5" :  : "r" ( __src__i_2 ), "r" ( (&__dst__i_2) ) : "r5", "memory" : L1, L2 );
     double _Complex __c1__Xd_2;
     double _Complex __c2__Xd_2;
Index: src/tests/.expect/libcfa_vector.txt
===================================================================
--- src/tests/.expect/libcfa_vector.txt	(revision 950f7a72ccf248faed22f2bbd0d7542e24948798)
+++ 	(revision )
@@ -1,5 +1,0 @@
-0
-1
-2
-3
-0
Index: src/tests/.expect/multiDimension.txt
===================================================================
--- src/tests/.expect/multiDimension.txt	(revision 7527e6365628dd566e55f6dbeaca1521c6718837)
+++ src/tests/.expect/multiDimension.txt	(revision 7527e6365628dd566e55f6dbeaca1521c6718837)
@@ -0,0 +1,304 @@
+constructing with 1
+constructing with 2
+constructing with 3
+constructing with 4
+constructing with 5
+constructing with 6
+constructing with 7
+constructing with 8
+constructing with 9
+constructing with 10
+constructing with 1
+constructing with 2
+constructing with 3
+constructing with 4
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+constructing with 1234567
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+constructing with 1
+constructing with 2
+constructing with 3
+constructing with 4
+constructing with 5
+constructing with 6
+constructing with 7
+constructing with 8
+constructing with 9
+constructing with 0
+constructing with 0
+constructing with 0
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+default constructing
+constructing with 999
+constructing with 1111
+default constructing
+default constructing
+constructing with 1
+constructing with 2
+constructing with 3
+constructing with 4
+default constructing
+default constructing
+default constructing
+default constructing
+constructing with 0
+default constructing
+default constructing
+default constructing
+constructing with 11
+constructing with 22
+constructing with 33
+constructing with 55
+constructing with 66
+default constructing
+constructing with 77
+default constructing
+default constructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
+destructing
Index: src/tests/Makefile.am
===================================================================
--- src/tests/Makefile.am	(revision 950f7a72ccf248faed22f2bbd0d7542e24948798)
+++ src/tests/Makefile.am	(revision 7527e6365628dd566e55f6dbeaca1521c6718837)
@@ -11,6 +11,6 @@
 ## Created On       : Sun May 31 09:08:15 2015
 ## Last Modified By : Peter A. Buhr
-## Last Modified On : Sat Jul  9 11:23:24 2016
-## Update Count     : 35
+## Last Modified On : Mon Aug 15 12:24:54 2016
+## Update Count     : 39
 ###############################################################################
 
@@ -27,14 +27,14 @@
 
 all-local :
-	+python test.py vector_test avl_test operators numericConstants expression enum asmName array typeof cast dtor-early-exit init_once
+	@+python test.py vector_test avl_test operators numericConstants expression enum array typeof cast dtor-early-exit init_once
 
 all-tests :
-	+python test.py --all
+	@+python test.py --all		# '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
 
 clean-local :
-	-rm -f ${EXTRA_PROGRAMS}
+	rm -f ${EXTRA_PROGRAMS}
 
 list :
-	+python test.py --list
+	@+python test.py --list
 
 constant0-1DP : constant0-1.c
Index: src/tests/Makefile.in
===================================================================
--- src/tests/Makefile.in	(revision 950f7a72ccf248faed22f2bbd0d7542e24948798)
+++ src/tests/Makefile.in	(revision 7527e6365628dd566e55f6dbeaca1521c6718837)
@@ -635,14 +635,14 @@
 
 all-local :
-	+python test.py vector_test avl_test operators numericConstants expression enum asmName array typeof cast dtor-early-exit init_once
+	@+python test.py vector_test avl_test operators numericConstants expression enum array typeof cast dtor-early-exit init_once
 
 all-tests :
-	+python test.py --all
+	@+python test.py --all		# '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
 
 clean-local :
-	-rm -f ${EXTRA_PROGRAMS}
+	rm -f ${EXTRA_PROGRAMS}
 
 list :
-	+python test.py --list
+	@+python test.py --list
 
 constant0-1DP : constant0-1.c
Index: src/tests/asmName.c
===================================================================
--- src/tests/asmName.c	(revision 950f7a72ccf248faed22f2bbd0d7542e24948798)
+++ 	(revision )
@@ -1,16 +1,0 @@
-//Testing assembly declaration
-extern int x asm( "xx" );
-
-int fred( int x ) {
-    static int y asm( "yy" );
-
-// Cforall extensions
-
-    static * int z asm( "zz" );
-}
-
-//Dummy main
-int main(int argc, char const *argv[])
-{
-	return 0;
-}
Index: src/tests/exception.c
===================================================================
--- src/tests/exception.c	(revision 950f7a72ccf248faed22f2bbd0d7542e24948798)
+++ src/tests/exception.c	(revision 7527e6365628dd566e55f6dbeaca1521c6718837)
@@ -11,5 +11,5 @@
 	x/4;
     } catch( int ) {
-    } catch( int x ) {
+    } catch( float x ) {
     } catch( struct { int i; } ) {
     } catch( struct { int i; } x ) {
@@ -21,5 +21,5 @@
     } catch( * struct { int i; } x ) {
     } catch( ... ) {
-//    } finally {
+    } finally {
     } // try
 }
Index: src/tests/gccExtensions.c
===================================================================
--- src/tests/gccExtensions.c	(revision 950f7a72ccf248faed22f2bbd0d7542e24948798)
+++ src/tests/gccExtensions.c	(revision 7527e6365628dd566e55f6dbeaca1521c6718837)
@@ -1,6 +1,54 @@
+// 
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+// 
+// gccExtensions.c -- 
+// 
+// Author           : Peter A. Buhr
+// Created On       : Sun Aug 14 17:28:17 2016
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon Aug 15 12:44:35 2016
+// Update Count     : 5
+// 
+
+extern int x asm( "xx" );
+
 int main(int argc, char const *argv[]) {
 	asm( "nop" );
 	__asm( "nop" );
 	__asm__( "nop" );
+
+	static int y asm( "yy" );
+//	static * int z asm( "zz" );							// CFA declaration
+
+	int src;
+	int dst;
+
+	asm volatile ( "mov %1, %0\n\t"
+				   "add $1, %0" : : : );
+
+	asm volatile ( "mov %1, %0\n\t"
+				   "add $1, %0"
+				   : "=" "r" (dst));
+
+	asm volatile ( "mov %1, %0\n\t"
+				   "add $1, %0"
+				   : "=r" (dst)
+				   : "r" (src));
+
+	asm ( "mov %1, %0\n\t"
+		  "add $1, %0"
+		  : "=r" (dst), "=r" (src)
+		  : [src] "r" (dst)
+		  : "r0");
+
+  L1: L2:
+	asm goto ( "frob %%r5, %1; jc %l[L1]; mov (%2), %%r5"
+			   : /* No outputs. */
+			   : "r"(src), "r"(&dst)
+			   : "r5", "memory"
+			   : L1, L2 );
 
 	__complex__ c1;
@@ -57,2 +105,7 @@
 	return 0;
 }
+
+// Local Variables: //
+// tab-width: 4 //
+// compile-command: "cfa gccExtensions.c" //
+// End: //
Index: src/tests/init_once.c
===================================================================
--- src/tests/init_once.c	(revision 950f7a72ccf248faed22f2bbd0d7542e24948798)
+++ src/tests/init_once.c	(revision 7527e6365628dd566e55f6dbeaca1521c6718837)
@@ -92,4 +92,8 @@
 init_once y = x;
 
+void static_variable() {
+	static init_once x;
+}
+
 int main() {
 	// local variables
@@ -179,4 +183,9 @@
 		}
 	}
+
+	// function-scoped static variable
+	for (int i = 0; i < 10; i++) {
+		static_variable();
+	}
 }
 
Index: src/tests/labelledExit.c
===================================================================
--- src/tests/labelledExit.c	(revision 950f7a72ccf248faed22f2bbd0d7542e24948798)
+++ src/tests/labelledExit.c	(revision 7527e6365628dd566e55f6dbeaca1521c6718837)
@@ -1,2 +1,17 @@
+// 
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+// 
+// labelledExit.c -- 
+// 
+// Author           : Peter A. Buhr
+// Created On       : Wed Aug 10 07:29:39 2016
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Wed Aug 10 07:30:15 2016
+// Update Count     : 1
+// 
+
 int foo() {
   	int i;
@@ -136,14 +151,12 @@
 	else
 		i += 1;
-
 }
 
-int main(int argc, char const *argv[]) {
+int main( int argc, char const *argv[] ) {
 	/* code */
-	return 0;
 }
 
 // Local Variables: //
 // tab-width: 4 //
-// compile-command: "cfa LabelledExit.c" //
+// compile-command: "cfa labelledExit.c" //
 // End: //
Index: src/tests/multiDimension.c
===================================================================
--- src/tests/multiDimension.c	(revision 7527e6365628dd566e55f6dbeaca1521c6718837)
+++ src/tests/multiDimension.c	(revision 7527e6365628dd566e55f6dbeaca1521c6718837)
@@ -0,0 +1,72 @@
+struct X {
+  int a;
+  int * ptr;
+};
+
+void ?{}(X * this) {
+  printf("default constructing\n");
+  (&this->a){ 123 };
+  this->ptr = malloc(sizeof(int));
+}
+
+void ?{}(X * this, X other) {
+  printf("copy constructing\n");
+  (&this->a){ other.a };
+  this->ptr = malloc(sizeof(int));
+}
+
+void ?{}(X * this, int a) {
+  printf("constructing with %d\n", a);
+  (&this->a){ a };
+  this->ptr = malloc(sizeof(int));
+}
+
+void ^?{}(X * this) {
+  printf("destructing\n");
+  free(this->ptr);
+}
+
+X ?=?(X * this, X other) {
+  this->a = other.a;
+  return *this;
+}
+
+X global[10][10] = {
+  { 1, { 2 }, { 3 }, { 4 }, 5, 6, 7, 8, 9, 10, 11, 12 },
+  { 1, 2, 3, 4 },
+  { { 1234567 } }
+};
+
+X global2[3][3][3] = {
+  {
+    { 1, 2, 3 },
+    { 4, 5, 6 },
+    { 7, 8, 9 },
+    { 10, 11, 12 }
+  },
+  {
+    { 0, 0, 0 }
+  }
+};
+
+int foo() {
+  static X abc[3][3] = {
+    { 11, 22, 33, 44 },
+    { 55, 66 },
+    { 77 },
+    { 88, 99, 1010 }
+  };
+}
+
+int main() {
+  X abc[4][4] = {
+    { 999, 1111 },
+    { 1, 2, 3, 4, 5 },
+    {},
+    { 0 },
+    { 88 }
+  };
+
+  foo();
+  foo();
+}
Index: src/tests/switch.c
===================================================================
--- src/tests/switch.c	(revision 950f7a72ccf248faed22f2bbd0d7542e24948798)
+++ src/tests/switch.c	(revision 7527e6365628dd566e55f6dbeaca1521c6718837)
@@ -10,6 +10,6 @@
 // Created On       : Tue Jul 12 06:50:22 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Jul 12 18:02:23 2016
-// Update Count     : 22
+// Last Modified On : Thu Aug  4 11:44:29 2016
+// Update Count     : 31
 // 
 
@@ -33,11 +33,19 @@
 	} // switch
 
-	// switch (3 ) {
-	// 	int j;
-	//   case 3:
-	// 	break;
-	//   case 4:
-	// 	j = 0;
-	// }
+	switch ( 3 ) {
+		int j;
+	  case 3:
+		break;
+	  case 4:
+		j = 0;
+	}
+
+	switch ( i ) {
+	  case 1, 2, 3:
+		switch ( i ) {
+		  case 2, 3, 4:
+			7;
+		}
+	}
 
 	switch ( i ) {
@@ -49,8 +57,8 @@
 	  default:
 		i = 3;
-	  case 3:
+	  case 19:
 	  case 'A' ... 'Z':
-	  case 5 ... 6:
-	  case 2, 4:
+	  case 1 ... 6:
+	  case 20, 30:
 		j = 3;
 		f( 3 );
@@ -78,8 +86,8 @@
 		struct S { int i; };
 		S s;
-	  case 3:
+	  case 19:
 	  case 'A' ... 'Z':
-	  case 5 ... 6:
-	  case 2, 4, 7:
+	  case 0 ... 6:
+	  case 20, 30, 40:
 		i = 3;
 		f( 3 );
Index: src/tests/test.py
===================================================================
--- src/tests/test.py	(revision 950f7a72ccf248faed22f2bbd0d7542e24948798)
+++ src/tests/test.py	(revision 7527e6365628dd566e55f6dbeaca1521c6718837)
@@ -23,8 +23,10 @@
 # parses the Makefile to find the machine type (32-bit / 64-bit)
 def getMachineType():
-	with open('Makefile') as file:
-		makefile = file.read()
-		m = re.search("CFA_FLAGS\s*=\s*-m(.*)", makefile)
-		return m.group(1) if m else '64'
+	sh('echo "int main() { return 0; }" > .dummy.c')
+	sh("make .dummy", print2stdout=False)
+	_, out = sh("file .dummy", print2stdout=False)
+	sh("rm -f .dummy.c > /dev/null 2>&1")
+	sh("rm -f .dummy > /dev/null 2>&1")
+	return re.search("ELF\s([0-9]+)-bit", out).group(1)
 
 # reads the directory ./.expect and indentifies the tests
@@ -97,9 +99,4 @@
 		return False
 
-# find the test data for a given test name
-def filterTests(testname) :
-	found = [test for test in allTests if test.name == testname]
-	return (found[0] if len(found) == 1 else Test(testname, testname) )
-
 ################################################################################
 #               running test functions
@@ -139,5 +136,5 @@
 		if not dry_run and fileContainsOnly(out_file, "make: *** No rule to make target `%s'.  Stop." % test.name) :
 			retcode = 1;
-			error = "\t\tNo make target for test %s!" % test
+			error = "\t\tNo make target for test %s!" % test.name
 			sh("rm %s" % out_file, False)
 
@@ -250,5 +247,10 @@
 	# already existing tests and create new info for the new tests
 	if options.regenerate_expected :
-		tests = map(filterTests, options.tests)
+		for testname in options.tests :
+			if testname.endswith(".c") or testname.endswith(".cc") or testname.endswith(".cpp") :
+				print('ERROR: "%s", tests are not allowed to end with a C/C++/CFA extension, ignoring it' % testname, file=sys.stderr)
+			else :
+				found = [test for test in allTests if test.name == testname]
+				tests.append( found[0] if len(found) == 1 else Test(testname, testname) )
 
 	else :
