illegal assembly code generated by egcs-1.0.1 on AIX 3.2

Mark Johnstone markj@ibmoto.com
Tue Jan 6 18:14:00 GMT 1998


Hello,

When compiling the following files, a control character incorrectly
gets put into the asserbler (.s) file generated by egcs 1.0.1:

test.h:

#include<iostream.h>

struct test_box
    {
    void print(void) {cout << "this is a test" << endl;}
    };

void test<class BOX> (test_box *);


test.C:

#include "test.h"

template <class BOX> void test(BOX *the_box)
    {
    the_box->print();
    };

template void test<> (test_box *);


main.C:

#include "test.h"

main()
    {
    test_box box1;
    test(&box1);
    }


Here is what happens when I compile:

donatello:~/tmp> g++ -c -fno-implicit-templates test.C
donatello:~/tmp> g++ -v -fno-implicit-templates test.o main.C
Reading specs from /home/markj/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/specs
gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)
 /home/markj/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=90 -D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_IBMR2 -D_POWER -D_AIX -D_AIX32 -Asystem(unix) -Asystem(aix) -Acpu(rs6000) -Amachine(rs6000) -D__EXCEPTIONS -D__CHAR_UNSIGNED__ -D_ARCH_PWR main.C /home/markj/tmp/ccd%QCSM.ii
GNU CPP version egcs-2.90.23 980102 (egcs-1.0.1 release)
#include "..." search starts here:
#include <...> search starts here:
 /home/markj/include/g++
 /usr/local/include
 /home/markj/rs6000-ibm-aix3.2.5/include
 /home/markj/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/include
 /usr/include
End of search list.
 /home/markj/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.90.23/cc1plus /home/markj/tmp/ccd%QCSM.ii -quiet -dumpbase main.cc -version -fno-implicit-templates -o /home/markj/tmp/ccd%QCSM.s
GNU C++ version egcs-2.90.23 980102 (egcs-1.0.1 release) (rs6000-ibm-aix3.2.5) compiled by GNU C version egcs-2.90.23 980102 (egcs-1.0.1 release).
 /home/markj/rs6000-ibm-aix3.2.5/bin/as -u -mpwr -o /home/markj/tmp/ccd%QCSM1.o /home/markj/tmp/ccd%QCSM.s
/home/markj/tmp/ccd%QCSM.s: Assembler messages:
/home/markj/tmp/ccd%QCSM.s:34: Error: syntax error; found `' but expected `,'
/home/markj/tmp/ccd%QCSM.s:34: Error: junk at end of line: `Ø`'


-- 

Mark S. Johnstone, Ph.D.  Methodology and Tools Development
markj@ibmoto.com          Networking & Computing Systems Group
                          Somerset Design Center, MD: OE70
(512) 424-8468 (desk)     6200 Bridgepoint Parkway, Bldg. #4, Austin, TX  78730
(512) 933-7333 pin 428468 (pager)



More information about the Gcc-bugs mailing list