This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Optimizer bug -- known?
- To: gcc at gcc dot gnu dot org
- Subject: Optimizer bug -- known?
- From: Mike Oliver <oliver at math dot ucla dot edu>
- Date: Fri, 23 Mar 2001 17:05:16 -0800
- CC: Mike Oliver <oliver at math dot ucla dot edu>, Igor Markov <imarkov at cs dot ucla dot edu>, "Andrew B. Kahng" <abk at ucsd dot edu>
- Organization: UCLA
Hi, I have a completely harmless piece of code that will not
compile optimized under g++2.95.2 or 2.95.3 . The
compile command used was
g++ -O3 -funroll-loops -fPIC -fno-for-scope -pipe -c temp.cxx
The error output was
{standard input}: Assembler messages:
{standard input}:324: Error: Symbol .LEHB1762 already defined.
{standard input}:332: Error: Symbol .LEHE1762 already defined.
{standard input}:339: Error: Symbol .LEHB1762 already defined.
{standard input}:372: Error: Symbol .LEHE1762 already defined.
Removing -funroll-loops resolves the error.
Finally, here are the contents of temp.cxx:
#include <vector>
#include <algorithm>
using namespace std;
vector<unsigned> _tour;
bool silly()
{
unsigned i;
vector<unsigned> tt(_tour);
sort(tt.begin(),tt.end());
for (i=0;i<tt.size();i++)
{
if (tt[i]!=i)
{
return( false );
}
}
return( true );
}
Is this a known bug? Will it be fixed in gcc3.0 ? (It does seem
to be fixed in the gcc2.96 that shipped with Linux RedHat 7.0).