home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.gcc.bug
- Path: sparky!uunet!cis.ohio-state.edu!adm.csc.ncsu.edu!dbt
- From: dbt@adm.csc.ncsu.edu (David B. Teague)
- Subject: Apparent Optimization bug causes multiply-defined labels
- Message-ID: <1992Nov21.002715.21326@ncsu.edu>
- Followup-To: bray@wcuvax1.wcu.edu
- Sender: gnulists@ai.mit.edu
- Organization: wcuvax1.wcu.edu (CS Dept., Western Carolina University)
- Distribution: gnu
- Date: Sat, 21 Nov 1992 00:27:15 GMT
- Approved: bug-gcc@prep.ai.mit.edu
- Lines: 80
-
- [Please respond to bray@wcuvax1.wcu.edu]
-
- While making libg++2.2, I came upon the following multiply-defined
- label problem. Note that this does not occur without optimization, and
- does occur with both -O and -O2. An examination of the .s files generated
- with optimization shows labels, such as .L_b20 and .L_b26, to occur twice.
- This does not occur in the .s files generated without optimization.
-
- --Jim
-
- gcc 2.3.1: i486-sysv4
- libg++ 2.2
-
- pwd
- /usr/local/libg++
-
- elentari$make
- /bin/sh ./config.status
- Created "Makefile" in / using "config/mh-sysv4"
- [ stuff deleted ]
- gcc -g -O2 -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include -c
- Obstack.cc
- Assembler: Obstack.cc
- aline 1878 : multiply defined label
- aline 2556 : multiply defined label
- aline 2859 : multiply defined label
- aline 3227 : multiply defined label
- aline 3614 : multiply defined label
- aline 3951 : : multiply defined label
- make[2]: *** [Obstack.o] Error 1
- make[1]:*** [in-src] Error 1
- make: *** [all-libg++] Error 1
-
- gcc -g -O2 -S -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include
- -c Obstack.cc
-
-
- >From Obstack.s:
- .file "Obstack.cc"
- .version "01.01"
- gcc2_compiled.:
-
- [Stuff deleted]
-
- pushl %ebx
- movl 8(%ebp),%ebx
- movl 12(%ebp),%esi
- .L_b20:
- .L_LC36:
-
- [Stuff deleted]
-
- .2byte 0xffff
- .4byte .L_LC37-.L_text_b
- .previous
- .L_b20: [[[Line 1878]]]
- xorb %al,%al
- movl %esi,%edi
-
- [Stuff deleted]
-
- movl 8(%ebp),%ebx
- movb 12(%ebp),%dl
- movb %dl,-4(%ebp)
- .L_b26:
- .L_LC57:
-
- .section .line
- .4byte 158 / /Obstack.h:158
-
- [stuff deleted]
-
- .2byte 0xffff
- .4byte .L_LC58-.L_text_b
- .previous
- .L_b26: [[[Line 2556]]]
- .L_LC59:
-
- .section .line
-
-