Bug 15683 - [g77 only] -g -fno-globals -Wno-globals ICE in f771
Summary: [g77 only] -g -fno-globals -Wno-globals ICE in f771
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: 3.4.1
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2004-05-27 15:17 UTC by Jakub Jelinek
Modified: 2004-05-27 20:11 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 2.95.3 3.2.3 3.3.3 3.4.0
Last reconfirmed: 2004-05-27 15:23:19


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2004-05-27 15:17:22 UTC
C { dg-options "-g -fno-globals -Wno-globals" }
      subroutine a(i)
      implicit none
      integer i
      i = 0
      return
      end
      subroutine a(i)
      implicit none
      integer i
      i = 0
      return
      end

It seems that -fno-globals option happily allows compiling source which will
not assemble later on and with -g causes ICE.
Comment 1 Andrew Pinski 2004-05-27 15:23:18 UTC
I can confirm this with almost all compilers but I do not know if this is ever going to be fixed in a 3.4.x 
compiler as g77 is dead (removed) on the mainline replaced by gfortran.
Comment 2 Andrew Pinski 2004-05-27 20:11:15 UTC
I should note that -fno-globals is saying that you do not want any globals at all but then you are using 
a global so this is invalid code and you are also saying do not check for globals (-fno-globals).  Since I 
do not think this option is useful for gfortran at all.  Closing as will not fix.