home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / gnu / gcc / bug / 2807 < prev    next >
Encoding:
Text File  |  1992-11-20  |  2.3 KB  |  94 lines

  1. Newsgroups: gnu.gcc.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!adm.csc.ncsu.edu!dbt
  3. From: dbt@adm.csc.ncsu.edu (David B. Teague)
  4. Subject: Apparent Optimization bug causes multiply-defined labels
  5. Message-ID: <1992Nov21.002715.21326@ncsu.edu>
  6. Followup-To: bray@wcuvax1.wcu.edu
  7. Sender: gnulists@ai.mit.edu
  8. Organization: wcuvax1.wcu.edu (CS Dept., Western Carolina University)
  9. Distribution: gnu
  10. Date: Sat, 21 Nov 1992 00:27:15 GMT
  11. Approved: bug-gcc@prep.ai.mit.edu
  12. Lines: 80
  13.  
  14. [Please respond to bray@wcuvax1.wcu.edu]
  15.  
  16. While making libg++2.2, I came upon the following multiply-defined
  17. label problem. Note that this does not occur without optimization, and
  18. does occur with both -O and -O2. An examination of the .s files generated
  19. with optimization shows labels, such as .L_b20 and .L_b26, to occur twice.
  20. This does not occur in the .s files generated without optimization.
  21.  
  22. --Jim
  23.  
  24. gcc 2.3.1: i486-sysv4
  25. libg++ 2.2
  26.  
  27. pwd
  28. /usr/local/libg++
  29.  
  30. elentari$make
  31. /bin/sh ./config.status
  32. Created "Makefile" in / using "config/mh-sysv4"
  33. [ stuff deleted ]
  34. gcc -g -O2 -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include  -c
  35. Obstack.cc
  36. Assembler: Obstack.cc
  37.         aline 1878      : multiply defined label
  38.         aline 2556      : multiply defined label
  39.         aline 2859      : multiply defined label
  40.         aline 3227      : multiply defined label
  41.         aline 3614      : multiply defined label
  42.         aline 3951      :  : multiply defined label
  43. make[2]: *** [Obstack.o] Error 1
  44. make[1]:*** [in-src] Error 1
  45. make: *** [all-libg++] Error 1
  46.  
  47. gcc -g -O2 -S -nostdinc++ -I.. -I. -I./../iostream -I./../g++-include
  48. -c Obstack.cc
  49.  
  50.  
  51. >From Obstack.s:
  52.         .file   "Obstack.cc"
  53.         .version        "01.01"
  54. gcc2_compiled.:
  55.  
  56. [Stuff deleted]
  57.  
  58.         pushl %ebx
  59.         movl 8(%ebp),%ebx
  60.         movl 12(%ebp),%esi
  61. .L_b20:
  62. .L_LC36:
  63.  
  64. [Stuff deleted]
  65.  
  66.         .2byte  0xffff
  67.         .4byte  .L_LC37-.L_text_b
  68.         .previous
  69. .L_b20: [[[Line 1878]]]
  70.         xorb %al,%al
  71.         movl %esi,%edi
  72.  
  73. [Stuff deleted]
  74.  
  75.         movl 8(%ebp),%ebx
  76.         movb 12(%ebp),%dl
  77.         movb %dl,-4(%ebp)
  78. .L_b26:
  79. .L_LC57:
  80.  
  81. .section        .line
  82.         .4byte  158     / /Obstack.h:158
  83.  
  84. [stuff deleted]
  85.  
  86.         .2byte  0xffff
  87.         .4byte  .L_LC58-.L_text_b
  88.         .previous
  89. .L_b26: [[[Line 2556]]]
  90. .L_LC59:
  91.  
  92. .section        .line
  93.  
  94.