🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by MARSHALL%CAD.CS.MAN.AC.UK Wed, 29 Nov 1989 06:33
Re: G++ 1.36.1 assigns overlapping storage....
#636
Author: MARSHALL%CAD.CS.MAN.AC.UK
Date: Wed, 29 Nov 1989 06:33
219 lines
6800 bytes
Date sent:  28-NOV-1989 14:36:22
>You win the prize!  There was one multiple-inheritance bug that was
>stopping some friends of mine at Boulder (Dirk, do you still watch
>this space?), but they couldn't narrow it down.  I think that you
>might have found the same one idenpendently.  So identified, it was
>very easy to fix:
>> diff specified

I applied the changes, however g++ now falls over (running under vms 5.2):

$ gpp/verb typeck_bug.cc
$ gcc_cpp -+ "-D__cplusplus" TYPECK_BUG.CC GCC_000021E6.CPP
$ Status=$status
$ gcc_cc1 -version GCC_000021E6.CPP -dumpbase TYPECK_BUG.CC  -opt -mgnu
 -mvaxc-alignment -o GCC_000021E6.S
GNU C++ version 1.36.1 (based on GCC 1.36) (vax vms) compiled by GNU C version
 1.36.
default target switches: -munix
 float RNG::asFloat ()
Failed assertion assoc != NULL_TREE at line 1262 of `cplus-typeck.c'.
%SYSTEM-F-OPCDEC, opcode reserved to DIGITAL fault at PC=000DCA02, PSL=03C00000
%TRACE-F-TRACEBACK, symbolic stack dump follows
module name     routine name                     line       rel PC    abs PC

                                                           000DCA02  000DCA02
CPLUS-TYPECK    require_complete_type                      00001866  00067990
CPLUS-CLASS     build_vfn_ref                     264      00000161  00075957
CPLUS-CLASS     build_vtable                     4640      00005227  0007ABC9
CPLUS-TYPECK    default_conversion                         00000DDB  00067FAD
CPLUS-TAB       yyparse                          1246      00001909  000576B5
TOPLEV          compile_file                               0000073F  0001420F
TOPLEV          main                                       0000060A  000157CA
$  EXIT $STATUS

------------------------------------------------------------------------------
Output of preprocessor follows:
------------------------------------------------------------------------------
# 1 "typeck_bug.cc"
# 1 "GNU_GXX_INCLUDE:[000000]assert.h" 1
extern "C" void __eprintf (char*, int, char*);
extern "C" volatile void   abort();
# 5 "typeck_bug.cc" 2
# 1 "GNU_GXX_INCLUDE:[000000]ACG.h" 1
# 1 "GNU_GXX_INCLUDE:[000000]RNG.h" 1
#pragma once
#pragma once
# 1 "GNU_GXX_INCLUDE:[000000]assert.h" 1
extern "C" void __eprintf (char*, int, char*);
extern "C" volatile void   abort();
# 28 "GNU_GXX_INCLUDE:[000000]RNG.h" 2
# 1 "GNU_GXX_INCLUDE:[000000]math.h" 1
#pragma once
# 57 "GNU_GXX_INCLUDE:[000000]math.h"

extern "C" $

double  acos(double);
double  acosh(double);
double  asin(double);
double  asinh(double);
double  atan(double);
double  atan2(double, double);
double  atanh(double);
double  cbrt(double);
double  ceil(double);
double  copysign(double,double);
double  cos(double);
double  cosh(double);
double  drem(double,double);
double  erf(double);
double  erfc(double);
double  exp(double);
double  expm1(double);
double  fabs(double);
double  finite(double);
double  floor(double);
double  frexp(double, int*);
double  gamma(double);
double  hypot(double,double);
double  infnan(int);
int     isinf(double);
int     isnan(double);
double  j0(double);
double  j1(double);
double  jn(int, double);
double  ldexp(double, int);
double  lgamma(double);
double  log(double);
double  log10(double);
double  log1p(double);
double  logb(double);
double  modf(double, double*);
double  pow(double, double);
double  rint(double);
double  scalb(double, int);
double  sin(double);
double  sinh(double);
double  sqrt(double);
double  tan(double);
double  tanh(double);
double  y0(double);
double  y1(double);
double  yn(int, double);


struct libm_exception
$
  int type;
  char* name;
  double arg1, arg2, retval;
;
extern "C" int matherr(libm_exception*);
# 1 "GNU_GXX_INCLUDE:[000000]values.h" 1
#pragma once
# 140 "GNU_GXX_INCLUDE:[000000]values.h"
# 134 "GNU_GXX_INCLUDE:[000000]math.h" 2
# 29 "GNU_GXX_INCLUDE:[000000]RNG.h" 2


union PrivateRNGSingleType $
    float s;
    unsigned long u;
;

union PrivateRNGDoubleType $
    double d;
    unsigned long u[2];
;




class RNG $
    static PrivateRNGSingleType singleMantissa;
    static PrivateRNGDoubleType doubleMantissa;
public:
    RNG();



    virtual unsigned long asLong() = 0;
    virtual void reset() = 0;



    float asFloat();
    double asDouble();
;



inline float RNG::asFloat()
$
    PrivateRNGSingleType result;
    result.s = 1.0;
    result.u |= (asLong() & singleMantissa.u);
    result.s -= 1.0;
    (( result.s < 1.0 && result.s >= 0) ? 1 : (__eprintf("Failed assertion "
 "result.s < 1.0 && result.s >= 0" " at line %d of `%s'.\n", 69,
 "GNU_GXX_INCLUDE:[000000]RNG.h"), abort (), 0)) ;
    return( result.s );


