[Bug fortran/89724] [9 Regression] Fortran diagnostics give wrong line number because of math-vector-fortran.h header file
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89724 Jakub Jelinek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #5 from Jakub Jelinek --- Fixed.
[Bug fortran/89724] [9 Regression] Fortran diagnostics give wrong line number because of math-vector-fortran.h header file
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89724 --- Comment #4 from Jakub Jelinek --- Author: jakub Date: Sat Mar 16 21:18:49 2019 New Revision: 269734 URL: https://gcc.gnu.org/viewcvs?rev=269734&root=gcc&view=rev Log: PR fortran/89724 * scanner.c (load_line): Remove linenum and current_line static variables, add warned_tabs automatic variable. Use current_file->line instead of current_line and warned_tabs boolean to avoid diagnosing tabs multiple times on the same line. * gfortran.dg/continuation_15.f90: New test. * gfortran.dg/continuation_16.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/continuation_15.f90 trunk/gcc/testsuite/gfortran.dg/continuation_16.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/scanner.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/89724] [9 Regression] Fortran diagnostics give wrong line number because of math-vector-fortran.h header file
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89724 --- Comment #3 from Jakub Jelinek --- Created attachment 45971 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45971&action=edit gcc9-pr89724.patch Patch so far tested just with make check-gfortran but not whole bootstrap/regtest.
[Bug fortran/89724] [9 Regression] Fortran diagnostics give wrong line number because of math-vector-fortran.h header file
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89724 --- Comment #2 from Jakub Jelinek --- This is actually not much related to the -fpre-include stuff, but is a general bug in the continuation handling. If I do: ! ! ! include 'continuation_9.f90' then it will show: f951: Warning: ‘&’ not allowed by itself in line 6 f951: Warning: ‘&’ not allowed by itself in line 7 f951: Warning: ‘&’ not allowed by itself in line 8 rather than: f951: Warning: ‘&’ not allowed by itself in line 3 f951: Warning: ‘&’ not allowed by itself in line 4 f951: Warning: ‘&’ not allowed by itself in line 5 when I compile continuation_9.f90 directly. load_line has linenum and current_line static int vars that are simply incremented across all files sourced in rather than being reset when we call another load_file, or updated e.g. from preprocessor comments.
[Bug fortran/89724] [9 Regression] Fortran diagnostics give wrong line number because of math-vector-fortran.h header file
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89724 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2019-03-14 CC||jakub at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org Target Milestone|--- |9.0 Summary|Fortran diagnostics give|[9 Regression] Fortran |wrong line number because |diagnostics give wrong line |of math-vector-fortran.h|number because of |header file |math-vector-fortran.h ||header file Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek --- I'll handle this.