public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/54503] New: debug: Consider using the beginning of the main program as locus for the set_* calls
@ 2012-09-06 14:06 burnus at gcc dot gnu.org
  2015-10-29 13:44 ` [Bug fortran/54503] " dominiq at lps dot ens.fr
  0 siblings, 1 reply; 2+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-09-06 14:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54503

             Bug #: 54503
           Summary: debug: Consider using the beginning of the main
                    program as locus for the set_* calls
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


Follow up to PR 54405

For the program

  program essai_1
     x = 1.0
  end program

gfortran generates the following dump:

/************************************************/
[hjff.f90 : 3] {
  real(kind=4) x;

  [hjff.f90 : 2] x = 1.0e+0;
}


main (integer(kind=4) argc, character(kind=1) * * argv)
[hjff.f90 : 3] {
  static integer(kind=4) options.0[7] = {68, 1023, 0, 0, 1, 1, 0};

  [hjff.f90 : 3] _gfortran_set_args (argc, argv);
  [hjff.f90 : 3] _gfortran_set_options (7, [hjff.f90 : 3] &options.0[0]);
  [hjff.f90 : 3] essai_1 ();
  [hjff.f90 : 3] return 0;
}
/************************************************/

Thus, if one sets a break point in "main", the position is 'end program'. If
one now steps ("s") through the program, one remains in that line for the
set_args/set_options calls, then one jumps to "MAIN__" alias "essai_1" in line
2 for the assignment - and for the rest, one remains as expected in line 3.

I wonder whether it wouldn't be more natural to have "main" and the set_*
functions with the locus of line 1 - and keep the "return 0" with the locus
line 3.

It's of low priority as doing a "n" won't do what users will expect either: It
jumps over the "essai_1()" call to the "return 0". Thus, it is only a minor
glitch.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug fortran/54503] debug: Consider using the beginning of the main program as locus for the set_* calls
  2012-09-06 14:06 [Bug fortran/54503] New: debug: Consider using the beginning of the main program as locus for the set_* calls burnus at gcc dot gnu.org
@ 2015-10-29 13:44 ` dominiq at lps dot ens.fr
  0 siblings, 0 replies; 2+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-29 13:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54503

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-10-29
             Blocks|                            |24546
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Still present at r229494.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24546
[Bug 24546] [meta-bug] gfortran debugging problems


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-29 13:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-06 14:06 [Bug fortran/54503] New: debug: Consider using the beginning of the main program as locus for the set_* calls burnus at gcc dot gnu.org
2015-10-29 13:44 ` [Bug fortran/54503] " dominiq at lps dot ens.fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).