bug in egcs-g++-1.0.2-12

Reuben Pasquini pasquini@cs.purdue.edu
Fri Apr 16 13:52:00 GMT 1999


Hello,

I've come across a bug in egcs-g++-1.0.2-12 on my
RedHat 5.1 Linux system.  The problem results when
I try to instantiate an object of a class that
overides the new operator and is a subtype of two classes 
(multiple inheritance) that also both overide new.


I get the following error:

pasquini@joanne 9 tests/PCS/bin % make LP_thread.o
g++ -g -gstabs+ `guile-config compile` -fPIC -D_REENTRANT  
-I/home/pasquini/research/parasol/kernel/src
-I/home/pasquini/research/parasol/kernel/src/base
-I/home/pasquini/research/parasol/kernel/src/calendar
-I/home/pasquini/research/parasol/kernel/src/communication
-I/home/pasquini/research/parasol/kernel/src/driver
-I/home/pasquini/research/parasol/kernel/src/messages
-I/home/pasquini/research/parasol/kernel/src/runtime_stats
-I/home/pasquini/research/parasol/kernel/src/state
-I/home/pasquini/research/parasol/kernel/src/threads
-I/home/pasquini/research/parasol/kernel/src/virtual_time 
-I/home/pasquini/research/parasol/kernel/include
-I/home/pasquini/research/parasol/domains/common/include
-I/home/pasquini/research/parasol/domains/common/src -I../src
-I/usr/local/include/gc -I/usr/local/include  -c -o LP_thread.o
../src/LP_thread.cpp
../src/LP_thread.cpp: In method `void LP_thread::run()':
../src/LP_thread.cpp:62: Internal compiler error.
../src/LP_thread.cpp:62: Please submit a full bug report to
`egcs-bugs@cygnus.com'.


Line 62 is:
     op_mesh = new (MapNoGC) PCS_mesh ( i_mesh_dimension, op_rng );

I've attatched the code for LP_thread.cpp, PCS_mesh.hxx,
and PCS_mesh's two supertypes - Batch and State.
The Solaris CC compiler is able to handle this code,
so I assume it's correct.

Thanks for your work on egcs, and good luck.
Reuben

-- 
-------------------------------------------------------------------------
Reuben Pasquini                     pasquini@cs.purdue.edu
Department of Computer Science      www.cs.purdue.edu/people/pasquini
Purdue University                   Fax: 1-765-494-0739
West Lafayette, IN 47907-1398       Office: 765-494-0361
-------------------------------------------------------------------------
/**
 * LP_thread.cpp: LP_thread for the PCS simulation 
 *
 * @author Reuben Pasquini
 * @log 
 *      04/14/1999 - created from torus/LP_thread
 */

#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>     // for getenv
#include <unistd.h>
#include <stdio.h>

#include "LP_thread.hxx"
#include "PCS_mesh.hxx"
#include "PCS_cell.hxx"
#include "Debug.hxx"
#include "Work_thread.hxx"
#include "Random.hxx"

extern "C" {
#include <libguile.h>
#include <guile/gh.h>
};

extern Kernel * gp_kernel;

/**
 * LP_thread::LP_thread (): constructor does nothing since the
 *       ParaSol kernel hasn't been initialized yet. 
 *       Initialization at the beginning of ::run ()
 *
 * @log  
 *     04/14/1999 - created
 */
LP_thread::LP_thread () {
  op_rng = 0;
  op_mesh = 0;
}


/**
 * LP_thread::run: this is the work routine which actually creates 
 *      the global objects and launches the initial threads
 *
 * @log 
 *     09/05/1997 - created
 */
void 
LP_thread::run () {
  {
    char  s_dirname[ 80 ];
    sprintf ( s_dirname, "/homes/pasquini/tmp/core%d", gp_kernel->ProcId () );
    chdir ( s_dirname );
  }

  int i_mesh_dimension = (int)( gh_scm2long(gh_eval_str ( "mesh_dimension" )) );
  assert ( i_mesh_dimension > 1 );
  gp_kernel->debug ( DEB_APP, 0.0 ) << "Allocating rng & mesh" << endl;
  op_rng = new (MapNoGC) Random ();
  op_mesh = new (MapNoGC) PCS_mesh ( i_mesh_dimension, op_rng );

  // Now let's create some threads that just make work
  for ( Iterator* p_iterator = op_mesh->iterator ();
	p_iterator->hasNext (); ) {
    PCS_cell* p_cell = (PCS_cell*)( p_iterator->next () );
    if ( p_cell->ProcId () == gp_kernel->ProcId () ) { // it's a local cell
      Thread* p_workmaster = new (GC) Work_thread ( op_rng, p_cell, op_mesh );
      p_workmaster->bootstrap ();
    }
  }
  hold_till_end ();
  gp_kernel->debug ( DEB_APP, gp_kernel->Time () ) 
  << "Master thread running for last time!" << endl;
}


More information about the Gcc-bugs mailing list