public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/41059] New: -fwhole-file and error messages
@ 2009-08-13 17:04 dominiq at lps dot ens dot fr
2010-03-28 20:50 ` [Bug fortran/41059] " pault at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-08-13 17:04 UTC (permalink / raw)
To: gcc-bugs
At revision 150706 -fwhole-file change the errors messages in an unexpected
(non necessary?) way.
So far I have analyzed two cases:
(1) the order of messages is changed as in the following test
program main
integer,parameter :: k = selected_int_kind (range (0_8) + 1)
integer(kind=k), dimension(3) :: ik
ik = (/ -1, 1, -3 /)
call sub_ik(ik(1:3:2))
if (any(ik /= (/ 3, 1, 2 /))) call abort
end program main
subroutine sub_ik(i)
integer,parameter :: k = selected_int_kind (range (0_8) + 1)
integer(kind=k), dimension(2) :: i
if (i(1) /= -1) call abort
if (i(2) /= -3) call abort
i(1) = 3
i(2) = 2
end subroutine sub_ik
The difference between wo/with -fwhole-file is:
--- int_no 2009-07-28 13:09:04.000000000 +0200
+++ int_wf 2009-07-28 13:09:19.000000000 +0200
@@ -8,11 +8,6 @@ internal_pack_3_db.f90:11.16:
call sub_ik(ik(1:3:2))
1
Error: Syntax error in argument list at (1)
-internal_pack_3_db.f90:10.2:
-
- ik = (/ -1, 1, -3 /)
- 1
-Error: Incompatible ranks 0 and 1 in assignment at (1)
internal_pack_3_db.f90:17.16:
integer(kind=k), dimension(2) :: i
@@ -28,3 +23,8 @@ internal_pack_3_db.f90:21.3:
i(2) = 2
1
Error: 'i' at (1) is not a variable
+internal_pack_3_db.f90:10.2:
+
+ ik = (/ -1, 1, -3 /)
+ 1
+Error: Incompatible ranks 0 and 1 in assignment at (1)
This is a minor inconvenience when I compare the results of my test suite as it
give spurious differences.
(2) Some messages are repeated instead of different messages given without
-fwhole-file. This explain for instance the failure of
gcc/testsuite/gfortran.dg/entry_17.f90:
@@ -3,10 +3,10 @@
character(*) :: bar3 ! { dg-warning "Obsolescent feature" }
1
Warning: Obsolescent feature: CHARACTER(*) function 'bar3' at (1)
-/opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/entry_17.f90:27.57:
+/opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/entry_17.f90:20:
-end function test3 ! { dg-warning "Obsolescent feature" }
- 1
+function test3() ! { dg-warning "Obsolescent feature" }
+1
Warning: Obsolescent feature: CHARACTER(*) function 'master.2.test3' at (1)
/opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/entry_17.f90:20:
@@ -33,10 +33,10 @@ Warning: Extension: Function test5 at (1
function test6() ! { dg-warning "Obsolescent feature|returning variables of
dif
1
Warning: Extension: Function test6 at (1) with entries returning variables of
different string lengths
-/opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/entry_17.f90:55.57:
+/opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/entry_17.f90:48:
-end function test6 ! { dg-warning "Obsolescent feature" }
- 1
+function test6() ! { dg-warning "Obsolescent feature|returning variables of
dif
+1
Warning: Obsolescent feature: CHARACTER(*) function 'master.5.test6' at (1)
/opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/entry_17.f90:48:
Note that -fwhole-file fixes pr37744 (see comment #5).
--
Summary: -fwhole-file and error messages
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dominiq at lps dot ens dot fr
GCC build triplet: *-apple-darwin9
GCC host triplet: *-apple-darwin9
GCC target triplet: *-apple-darwin9
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41059
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/41059] -fwhole-file and error messages
2009-08-13 17:04 [Bug fortran/41059] New: -fwhole-file and error messages dominiq at lps dot ens dot fr
@ 2010-03-28 20:50 ` pault at gcc dot gnu dot org
2010-03-30 17:13 ` dominiq at lps dot ens dot fr
2010-07-29 8:12 ` burnus at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pault at gcc dot gnu dot org @ 2010-03-28 20:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pault at gcc dot gnu dot org 2010-03-28 20:50 -------
Dear Dominiq,
Unfortunately, what you report here is a consequence of the way in which
-fwhole-file has to be implemented. The order changes because of the need to
resolve called procedures and I can well believe that the number of error
messages might change, even though namespaces are tagged when they have been
resolved. I guess that we could tag every line for errors but this would need a
bigger change to error.c than I am prepared to embark on.
My inclination is WONTFIX but I would be happy to discuss.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41059
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/41059] -fwhole-file and error messages
2009-08-13 17:04 [Bug fortran/41059] New: -fwhole-file and error messages dominiq at lps dot ens dot fr
2010-03-28 20:50 ` [Bug fortran/41059] " pault at gcc dot gnu dot org
@ 2010-03-30 17:13 ` dominiq at lps dot ens dot fr
2010-07-29 8:12 ` burnus at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens dot fr @ 2010-03-30 17:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dominiq at lps dot ens dot fr 2010-03-30 17:13 -------
> ... . I guess that we could tag every line for errors but this would need a
> bigger change to error.c than I am prepared to embark on.
I understand that! Although there is no emergency to clean up the error
handling in gfortran, someday someone will have to do it, for instance to
remove the ICE after legitimate errors (see pr36192, pr37744, pr38568, and
pr43266).
In addition, if someday -fwhole-file becomes the default, the testsuite will
have to adjusted to handle the change in the type and/or place of the messages.
> My inclination is WONTFIX but I would be happy to discuss.
I would prefer to leave this pr open (could you confirm it?) until these issues
are resolved. This will probably not prevent duplicate reports, but at least it
will keep some memory of the problems.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41059
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/41059] -fwhole-file and error messages
2009-08-13 17:04 [Bug fortran/41059] New: -fwhole-file and error messages dominiq at lps dot ens dot fr
2010-03-28 20:50 ` [Bug fortran/41059] " pault at gcc dot gnu dot org
2010-03-30 17:13 ` dominiq at lps dot ens dot fr
@ 2010-07-29 8:12 ` burnus at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-07-29 8:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from burnus at gcc dot gnu dot org 2010-07-29 08:11 -------
Close as WONTFIX as suggested by Dominique.
The trunk now uses -fwhole-file and some of the warning messages have been
fixed while others have been added as dg-warning. The commit was Rev.162491:
http://gcc.gnu.org/viewcvs?view=revision&revision=162491
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41059
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-29 8:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-13 17:04 [Bug fortran/41059] New: -fwhole-file and error messages dominiq at lps dot ens dot fr
2010-03-28 20:50 ` [Bug fortran/41059] " pault at gcc dot gnu dot org
2010-03-30 17:13 ` dominiq at lps dot ens dot fr
2010-07-29 8:12 ` burnus 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).