Path: utzoo!telly!ddsw1!mcdchg!rutgers!mailrus!tut.cis.ohio-state.edu!GATECH.EDU!gt-eedsp!baud From: gt-eedsp!baud@GATECH.EDU (Kurt Baudendistel) Newsgroups: gnu.g++.bug Subject: bug report 15: improper code generation Message-ID: <8810112056.AA25449@gatech.edu> Date: 11 Oct 88 20:47:36 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 62 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 #include 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 ----------------------------------------------------------------------------