Article View: gnu.g++.bug
Article #1020g++2.2.2 generates incorrect RS6000 assembly code
From: Gnanasekaran Swaminathan
Date: Sun, 04 Oct 1992 12:00
Date: Sun, 04 Oct 1992 12:00
36 lines
1635 bytes
1635 bytes
g++ 2.2.2 generates incorrect RS6000 assembly code for
the following program. The error goes away if one
of the following are true:
1: if the file name has only one '.' instead of two as in A.B.cc
2: if there are no #pragma's
-Sekar
cd /tmp/z/
c++ -g -c A.B.cc -I. -v
Reading specs from /tmp/z/lib/gcc-lib/rs6000/2.2.2/specs
gcc version 2.2.2
/tmp/z/lib/gcc-lib/rs6000/2.2.2/cpp -lang-c++ -v -I. -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D_IBMR2 -D_AIX -D___IBMR2__ -D___AIX__ -D___IBMR2 -D___AIX -D__CHAR_UNSIGNED__ -g A.B.cc /tmp/ccfesD0V.i
GNU CPP version 2.2.2
/tmp/z/lib/gcc-lib/rs6000/2.2.2/cc1plus /tmp/ccfesD0V.i -quiet -dumpbase A.B.cc -g -version -o /tmp/ccfesD0V.s
GNU C++ version 2.2.2 compiled by GNU C version 2.2.2.
as -o A.B.o /tmp/ccfesD0V.s
Assembler:
/tmp/ccfesD0V.s: line 12: Error In Syntax
/tmp/z/bin/gcc: A.B.o: No such file or directory
Compilation exited abnormally with code 1 at Sun Oct 4 16:51:05
// file A.B.cc
#pragma implementation
#pragma interface
extern void (*fp)(const char*, const char*);
struct A
{
void f(const char* msg);
};
void A::f(const char* msg)
{
(*fp)("test", msg);
}
Technical Details
Message-ID:
<9210042100.AA66891@kelvin.seas.Virginia.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!kelvin.seas.virginia.edu!gs4tShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!kelvin.seas.virginia.edu!gs4t From: gs4t@kelvin.seas.virginia.edu (Gnanasekaran Swaminathan) Subject: g++2.2.2 generates incorrect RS6000 assembly code Message-ID: <9210042100.AA66891@kelvin.seas.Virginia.EDU> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Sun, 4 Oct 1992 12:00:05 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 38