Template/-O1/Loop unrolling bug in egcs 1.0.3a

Claus Fischer cfischer@td2cad.intel.com
Sat Jul 25 15:09:00 GMT 1998


Thanks for the good responses to my last bug. Here's another one,
this time perhaps even a full one:

     A template function's instantiation does not compile correctly
     with -funroll-loops and -O1.

After removing -funroll-loops from the options list, it works.

*******************************************************

cat >x.cc <<END
class A {public: ~A();};
template<class X>
void f(X,int*v) {
    A x;
    int n = 100;
    for (int i = 0; i < 100; i++) if (v[1] == n || v[0]) return;
}
template void f(int,int*);
END
********************************************************

Symptom:

$ /usr/local/egcs/bin/c++ -c -funroll-loops -O1 -o x.o x.cc
cca00625.s: Assembler messages:
cca00625.s:44: Fatal error: Symbol .LEHB13 already defined.

*******************************************************
System info:
$ /usr/local/egcs/bin/c++ --version
egcs-2.90.29 980515 (egcs-1.0.3 release)
$ uname -a
Linux clauspc 2.0.33 #14 Sat Mar 7 17:14:37 MET 1998 i686 unknown


Best regards,

Claus

-- 

... not speaking for Intel

        Claus Fischer           Intel Corporation, RN2-40
                         	2200 Mission College Blvd
	Inside Intel :-)        Santa Clara,CA 05052-8119
				telephone +1-408-765-6808
				fax       +1-408-765-9322
				cfischer@td2cad.intel.com



More information about the Gcc-bugs mailing list