🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Kurt Baudendistel Tue, 11 Oct 1988 20:47
bug report 15: improper code generation
#1493
Author: Kurt Baudendistel
Date: Tue, 11 Oct 1988 20:47
62 lines
2302 bytes
BUG REPORT 15

BEHAVIOR:

incorrect code generation on unsigned mixed length integer operations.

the following is output when the given program is run:

65536 = 0

COMPILER VERSION: GNU C++ compiler driver, version 1.25.0

INPUT FILES:

bug.cc
type.h

COMMAND LINE: g++ -v -g bug.cc 

 /usr/local/lib/gcc-cpp+ -v -I . -I ./include -I /dsp/mcclellan/baud/c++/include -I /usr/local/lib/g++-include -undef -D__GNU__ -D__GNUG__ -Dvax -Dunix bug.cc /tmp/cc027681.cpp
GNU CPP version 1.25.0
 /usr/local/lib/gcc-c++ /tmp/cc027681.cpp -quiet -dumpbase bug.cc -noreg -version -G -o /tmp/cc027681.s
 as /tmp/cc027681.s -o bug.o
 /usr/local/lib/gcc-ld++ -C /usr/lib/crt0+.o bug.o /dsp/mcclellan/baud/c++/lib/Complex.a /dsp/mcclellan/baud/c++/lib/Fft.a /dsp/mcclellan/baud/c++/lib/Filter.a /dsp/mcclellan/baud/c++/lib/Fix.a /dsp/mcclellan/baud/c++/lib/Lev.a /dsp/mcclellan/baud/c++/lib/Vec.a /dsp/mcclellan/baud/c++/lib/fixv.a /dsp/mcclellan/baud/c++/lib/nr.a /dsp/mcclellan/baud/c++/lib/usage.a /dsp/mcclellan/baud/c++/lib/z_error.a /usr/local/lib/libg++.a /usr/lib/libm.a -lg++ /usr/local/lib/gcc-gnulib+ -lg -lc

FILE NAMES:

tm.h = tm-vax.h
md = vax.md

MACHINE: vax 11/780 with BRL UNIX (4.2 BSD)

SOURCE FILES:
----------------------------------------------------------------------------
// bug.cc
#include <stream.h>
#include <type.h>
main() {
  uint16 x = 0;
  uint32 c = 1;
  uint32 a = ~x + c;
  cout << "65536 = " << a << "\n";
}
----------------------------------------------------------------------------
//
// type.h : machine type definitions
//

#ifndef TYPEH
#define TYPEH

typedef short int int16;
typedef long int int32;
typedef unsigned short int uint16;
typedef unsigned long int uint32;

typedef unsigned int uint;

typedef unsigned char byte;

#endif
----------------------------------------------------------------------------
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