Index: /sources/INSTALL
===================================================================
--- /sources/INSTALL	(revision 40)
+++ /sources/INSTALL	(revision 41)
@@ -2,6 +2,6 @@
 *************************
 
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
-Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007 Free Software Foundation, Inc.
 
 This file is free documentation; the Free Software Foundation gives
@@ -11,5 +11,8 @@
 ==================
 
-These are generic installation instructions.
+Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
 
    The `configure' shell script attempts to guess correct values for
@@ -24,7 +27,7 @@
    It can also use an optional file (typically called `config.cache'
 and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  (Caching is
+the results of its tests to speed up reconfiguring.  Caching is
 disabled by default to prevent problems with accidental use of stale
-cache files.)
+cache files.
 
    If you need to do unusual things to compile the package, please try
@@ -36,18 +39,15 @@
 
    The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
 
 The simplest way to compile this package is:
 
   1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.  If you're
-     using `csh' on an old version of System V, you might need to type
-     `sh ./configure' instead to prevent `csh' from trying to execute
-     `configure' itself.
-
-     Running `configure' takes awhile.  While running, it prints some
-     messages telling which features it is checking for.
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
 
   2. Type `make' to compile the package.
@@ -68,4 +68,7 @@
      with the distribution.
 
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
 Compilers and Options
 =====================
@@ -79,5 +82,5 @@
 is an example:
 
-     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
 
    *Note Defining Variables::, for more details.
@@ -88,15 +91,13 @@
 You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
-own directory.  To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+own directory.  To do this, you can use GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
 the `configure' script.  `configure' automatically checks for the
 source code in the directory that `configure' is in and in `..'.
 
-   If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory.  After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
 
 Installation Names
@@ -191,10 +192,10 @@
 
 causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).  Here is a another example:
-
-     /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
-configuration-related scripts to be executed by `/bin/bash'.
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
 
 `configure' Invocation
Index: /sources/configure.ac
===================================================================
--- /sources/configure.ac	(revision 40)
+++ /sources/configure.ac	(revision 41)
@@ -2,6 +2,6 @@
 # Process this file with autoconf to produce a configure script.
 
-AC_PREREQ(2.60)
-AC_INIT(SystemCASS, 1.0.0)
+AC_PREREQ(2.63)
+AC_INIT([SystemCASS],[1.0.0])
 AC_CANONICAL_TARGET
 
@@ -18,4 +18,11 @@
 AC_PROG_MAKE_SET
 AC_PROG_LIBTOOL
+
+AC_CHECK_PROG(has_latex, latex, yes)
+AC_CHECK_PROG(has_bibtex, bibtex, yes)
+AC_CHECK_PROG(has_fig2dev, fig2dev, yes)
+AC_CHECK_PROG(has_ps2pdf, ps2pdf, yes)
+AC_CHECK_PROG(has_dvips, dvips, yes)
+
 
 # User choices
@@ -39,5 +46,5 @@
 # Also set -DNDEBUG when not debugging, this disables assert()s
 AS_IF([test "x$do_debug"  = "xyes"], [CXXFLAGS="-g"         ],
-      [test "x$do_debug" != "xyes"], [CXXFLAGS="-O2 -NDEBUG"])
+      [test "x$do_debug" != "xyes"], [CXXFLAGS="-O2 -DNDEBUG"])
 
 case $target_os in
@@ -63,8 +70,5 @@
 # Checks for libraries.
 AS_IF([test "x$with_pat" != "xno"],
-	  saved_CFLAGS="$CFLAGS"
-	  saved_LIBS="$LIBS"
-	  LIBS="$LIBS -L$with_pat/lib"
-	  CFLAGS="$CFLAGS -I$with_pat/include"
+	  ALLIANCE_CFLAGS="-I$with_pat/include"
 	  [AC_CHECK_HEADER([pat.h],,
 		   [AC_MSG_ERROR([You asked for PAT trace format but no pat.h dnl
@@ -75,7 +79,4 @@
 can be found. Try --with-pat=/search/dir/]),
 		   [-lMut -lPpt -lPgn])]
-	  ALLIANCE_CFLAGS="$CFLAGS"
-	  CFLAGS="$saved_CFLAGS"
-	  LIBS="$saved_LIBS"
 	  AC_SUBST(ALLIANCE_PATH, $withval)
 	  AC_SUBST(ALLIANCE_CFLAGS)
@@ -91,9 +92,6 @@
 AM_CONDITIONAL(HAS_SOCLIB, test x$with_soclib != xno)
 
-AC_CHECK_PROG(has_latex, latex, yes)
-AC_CHECK_PROG(has_bibtex, bibtex, yes)
-AC_CHECK_PROG(has_fig2dev, fig2dev, yes)
-AC_CHECK_PROG(has_ps2pdf, ps2pdf, yes)
-AC_CHECK_PROG(has_dvips, dvips, yes)
+# OpenMP
+AC_OPENMP([C])
 
 AM_CONDITIONAL(BUILD_DOCS,
Index: /sources/src/Makefile.am
===================================================================
--- /sources/src/Makefile.am	(revision 40)
+++ /sources/src/Makefile.am	(revision 41)
@@ -38,9 +38,9 @@
 
 libsystemc_la_LIBADD = libgen_code.la $(ALLIANCE_LIBS)
-libsystemc_la_CXXFLAGS = @ALLIANCE_CFLAGS@ $(CXXFLAGS)
+libsystemc_la_CXXFLAGS = @ALLIANCE_CFLAGS@ @OPENMP_CFLAGS@ $(CXXFLAGS)
 
 noinst_LTLIBRARIES =  libgen_code.la
 libgen_code_la_SOURCES = gen_code.cc
-libgen_code_la_CXXFLAGS=-DGENERATED_MODULE_CFLAGS='"$(CXXFLAGS) -I$(prefix)/include"'
+libgen_code_la_CXXFLAGS=-DGENERATED_MODULE_CFLAGS='"$(CXXFLAGS) -I$(prefix)/include"' @OPENMP_CFLAGS@
 
 include_HEADERS = alias.h casc.h data_field.h fsm_rules.h global_functions.h internal_ext.h module_hierarchy_ext.h port_dependency_ext.h sc_bigint.h sc_biguint.h sc_bit.h sc_bv.h sc_clock_ext.h sc_event.h sc_fwd.h sc_int.h sc_interface.h sc_localvar.h sc_logic.h sc_lv.h sc_module_ext.h sc_module_name.h sc_nbdefs.h sc_numrep.h sc_object.h sc_pat_trace.h sc_port_ext.h sc_sensitive.h sc_signal.h sc_signed.h sc_string.h sc_time.h sc_trace_ext.h sc_uint.h sc_unit.h sc_unsigned.h sc_vcd_trace.h sc_ver_ext.h serialization_ext.h systemc systemc.h systemcass_version_ext.h
Index: /sources/src/gen_code.cc
===================================================================
--- /sources/src/gen_code.cc	(revision 40)
+++ /sources/src/gen_code.cc	(revision 41)
@@ -54,4 +54,8 @@
 #endif
 
+#ifdef _OPENMP
+#include <omp.h>
+#endif
+
 #ifdef CONFIG_CHECK_FSM_RULES
 #include "fsm_rules.h"
@@ -107,16 +111,16 @@
                    const method_process_t &m)
 {
-  SC_ENTRY_FUNC func	= m.func;
+  SC_ENTRY_FUNC func  = m.func;
   if (print_schedule)
     o << "    fprintf(stderr,\"evaluation de "
-	  	<< m.module->name() << "->" << m.name << "()\\n\");\n";
+      << m.module->name() << "->" << m.name << "()\\n\");\n";
   o << " p.integer = " << func << ";\n";
 #ifdef CPP_CALL
   o << " (((sc_module*)(" << m.module << "))->*(p.pmf)) (); /* " 
-		<< m.module->name () << "->" << m.name << "() */\n";
+    << m.module->name () << "->" << m.name << "() */\n";
 #else
   o << " p.pf((void *)" 
-	  << m.module << "); /* " 
-		<< m.module->name () << "->" << m.name << "() */\n";
+    << m.module << "); /* " 
+    << m.module->name () << "->" << m.name << "() */\n";
 #endif
 }
@@ -145,20 +149,20 @@
 void
 open_temp          (ofstream &o,
-		                char     *temp)
+                    char     *temp)
 {
 /*
-	srand (time (NULL));
-		int r = rand () % 1000;
+  srand (time (NULL));
+    int r = rand () % 1000;
 */
   pid_t pid = getpid();
   int r = -1;
-	do {
-		sprintf (temp, "%s/scheduling-%d-%x.cc", temporary_dir, pid, ++r);
+  do {
+    sprintf (temp, "%s/scheduling-%d-%x.cc", temporary_dir, pid, ++r);
   } while (is_exist (temp));
 
   o.open (temp,ios::out);
-	if (o.is_open () == false)
+  if (o.is_open () == false)
   {
-		cerr << "Error : Unable to open a file to write scheduling code.\n";
+    cerr << "Error : Unable to open a file to write scheduling code.\n";
     exit (30032005);
   }
@@ -176,15 +180,15 @@
                 method_process_list_t &transition_func_list)
 {
-	// transitions
+  // transitions
   o << "\ninline void transition(void)\n{\n";
   if (transition_func_list.empty () == false) {
     o << " /* fonctions de transition */\n"
-			<< " register fct p;\n";
-  	method_process_list_t::iterator mm;
+      << " register fct p;\n";
+    method_process_list_t::iterator mm;
     for( mm = transition_func_list.begin(); mm != transition_func_list.end(); ++mm)
     {
       PrintCall (o, **mm);
     }
-	}
+  }
   o << "}\n";
 }
@@ -195,10 +199,10 @@
            method_process_list_t &moore_func_list)
 {
-	// Moore generations (sequential functions)
+  // Moore generations (sequential functions)
   o << "\ninline void moore_generation (void)\n{\n";
-	if (moore_func_list.empty () == false) {
-		o << "  /* fonctions de generation de Moore */\n"
-		  << " register fct p;\n";
-  	method_process_list_t::reverse_iterator mm;
+  if (moore_func_list.empty () == false) {
+    o << "  /* fonctions de generation de Moore */\n"
+      << " register fct p;\n";
+    method_process_list_t::reverse_iterator mm;
     for( mm = moore_func_list.rbegin(); mm != moore_func_list.rend(); ++mm)
     {
@@ -214,10 +218,10 @@
            strong_component_list_t &strongcomponents)
 {
-	// Mealy generations (combinational functions only)
+  // Mealy generations (combinational functions only)
   o << "\nextern void mealy_generation (void)\n{\n";
-	if (strongcomponents.empty ())
+  if (strongcomponents.empty ())
     return NULL;
- 	o << "  register fct p;\n"
-	  << "\n\n  /* fonctions de mealy */\n";
+   o << "  register fct p;\n"
+    << "\n\n  /* fonctions de mealy */\n";
 #ifdef NO_STATIC_SCHEDULE
   o << "\n  do {\n    unstable = 0;\n";
@@ -227,5 +231,5 @@
     if ( (*ss)->size() == 1) {
       /* un seul element dans le strong component */
-			method_process_t *m = (method_process_t*)(*((*ss)->begin ()));
+      method_process_t *m = (method_process_t*)(*((*ss)->begin ()));
       PrintCall (o, *m);
       continue;
@@ -237,5 +241,5 @@
       component_list_t::reverse_iterator rev_mm;
       for( rev_mm = (*ss)->rbegin(); rev_mm != (*ss)->rend(); ++rev_mm) {
-				method_process_t *m = (method_process_t*) *rev_mm;
+        method_process_t *m = (method_process_t*) *rev_mm;
         PrintCall (o, *m);
       }
@@ -257,5 +261,5 @@
            ProcessDependencyList   &mealy_func_list)
 {
-	// Mealy generations (combinational functions only)
+  // Mealy generations (combinational functions only)
   o << "\nextern void mealy_generation (void)\n{\n";
   o << "  register fct p;\n"
@@ -301,7 +305,7 @@
     << pmf_type 
     << " integer; SC_ENTRY_FUNC pmf; CASC_ENTRY_FUNC pf; } fct;\n"; 
-	
-  gen_transition (o, transition_func_list);	
-  gen_moore      (o, moore_func_list);	
+  
+  gen_transition (o, transition_func_list);  
+  gen_moore      (o, moore_func_list);  
   gen_mealy      (o, strongcomponents);
 
@@ -310,7 +314,7 @@
  
   o.flush ();
-	o.close ();
-
-	// add "cc" extension
+  o.close ();
+
+  // add "cc" extension
   char file_name[PATH_MAX];
   strncpy(file_name, base_name, PATH_MAX);
@@ -337,10 +341,10 @@
     cerr << "Generating C code for scheduling...\n";
 
-	// open temporary file
-	ofstream o;
+  // open temporary file
+  ofstream o;
   char base_name[PATH_MAX];
-	open_temp (o, base_name);
+  open_temp (o, base_name);
  
-	if (! o.good ()) {
+  if (! o.good ()) {
     perror("scheduling: open file\n");
     exit(-1);
@@ -348,14 +352,14 @@
 
   o << "// generated by " << sc_version () << endl
-		<< "#include <casc.h>\n\n"
-		<< "#include <cstdio>\n\n"
-//		<< "#include <iostream>\n\n"
-		<< "namespace sc_core {\n"
+    << "#include <casc.h>\n\n"
+    << "#include <cstdio>\n\n"
+//    << "#include <iostream>\n\n"
+    << "namespace sc_core {\n"
     << " typedef void (sc_module::*SC_ENTRY_FUNC)();\n"
-		<< " typedef void (*CASC_ENTRY_FUNC)(void *);\n"
+    << " typedef void (*CASC_ENTRY_FUNC)(void *);\n"
     << " typedef union { unsigned long long int integer; SC_ENTRY_FUNC pmf; CASC_ENTRY_FUNC pf; } fct;\n"; 
-	
-  gen_transition (o, transition_func_list);	
-  gen_moore      (o, moore_func_list);	
+  
+  gen_transition (o, transition_func_list);  
+  gen_moore      (o, moore_func_list);  
   gen_mealy      (o, mealy_func_list);
 
@@ -364,7 +368,7 @@
  
   o.flush ();
-	o.close ();
-  
-	// add "cc" extension
+  o.close ();
+  
+  // add "cc" extension
   char file_name[PATH_MAX];
   strncpy(file_name, base_name, PATH_MAX);
@@ -395,20 +399,20 @@
   const char *systemc_dir = getenv ("SYSTEMCASS");
 //  const char *target_arch = getenv ("TARGET_ARCH");
-	const char *default_compiler =
+  const char *default_compiler =
 #ifdef CPP_CALL
-		"g++";
+    "g++";
 #else
-		"gcc";
+    "gcc";
 #endif
 
   compiler = (compiler == NULL)?default_compiler:compiler;
-	if (systemc_dir == NULL) {
+  if (systemc_dir == NULL) {
     systemc_dir = getenv ("SYSTEMC");
     if (systemc_dir == NULL) {
-  		cerr << "Error : set SYSTEMCASS or SYSTEMC environnement variable "
+      cerr << "Error : set SYSTEMCASS or SYSTEMC environnement variable "
               "to the SYSTEMCASS directory.\n";
-	  	exit (-1);
+      exit (-1);
     }
-	}
+  }
   //target_arch = (target_arch == NULL)?"":target_arch;
   
@@ -439,11 +443,11 @@
   const char *commandline_template =
 #if defined(CONFIG_OS_DARWIN)
-	  "(cd %s ;"                     " %s %s -DSCHEDULING_BY_CASC -I%s/include -fno-common -dynamic -o %s -c %s)"
+    "(cd %s ;"                     " %s %s -DSCHEDULING_BY_CASC -I%s/include -fno-common -dynamic -o %s -c %s)"
 #elif defined(CONFIG_OS_LINUX)
-	  "(cd %s ; libtool --mode=compile %s %s -DSCHEDULING_BY_CASC -I%s/include -shared -o %s -c %s)"
+    "(cd %s ; libtool --mode=compile %s %s -DSCHEDULING_BY_CASC -I%s/include -shared -o %s -c %s)"
 #else
-	  "(cd %s ;"                     " %s %s -DSCHEDULING_BY_CASC -I%s/include -dynamiclib -o %s -c %s)"
-#endif
-	  ;
+    "(cd %s ;"                     " %s %s -DSCHEDULING_BY_CASC -I%s/include -dynamiclib -o %s -c %s)"
+#endif
+    ;
 
   string cflags = casc_cflags;
@@ -452,11 +456,11 @@
 
   sprintf(compil_str, 
-		  commandline_template,
-		  temporary_dir,
-		  compiler, 
-		  cflags.c_str(), 
-		  systemc_dir, 
-		  target_name,
-		  source_name);
+      commandline_template,
+      temporary_dir,
+      compiler, 
+      cflags.c_str(), 
+      systemc_dir, 
+      target_name,
+      source_name);
 
   if (dump_stage) 
@@ -476,10 +480,10 @@
   sprintf (source_name, "%s.lo", base_name);
   sprintf(compil_str, "(cd %s ; pwd ; libtool --mode=link %s %s -module -shared -o %s %s -rpath /tmp)", /* -L. -L%s/lib-%s */ 
-	   temporary_dir, compiler, casc_cflags, /*systemc_dir, target_arch,*/ 
+     temporary_dir, compiler, casc_cflags, /*systemc_dir, target_arch,*/ 
      target_name, source_name);
 #else
   sprintf (source_name, "%s.o", base_name);
   sprintf(compil_str, "(cd %s ; pwd ; libtool -dynamic -o %s %s)", 
-	   temporary_dir, target_name, source_name);
+     temporary_dir, target_name, source_name);
 #endif
 
@@ -538,9 +542,9 @@
   pf.function = (fct*)   malloc (sizeof (fct)   * pf.func_number);
   pf.instance = (void**) malloc (sizeof (void*) * pf.func_number);
-	ProcessDependencyList::iterator it;
+  ProcessDependencyList::iterator it;
   int i;
-	for (i = 0, it = func_list.begin(); it != func_list.end(); ++it, ++i)
-	{
-		const method_process_t *mp = *it;
+  for (i = 0, it = func_list.begin(); it != func_list.end(); ++it, ++i)
+  {
+    const method_process_t *mp = *it;
     pf.function[i].pmf = (mp->func);
     pf.instance[i] = (void*)(mp->module);
@@ -580,4 +584,21 @@
 }
 
+void
+call_functions_in_parallel (function_call &fc)
+{
+  int n = fc.func_number;
+  int i;
+  #pragma omp parallel for
+  for (i = 0; i < n; ++i)
+  {
+#if 0 //defined(CONFIG_DEBUG)
+    sc_module *m = (sc_module*)(fc.instance[i]);
+    cerr << m->name () << endl;
+    cerr << "thread #" << omp_get_thread_num () << endl;
+#endif
+    fc.function[i].pf (fc.instance[i]);
+  }
+}
+
 void static_mealy_generation ()
 {
@@ -595,5 +616,5 @@
   casc_fsm_step = GEN_MOORE;
 #endif
-  call_functions (pf[1]); // moore generation
+  call_functions_in_parallel (pf[1]); // moore generation
 #ifdef CONFIG_CHECK_FSM_RULES
   casc_fsm_step = GEN_MEALY;
@@ -621,4 +642,5 @@
   (mod->*func) ();
 }
+
 void quasistatic_mealy_generation ()
 {
@@ -627,5 +649,5 @@
     if ( (*ss)->size() == 1) {
       /* un seul element dans le strong component */
-			method_process_t *m = (method_process_t*)(*((*ss)->begin ()));
+      method_process_t *m = (method_process_t*)(*((*ss)->begin ()));
       Call (*m);
       continue;
@@ -636,5 +658,5 @@
         component_list_t::reverse_iterator rev_mm;
         for( rev_mm = (*ss)->rbegin(); rev_mm != (*ss)->rend(); ++rev_mm) {
-		 	 	method_process_t *m = (method_process_t*) *rev_mm;
+          method_process_t *m = (method_process_t*) *rev_mm;
           Call (*m);
         }
Index: /sources/test_regression/24082009/Makefile
===================================================================
--- /sources/test_regression/24082009/Makefile	(revision 41)
+++ /sources/test_regression/24082009/Makefile	(revision 41)
@@ -0,0 +1,51 @@
+include ../env.mk
+
+EXE_SCASS = system_systemcass.x
+EXE_SC    = system_systemc.x
+EXE       = ${EXE_SCASS}
+OBJECTS   = $(EXE:.x=.o)
+LINKS     = $(OBJECTS:.o=.cpp)
+
+RESULTS   = perf
+
+.SECONDARY:
+
+main : $(EXE) 
+
+test : ${RESULTS}
+	@echo OK
+
+perf : system_systemcass.x
+	time (./system_systemcass.x --nobanner --p --nodynamiclink 1000000 )
+
+%_systemc.x : %_systemc.o $(SYSTEMC_LIB)
+	$(CXX) -o $@ $*_systemc.o $(LFLAGS_SYSTEMC) 2>&1 | $(CPPFILT)
+
+%_systemcass.x : %_systemcass.o  $(SYSTEMCASS_LIB)
+	$(CXX) -o $@ $*_systemcass.o $(LFLAGS_SYSTEMCASS) 2>&1 | $(CPPFILT)
+
+-include Makefile.deps
+
+%_systemc.cpp : %.cpp 
+	ln -s $*.cpp $*_systemc.cpp
+
+%_systemcass.cpp : %.cpp 
+	ln -s $*.cpp $*_systemcass.cpp
+
+%_systemc.o : %_systemc.cpp 
+	$(CXX) $(CFLAGS_SYSTEMC) -MM $*_systemc.cpp >> Makefile.deps
+	$(CXX) $(CFLAGS_SYSTEMC) -c $*_systemc.cpp -o $*_systemc.o
+
+%_systemcass.o : %_systemcass.cpp
+	$(CXX) $(CFLAGS_SYSTEMCASS) -MM $*_systemcass.cpp >> Makefile.deps
+	$(CXX) $(CFLAGS_SYSTEMCASS) -c $*_systemcass.cpp -o $*_systemcass.o
+
+clean :
+	rm -f Makefile.deps
+	-rm -f *.o gmon.out
+	-rm -f $(EXE) $(OBJECTS) 
+	-for i in $(LINKS) ; do unlink $$i ; done 2> /dev/null
+	-rm -f core*
+	-rm -rf generated_by_systemcass
+	-rm -rf tracesystem_systemcass.x.vcd tracesystem_systemc.x.vcd
+	-rm -rf ${RESULTS}
Index: /sources/test_regression/24082009/system.cpp
===================================================================
--- /sources/test_regression/24082009/system.cpp	(revision 41)
+++ /sources/test_regression/24082009/system.cpp	(revision 41)
@@ -0,0 +1,67 @@
+#include <systemc.h>
+#include <signal.h>
+
+using namespace std;
+  
+struct A : sc_module {
+  sc_in_clk                       clk;
+  sc_in     <int>                 i1;
+  sc_signal <int>                 r1;
+  sc_out    <int>                 o1;
+
+  void transition () {
+    int i;
+    for (i = 0; i < 1000; ++i)
+      ;
+    r1 = i1;
+  }
+  void gen_moore () {
+    int i;
+    for (i = 0; i < 1000; ++i)
+      ;
+    o1 = r1;
+  }
+
+  SC_CTOR (A) : clk ("clk"), o1("o1") {
+    SC_METHOD(transition);
+    sensitive << clk.pos();
+    SC_METHOD(gen_moore);
+    sensitive << clk.neg();
+  };
+};
+
+int sc_main (int argc, char *argv[])
+{
+  sc_clock                     signal_clk("my_clock",1, 0.5);
+  sc_signal<int>               s1("s1"),s2("s2"),s3("s3"),s4("s4");
+
+  A      a("a");
+  A      b("b");
+  
+  a.clk         (signal_clk);
+  b.clk         (signal_clk);
+  
+  a.i1          (s1);
+  a.o1          (s2);
+
+  b.i1          (s3);
+  b.o1          (s4);
+
+  // Init & run
+  sc_initialize ();
+
+  if (argc == 1)
+  {
+    cout << "Usage :\n" << argv[0] << " [#cycles]\n";
+    return EXIT_SUCCESS;
+  }
+
+  s1.write (1);
+
+  sc_start (atoi(argv[1]));
+
+  cout << s1.read() << endl;
+  cout << s2.read() << endl;
+
+  return EXIT_SUCCESS;
+}
Index: /sources/test_regression/env.mk
===================================================================
--- /sources/test_regression/env.mk	(revision 40)
+++ /sources/test_regression/env.mk	(revision 41)
@@ -33,8 +33,9 @@
 CFLAGS      = $(PROF) $(DEBUG) $(OPT) \
               -Wall \
+              -fopenmp \
               -UENABLE_TRACE -UENABLE_PAT -I. \
               ${ENDIANESS_FLAG}
 
-LFLAGS      = $(PROF) $(BFD_LIBERTY) -ldl
+LFLAGS      = $(PROF) $(BFD_LIBERTY) -ldl -fopenmp
 
 CFLAGS_SYSTEMC    = $(CFLAGS) \
