http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54405
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-08-29 13:04:13 UTC --- If one generates the line information using gfortran -fdump-tree-original-lineno debug.f90 and looks at debug.f90.003t.original, it - kind of - looks fine. (-fdump-tree-original-lineno generates a dump of the internal representation, which is C like and does *not* contain the full information.) Of course, in "main", it would be nice to have the _set_*/essai_1() referring to line 1 and only "return 0" to line 12, but otherwise ... At least I do not see anything which looks wrong. The only difference I see is the outer { ... } which has line number 12 in 4.6/4.7/4.8 and is not existing in 4.5. As there is no code associated with it, I don't think it should cause problems. (That { ... } belongs to TRY_FINALLY_EXPR, which is used, e.g., for automatic deallocation when leaving the scope.) Nonetheless, it is completely unclear to me why gdb jumps from line 12 to line 4 - and not to line 10 (or even line 3). Do you see something else which looks wrong? essai_1 () [debug.f90 : 12] { real(kind=4) x; [debug.f90 : 3] x = 1.0e+0; [debug.f90 : 4] { struct __st_parameter_dt dt_parm.0; [debug.f90 : 4] dt_parm.0.common.filename = &"debug.f90" [debug.f90 : 4] dt_parm.0.common.line = 4; [debug.f90 : 4] dt_parm.0.common.flags = 128; [debug.f90 : 4] dt_parm.0.common.unit = 6; _gfortran_st_write ([debug.f90 : 4] &dt_parm.0); [debug.f90 : 4] _gfortran_transfer_character_write (&dt_parm.0, &"x ="); [debug.f90 : 4] _gfortran_transfer_real_write (&dt_parm.0, &x, 4); [debug.f90 : 4] _gfortran_st_write_done (&dt_parm.0); } [debug.f90 : 6] x = 2.5e+0; ... [debug.f90 : 10] _gfortran_st_write_done ([debug.f90 : 10] &dt_parm.2); } } main (integer(kind=4) argc, character(kind=1) * * argv) [debug.f90 : 12] { static integer(kind=4) options.3[7] = {68, 1023, 0, 0, 1, 1, 0}; [debug.f90 : 12] _gfortran_set_args (argc, argv); [debug.f90 : 12] _gfortran_set_options (7, [debug.f90 : 12] &[debug.f90 : 12] options.3[0]); [debug.f90 : 12] essai_1 (); [debug.f90 : 12] return 0; }