inline double RNG::asDouble()
$
    PrivateRNGDoubleType result;
    result.d = 1.0;
    result.u[0] |= (asLong() & doubleMantissa.u[0]);
    result.u[1] |= (asLong() & doubleMantissa.u[1]);
    result.d -= 1.0;
    (( result.d < 1.0 && result.d >= 0) ? 1 : (__eprintf("Failed assertion "
 "result.d < 1.0 && result.d >= 0" " at line %d of `%s'.\n", 80,
 "GNU_GXX_INCLUDE:[000000]RNG.h"), abort (), 0)) ;
    return( result.d );


# 26 "GNU_GXX_INCLUDE:[000000]ACG.h" 2


#pragma once
class ACG : public RNG $

    unsigned long initialSeed;
    int initialTableEntry;

    unsigned long *state;
    unsigned long *auxState;
    short stateSize;
    short auxSize;
    unsigned long lcgRecurr;
    short j;
    short k;

protected:

public:
    ACG(unsigned long seed = 0, int size = 55);
    virtual ^ACG();



    virtual unsigned long asLong();
    virtual void reset();
;


# 6 "typeck_bug.cc" 2


------------------------------------------------------------------------------
The version built on the old version of cplus-typeck.c did not crash
I used the vax/vms versions of tm.h and md
---------------------------------------------------------------------------
                 Robert A.J.Marshall,
Room 2.02, IT Building, Department of Computer Science,
University of Manchester, Oxford Road, Manchester, M13 9PL, U.K.
Tel: (+44) 61-275-6163         		Internal: 6163
JANET: rmarshall@uk.ac.man.cs		EARN: rmarshall@cs.man.ac.uk
---------------------------------------------------------------------------
G++ 1.36.1 assigns overlapping storage....
#637
Author: Michael Tiemann
Date: Wed, 29 Nov 1989 06:29
27 lines
1704 bytes
    Date:     28-NOV-1989 14:46:18 GMT 1:00
    From: MARSHALL%CAD.CS.MAN.AC.UK@mitvma.mit.edu
    To: bug-g++@prep.ai.mit.edu
    Subject:  Re: G++ 1.36.1 assigns overlapping storage....
    Sender: JANET "MARSHALL@UK.AC.MAN.CS.CAD" <MARSHALL%CAD.CS.MAN.AC.UK@mitvma.mit.edu>
    Mailer:   Janet_Mailshr V3.3a (02-Feb-1989)

    Date sent:  28-NOV-1989 14:36:22
    >You win the prize!  There was one multiple-inheritance bug that was
    >stopping some friends of mine at Boulder (Dirk, do you still watch
    >this space?), but they couldn't narrow it down.  I think that you
    >might have found the same one idenpendently.  So identified, it was
    >very easy to fix:
    >> diff specified

    I applied the changes, however g++ now falls over (running under vms 5.2):

I sent out a replacement for that patch about 1 hour later.  The bug
was calling `value_member' instead of `assoc_value' in the first
clause of the change.  If you don't get that chaser, let me know.

BTW, 1.36.2 just compiled InterViews, ET++, and libg++ today.  I will
probably release it tomorrow.  It is mostly a smoothed out 1.36.1 with
a few small, but important bugfixes.

Michael
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads