This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Internal compiler error 9


Hello,

Here is a small test case that generates in internal compiler error
9.  This test case is a very slight modification on the previous bug I
reported a few minutes ago:

test.h:

#include<iostream.h>

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

void test<class BOX> (test_box *);

class test_square
    {
    friend 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);
    }


donatello:~/tmp> g++ -c -v -fno-implicit-templates test.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 test.C /home/markj/tmp/cc3usCzR.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/cc3usCzR.ii -quiet -dumpbase test.cc -version -fno-implicit-templates -o /home/markj/tmp/cc3usCzR.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).
In file included from test.C:1:
test.h:12: Internal compiler error 9.
test.h:12: Please submit a full bug report to `egcs-bugs@cygnus.com'.


-- 

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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]