c++/1742: bug in gcc 2.95.2 on SunOS 5.6 due to too big function name
dants@cs.huji.ac.il
dants@cs.huji.ac.il
Tue Jan 23 04:56:00 GMT 2001
>Number: 1742
>Category: c++
>Synopsis: bug in gcc 2.95.2 on SunOS 5.6 due to too big function name
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Tue Jan 23 04:56:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Dan Tsafrir
>Release: gcc version 2.95.2 19991024 (release)
>Organization:
>Environment:
uname -a: SunOS sol2 5.6 Generic sun4u sparc SUNW,Ultra-2
>Description:
Release (g++ -v):
================
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/specs
gcc version 2.95.2 19991024 (release)
Environment (uname -a):
======================
SunOS sol2 5.6 Generic sun4u sparc SUNW,Ultra-2
Description:
===========
When compiling the C++ program:
#include <map>
#include <set>
#include <utility> // for pair
struct X234567 {
int x;
X234567(int a=0) : x(a) {}
bool operator<(const X234567& b) const {return x < b.x;}
};
int main() {
map< pair<int,int> , set<X234567> > m ;
m[make_pair(0,0)] = set<X234567>();
m.erase(make_pair(0,0));
return 0;
}
I get the following error message:
/usr/ccs/bin/as: "/var/tmp/ccdJu1ej.s", line 3062:
error: can't compute value of an expression involving an external symbol
But when I change the name of struct 'X234567' to 'X23456' (simply removed
the '7'), the compilation succeeds !
I guess the bug happens due to the symbol generated from: m.erase(...) (by
remarking this line, the bug disappears).
The compilation command is:
g++ -Wall name-too-big-bug.cc -Istl -D_STL_NO_CONCEPT_CHECKS
The STL I used:
==============
I used SGI's latest version of STL (stdlib_20000608.tar.gz),
found at:
http://www.sgi.com/Technology/STL/standard_library.html
I opened the stl tar file in the directory: ./stl
and hence the compilation flag: -Istl
Thanks, Dan (dants@cs.huji.ac.il).
>How-To-Repeat:
described in 'Description'
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list