public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/24965] New: Wrong file name in error message
@ 2005-11-21 0:57 schnetter at aei dot mpg dot de
2005-11-21 0:59 ` [Bug fortran/24965] " schnetter at aei dot mpg dot de
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: schnetter at aei dot mpg dot de @ 2005-11-21 0:57 UTC (permalink / raw)
To: gcc-bugs
The enclosed source file contains errors. The errors are detected, but are
attributed to the wrong source file. The relevant lines of the source files
are:
# 1
"/Users/eschnett/Cvanilla/arrangements/AEIThorns/Exact/src/include/Scalar_CalcTmunu_temps.inc"
c
c temporary variables for code in Scalar_CalcTmunu.inc
c
REAL*8 unu,doi,trei,rr,sum,rr2,aha1,aha2,kkkk,riih,rii2
REAL*8 aaaa,bbbb,aaaa1,bbbb1,kkkk1,r3,bass,term1,term2
REAL*8 unu1, raz, raz2, razsch2, coefsch, pppsch, unusch
REAL*8 treiori
REAL*8 star_m, star_r
This particular block appears twice in the source file. When compiled with
$ ~/gcc/bin/gfortran setupmaximal.f
The error messages begin with
In file
/Users/eschnett/Cvanilla/arrangements/CactusEinstein/Maximal/src/setupmaximal.F:4
REAL*8 unu,doi,trei,rr,sum,rr2,aha1,aha2,kkkk,riih,rii2
1
Error: Symbol 'unu' at (1) already has basic type of REAL
Note that the file name ends with "setupmaximal.F" and not
"Scalar_CalcTmunu_temps.inc", as it should.
I failed to reproduce this with a smaller source file.
--
Summary: Wrong file name in error message
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schnetter at aei dot mpg dot de
GCC build triplet: powerpc-apple-darwin8.3.0
GCC host triplet: powerpc-apple-darwin8.3.0
GCC target triplet: powerpc-apple-darwin8.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24965
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/24965] Wrong file name in error message
2005-11-21 0:57 [Bug fortran/24965] New: Wrong file name in error message schnetter at aei dot mpg dot de
@ 2005-11-21 0:59 ` schnetter at aei dot mpg dot de
2005-11-22 8:21 ` fxcoudert at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: schnetter at aei dot mpg dot de @ 2005-11-21 0:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from schnetter at aei dot mpg dot de 2005-11-21 00:58 -------
Created an attachment (id=10302)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10302&action=view)
Failing source code
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24965
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/24965] Wrong file name in error message
2005-11-21 0:57 [Bug fortran/24965] New: Wrong file name in error message schnetter at aei dot mpg dot de
2005-11-21 0:59 ` [Bug fortran/24965] " schnetter at aei dot mpg dot de
@ 2005-11-22 8:21 ` fxcoudert at gcc dot gnu dot org
2007-05-18 13:01 ` dfranke at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-11-22 8:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from fxcoudert at gcc dot gnu dot org 2005-11-22 08:21 -------
Confirmed on i686-linux.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
GCC build triplet|powerpc-apple-darwin8.3.0 |
GCC host triplet|powerpc-apple-darwin8.3.0 |
GCC target triplet|powerpc-apple-darwin8.3.0 |
Last reconfirmed|0000-00-00 00:00:00 |2005-11-22 08:21:46
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24965
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/24965] Wrong file name in error message
2005-11-21 0:57 [Bug fortran/24965] New: Wrong file name in error message schnetter at aei dot mpg dot de
2005-11-21 0:59 ` [Bug fortran/24965] " schnetter at aei dot mpg dot de
2005-11-22 8:21 ` fxcoudert at gcc dot gnu dot org
@ 2007-05-18 13:01 ` dfranke at gcc dot gnu dot org
2007-06-03 3:27 ` jvdelisle at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-05-18 13:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dfranke at gcc dot gnu dot org 2007-05-18 14:00 -------
I'm not 100% sure whether the code below resembles the problem Erik reported
here, but if so, it is fixed in mainline and 4.2:
$> cat pr24965.inc
real :: x
$> cat pr24965.f90
real :: x
include "pr24965.inc"
x = 3.14
end
$> gfortran-svn -g -Wall pr24965.f90
pr24965.inc:1.9:
Included at pr24965.f90:2:
real :: x
1
Error: Symbol 'x' at (1) already has basic type of REAL
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24965
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/24965] Wrong file name in error message
2005-11-21 0:57 [Bug fortran/24965] New: Wrong file name in error message schnetter at aei dot mpg dot de
` (2 preceding siblings ...)
2007-05-18 13:01 ` dfranke at gcc dot gnu dot org
@ 2007-06-03 3:27 ` jvdelisle at gcc dot gnu dot org
2007-06-16 21:08 ` dfranke at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-06-03 3:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jvdelisle at gcc dot gnu dot org 2007-06-03 03:27 -------
The Comment #3 example is not the same as the original report. The attached
example is already preprocessed source with file name information embedded in
lines beginning with '#'
This is handled in scanner.c. The filenames are being extracted properly in
the function preprocessor_line(). The filename information is not getting into
the scanners gfc_line and gfc_file structures correctly. I would guess it
needs to fixed around about line 1492 of scanner.c. Looks like we are just not
doing anything with it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24965
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/24965] Wrong file name in error message
2005-11-21 0:57 [Bug fortran/24965] New: Wrong file name in error message schnetter at aei dot mpg dot de
` (3 preceding siblings ...)
2007-06-03 3:27 ` jvdelisle at gcc dot gnu dot org
@ 2007-06-16 21:08 ` dfranke at gcc dot gnu dot org
2007-06-22 19:55 ` dfranke at gcc dot gnu dot org
2007-07-28 12:55 ` fxcoudert at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-06-16 21:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dfranke at gcc dot gnu dot org 2007-06-16 21:08 -------
Erik,
how did you prepare the attached file? I think I have an idea what's wrong:
Let there be "foo.inc", "bar.inc" and "pr24965.F90". The latter contains:
#include "foo.inc" ! integer :: foo
#include "foo.inc" ! integer :: foo
#include "bar.inc" ! integer :: bar
end
Now running cpp and gfortran:
$> cpp-svn pr24965.F90 > pr24965.f90
$> gfortran-svn -g -Wall pr24965.f90
foo.inc:1.14:
Included at pr24965.F90:2:
integer :: foo
1
Error: Symbol 'foo' at (1) already has basic type of INTEGER
Which is the correct error message. The preprocessor lines in your file have
the format '# n "filename"' where n seems to be a line number. The lines
generated by my approach have the format '# n "filename" m' where m appears to
be a nesting level. Removing 'm' from any lines results in the reported
problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24965
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/24965] Wrong file name in error message
2005-11-21 0:57 [Bug fortran/24965] New: Wrong file name in error message schnetter at aei dot mpg dot de
` (4 preceding siblings ...)
2007-06-16 21:08 ` dfranke at gcc dot gnu dot org
@ 2007-06-22 19:55 ` dfranke at gcc dot gnu dot org
2007-07-28 12:55 ` fxcoudert at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-06-22 19:55 UTC (permalink / raw)
To: gcc-bugs
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24965
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/24965] Wrong file name in error message
2005-11-21 0:57 [Bug fortran/24965] New: Wrong file name in error message schnetter at aei dot mpg dot de
` (5 preceding siblings ...)
2007-06-22 19:55 ` dfranke at gcc dot gnu dot org
@ 2007-07-28 12:55 ` fxcoudert at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-07-28 12:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from fxcoudert at gcc dot gnu dot org 2007-07-28 12:55 -------
Closing, unless Erik can tell us more about how the files were prepared.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24965
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-07-28 12:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-21 0:57 [Bug fortran/24965] New: Wrong file name in error message schnetter at aei dot mpg dot de
2005-11-21 0:59 ` [Bug fortran/24965] " schnetter at aei dot mpg dot de
2005-11-22 8:21 ` fxcoudert at gcc dot gnu dot org
2007-05-18 13:01 ` dfranke at gcc dot gnu dot org
2007-06-03 3:27 ` jvdelisle at gcc dot gnu dot org
2007-06-16 21:08 ` dfranke at gcc dot gnu dot org
2007-06-22 19:55 ` dfranke at gcc dot gnu dot org
2007-07-28 12:55 ` fxcoudert at gcc dot gnu dot org
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).