This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Confusing bug in 1.1 on Solaris
- To: egcs-bugs at cygnus dot com
- Subject: Confusing bug in 1.1 on Solaris
- From: csk at cs dot washington dot edu (Craig Kaplan)
- Date: Thu, 5 Nov 1998 17:26:41 -0800 (PST)
Here's another one that's eating at me. Worst of all, this bug only seems
to exhibit itself on Solaris 2.5.1 -- it doesn't seem to reproduce under
Linux 2.0.33. The other unfortunate aspect is that I can't whittle it down
to a test case. It only pops up on my whole program.
First, here's the actual compiler output:
------------------------------------------------------------------------------
% g++ --version
egcs-2.91.57
% g++ -o main main.o ../flow/misc.o [libraries]
ld: warning: file ../flow/misc.o: relocation against external symbol `__ne__Ct12cdr_iterator2Zt18__rb_t'
from a non-allocatable section `.stab'
cannot be processed at runtime: relocation ignored
ld: warning: file main.o: relocation against external symbol `__ne__Ct12cdr_iterator2Zt18__rb_t'
from a non-allocatable section `.stab'
cannot be processed at runtime: relocation ignored
Undefined first referenced
symbol in file
__ne__Ct12cdr_iterator2Zt18__rb_t ../flow/misc.o
ld: fatal: Symbol referencing errors. No output written to tile
------------------------------------------------------------------------------
Now, take a look at the relevant lines from misc.o:
------------------------------------------------------------------------------
% nm ../flow/misc.o | grep __ne__
[157] | 0| 0|NOTY |GLOB |0 |UNDEF |__ne__Ct12cdr_iterator2Zt18__rb_t
[194] | 0| 48|FUNC |WEAK |0 |35 |__ne__Ct12cdr_iterator2Zt18__rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZPt9GraphEdge3Z12FlowNodeInfoZ10FlowObjectZ8_s_emptyZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZPt9GraphEdge3Z12FlowNodeInfoZ10FlowObjectZ8_s_emptyZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZPt9GraphEdge3Z12FlowNodeInfoZ10FlowObjectZ8_s_emptyZPt9GraphEdge3Z12FlowNodeInfoZ10FlowObjectZ8_s_emptyRCt12cdr_iterator2Zt18__rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZPt9GraphEdge3Z12FlowNodeInfoZ10FlowObjectZ8_s_emptyZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZPt9GraphEdge3Z12FlowNodeInfoZ10FlowObjectZ8_s_emptyZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZPt9GraphEdge3Z12FlowNodeInfoZ10FlowObjectZ8_s_emptyZPt9GraphEdge3Z12FlowNodeInfoZ10FlowObjectZ8_s_empty
------------------------------------------------------------------------------
Yikes! It looks like an undefined reference was created to
"__ne__Ct12cdr_iterator2Zt18__rb_t". But that's not the name of anything --
it's a cut off version of the much longer name on the following line! Somehow,
my template instantiation (or something related) got convoluted enough that
the compiler lost a big chunk of the symbol it was supposed to be referencing.
Has anyone seen this before? Is it fixed in the most recent snapshot? Any
help would be greatly appreciated. And I'd be happy to supply more
information about my program if necessary.
Thanks again!
--
Craig. http://www.cs.washington.edu/homes/csk/
Counterfactuals: what would the world be like without them?