Bug 132579

Summary: g77: Duplicate BLOCK DATA names can crash g77
Product: [Fedora] Fedora Reporter: Joe Krahn <krahn>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-03 12:58:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joe Krahn 2004-09-14 20:05:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4)
Gecko/20030624 Netscape/7.1

Description of problem:
Duplicate BLOCK DATA names are not detected with -fno-globals, and
cause the compiler to die ungracefully.


Version-Release number of selected component (if applicable):
gcc-g77-3.3.3-7

How reproducible:
Always

Steps to Reproduce:
g77 -g -c -fno-globals -Wno-globals badcode.f

badcode.f:

      block data ftype_blockdata
      implicit none
      integer*2 ctype_class_table(256)
      common /ftype_private/ ctype_class_table
      save /ftype_private/
      end block data ftype_blockdata

      block data ftype_blockdata
      character(len=128) ch_isalnum_id_
      common /ch_isalnum_id_C/ ch_isalnum_id_
      data ch_isalnum_id_ /"&ch_isalnum"/
      save /ch_isalnum_id_C/
      end


Actual Results:  badcode.f: In block-data unit `ftype_blockdata':
badcode.f:13: internal compiler error: in gen_subprogram_die, at
dwarf2out.c:10814
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.


Expected Results:  badcode.f:1: 
         block data ftype_blockdata
                    1
badcode.f:8: (continued):
         block data ftype_blockdata
                    2
Global name `ftype_blockdata' defined at (2) already defined at (1)


Additional info:

Without the -g flag, g77 dies during assembly:

/tmp/ccRFZNfq.s: Assembler messages:
/tmp/ccRFZNfq.s:148: Error: symbol `ftype_blockdata__' is already defined

Comment 1 Jakub Jelinek 2005-01-03 12:58:37 UTC
This got WONTFIXEd UPSTREAM:
http://gcc.gnu.org/PR15683


Comment 2 Jakub Jelinek 2005-03-14 08:45:20 UTC
*** Bug 151013 has been marked as a duplicate of this bug. ***