[Fortran, committed] Disable -fdebug-kludge.

Toon Moene toon@moene.indiv.nluug.nl
Sat Aug 19 06:23:00 GMT 2000


L.S.,

-fdebug-kludge was the option that introduced some rudimentary debug
information for COMMON BLOCK and EQUIVALENCE items emitted by g77.

Thanks to work by George Helffrich and Andy Vaught, this option can now
be disabled.

This series of patches does that and documents the fact.  Make bootstrap
and make -k check passed on alphaev6-unknown-linux-gnu.

2000-08-19  Toon Moene  <toon@moene.indiv.nluug.nl>

        * top.c (ffe_decode_option): Disable -fdebug-kludge
        and warn about it.
        * lang-options.h: Document the fact.
        * g77.texi: Ditto.

$ diff -rcp2N top.c.orig top.c
*** top.c.orig  Thu Jun 22 20:45:02 2000
--- top.c       Sat Aug 19 13:07:59 2000
*************** ffe_decode_option (argc, argv)
*** 308,314 ****
        ffe_set_is_zeros (FALSE);
        else if (strcmp (&opt[2], "debug-kludge") == 0)
!       ffe_set_is_debug_kludge (TRUE);
        else if (strcmp (&opt[2], "no-debug-kludge") == 0)
!       ffe_set_is_debug_kludge (FALSE);
        else if (strcmp (&opt[2], "onetrip") == 0)
        ffe_set_is_onetrip (TRUE);
--- 308,314 ----
        ffe_set_is_zeros (FALSE);
        else if (strcmp (&opt[2], "debug-kludge") == 0)
!       warning ("%s disabled, use normal debugging flags", opt);
        else if (strcmp (&opt[2], "no-debug-kludge") == 0)
!       warning ("%s disabled, use normal debugging flags", opt);
        else if (strcmp (&opt[2], "onetrip") == 0)
        ffe_set_is_onetrip (TRUE);
$ diff -rcp2N lang-options.h.orig lang-options.h
*** lang-options.h.orig Sat Feb 26 21:02:01 2000
--- lang-options.h      Sat Aug 19 12:56:11 2000
*************** FTNOPT( "-fvxt-intrinsics-hide", "Hide n
*** 140,144 ****
  FTNOPT( "-fzeros", "Treat initial values of 0 like non-zero values" )
  FTNOPT( "-fno-zeros", "" )
! FTNOPT( "-fdebug-kludge", "Emit special debugging information for
COMMON and EQUIVALENCE" )
  FTNOPT( "-fno-debug-kludge", "" )
  FTNOPT( "-fonetrip", "Take at least one trip through each iterative DO
loop" )
--- 140,144 ----
  FTNOPT( "-fzeros", "Treat initial values of 0 like non-zero values" )
  FTNOPT( "-fno-zeros", "" )
! FTNOPT( "-fdebug-kludge", "Emit special debugging information for
COMMON and EQUIVALENCE (disabled)" )
  FTNOPT( "-fno-debug-kludge", "" )
  FTNOPT( "-fonetrip", "Take at least one trip through each iterative DO
loop" )
$ diff -rcp2N g77.texi.orig g77.texi
*** g77.texi.orig       Wed Dec 29 19:32:38 1999
--- g77.texi    Sat Aug 19 13:04:07 2000
*************** information.
*** 2660,2666 ****
  @cindex equivalence areas
  @cindex missing debug features
! Support for this option in Fortran programs is incomplete.
  In particular, names of variables and arrays in common blocks
! or that are storage-associated via @code{EQUIVALENCE} are
  unavailable to the debugger.
  
--- 2660,2667 ----
  @cindex equivalence areas
  @cindex missing debug features
! Support for this option in Fortran programs was incomplete up till
! version 0.5.26 of @code{g77}.
  In particular, names of variables and arrays in common blocks
! or that are storage-associated via @code{EQUIVALENCE} were
  unavailable to the debugger.
  
*************** in a rudimentary way, as controlled by t
*** 2669,2672 ****
--- 2670,2676 ----
  @samp{-fdebug-kludge} option.
  
+ Because version 0.5.26 of @code{g77} enables full debug information
+ of COMMON BLOCK and EQUIVALENCE items, this option has been disabled.
+ 
  @xref{Code Gen Options,,Options for Code Generation Conventions},
  for more information.
*************** information is suggested.
*** 3216,3219 ****
--- 3220,3227 ----
  Use @samp{set language c} and @samp{set language fortran} to
accomplish this.
  
+ As of version 0.5.26 of @code{g77} this option has been disabled, as
the
+ compiler is now able to emit correct and complete debug information
+ for COMMON BLOCK and EQUIVALENCE items.
+ 
  For example:
  
*************** which might make some programs noticeabl
*** 3262,3266 ****
  Current plans call for this to happen when published versions of
@code{g77}
  and @code{gdb} exist that provide proper access to debugging
information on
! @code{COMMON} and @code{EQUIVALENCE} members.
  
  @cindex -femulate-complex option
--- 3270,3276 ----
  Current plans call for this to happen when published versions of
@code{g77}
  and @code{gdb} exist that provide proper access to debugging
information on
! @code{COMMON} and @code{EQUIVALENCE} members.  This is believed to
have
! happened as of version 0.5.26 of @code{g77}, so that this option has
been
! disabled starting with this release.
  
  @cindex -femulate-complex option
*************** in conjunction with a contemporary versi
*** 8843,8846 ****
--- 8853,8860 ----
  properly supports Fortran-language debugging, including access
  to members of @code{COMMON} areas.)
+ 
+ Version 0.5.26 of @code{g77} is believed to provide correct and
+ complete debug information for COMMON BLOCK and EQUIVALENCE items -
+ hence the @samp{-fdebug-kludge} option has been disabled.
  
  @xref{Code Gen Options,,Options for Code Generation Conventions},

Thanks, George and Andy !

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)


More information about the Gcc-patches mailing list