This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41059] New: -fwhole-file and error messages
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Aug 2009 17:04:26 -0000
- Subject: [Bug fortran/41059] New: -fwhole-file and error messages
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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