[Bug fortran/19195] gfortran: ICE in final_scan_insn, at final.c:1843

tobi at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Jun 4 21:57:00 GMT 2005


------- Additional Comments From tobi at gcc dot gnu dot org  2005-06-04 21:56 -------
I think this is the right thing to do, but I'm not sure it's the only bug.  The
line number given in the ICE is minus two, but this patch only fixes an off-by-one.

2005-06-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
        Erik Schnetter  <schnetter@aei.mpg.de>

Index: trans.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/trans.c,v
retrieving revision 1.24
diff -u -p -r1.24 trans.c
--- trans.c     26 May 2005 18:36:10 -0000      1.24
+++ trans.c     4 Jun 2005 21:53:50 -0000
@@ -437,9 +437,9 @@ gfc_get_backend_locus (locus * loc)
 {
   loc->lb = gfc_getmem (sizeof (gfc_linebuf));
 #ifdef USE_MAPPED_LOCATION
-  loc->lb->location = input_location; /* FIXME adjust?? */
+  loc->lb->location = input_location;
 #else
-  loc->lb->linenum = input_line - 1;
+  loc->lb->linenum = input_line;
 #endif
   loc->lb->file = gfc_current_backend_file;
 }

(I've also added Erik to the CC list, as he showed some interest in this bug)

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schnetter at aei dot mpg dot
                   |                            |de


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



More information about the Gcc-bugs mailing list