From: Tobias Schlüter Date: Sat, 4 Jun 2005 22:20:58 +0000 (+0200) Subject: re PR fortran/19195 (gfortran: ICE in final_scan_insn, at final.c:1843) X-Git-Tag: misc/cutover-cvs2svn~2629 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8e4005784d54ce47666f18cf0b81c2903a6bb881;p=thirdparty%2Fgcc.git re PR fortran/19195 (gfortran: ICE in final_scan_insn, at final.c:1843) fortran/ 2005-06-04 Tobias Schl"uter Erik Schnetter PR fortran/19195 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment, remove FIXME comment. testsuite/ 2005-06-04 Tobias Schl"uter PR fortran/19195 * gfortran.dg/debug_1.f90: New test. Co-Authored-By: Erik Schnetter From-SVN: r100603 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index bc8c7b495f77..27be5f59881f 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2005-06-04 Tobias Schl"uter + Erik Schnetter + + * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment, + remove FIXME comment. + 2005-06-04 Tobias Schl"uter * match.c (match_forall_iterator): Don't immediately give error if '=' diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c index c4ae36674dee..fe41654f1c93 100644 --- a/gcc/fortran/trans.c +++ b/gcc/fortran/trans.c @@ -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; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index db1bea636287..aba8829e76f5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2005-06-04 Tobias Schl"uter + PR fortran/19195 + * gfortran.dg/debug_1.f90: New test. + * gfortran.dg/forall_1.f90: New test. 2005-06-04 Erik Edelmann diff --git a/gcc/testsuite/gfortran.dg/debug_1.f90 b/gcc/testsuite/gfortran.dg/debug_1.f90 new file mode 100644 index 000000000000..808f41c70846 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/debug_1.f90 @@ -0,0 +1,20 @@ +subroutine gfc_debug_bug (n,m,k,ax,bx,c) +! above line must be the first line +! { dg-do compile } +! { dg-options "-g" } +! PR 19195 +! we set line numbers wrongly, which made the compiler choke when emitting +! debug information. + implicit none + integer :: n, m + integer :: k(n+m) + real :: ax(:), bx(n), c(n+m) + + integer :: i + real :: f + + i = k(n) + f = c(n) + f = bx(n) + f = ax(n) +end subroutine gfc_debug_bug