https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011
Bug 40011 depends on bug 33097, which changed state.
Bug 33097 Summary: Function decl trees without proper argument list
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33097
What|Removed |Added
--- Comment #71 from burnus at gcc dot gnu dot org 2010-07-26 09:53 ---
Subject: Bug 40011
Author: burnus
Date: Mon Jul 26 09:53:19 2010
New Revision: 162531
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162531
Log:
Add file forgotten in commit Rev. 162500
2010-07-24 Tobias
--- Comment #72 from burnus at gcc dot gnu dot org 2010-07-26 13:15 ---
(In reply to comment #70)
With the patch of PR 40873 comment 18 applied [...]
There is now a new patch which fixes tons of issues including the test case of
comment 0 number 4, but not the one from comment 47.
--- Comment #70 from burnus at gcc dot gnu dot org 2010-07-25 10:11 ---
Are there still remaining issues, and if so which? I think this PR gets too
long to have an overview...
I only found the one in comment 47: Works -fno-whole-file but fails otherwise
with an ICE in fold_convert_loc,
--- Comment #61 from jv244 at cam dot ac dot uk 2010-07-24 08:24 ---
(In reply to comment #60)
it seems possible to retain only the first 60498 lines of all.f90 (till the
end
of module fft_tools), and add END to get a much smaller testcase...
I've started a delta reduction, I
--- Comment #62 from jv244 at cam dot ac dot uk 2010-07-24 11:10 ---
a testcase...
cat bug.f90
SUBROUTINE fft_3d ( fft_type, fft_in_place, fsign, scale, n, zin, zout )
CALL fftsg3d ( fft_in_place, fsign, scale, n, zin, zout )
END SUBROUTINE fft_3d
SUBROUTINE fft_1dm (
--- Comment #63 from jv244 at cam dot ac dot uk 2010-07-24 11:14 ---
even better testcase... no mismatching arguments:
SUBROUTINE fft_3d ( )
CALL fftsg3d ()
END SUBROUTINE fft_3d
SUBROUTINE fft_1dm ( )
END SUBROUTINE fft_1dm
SUBROUTINE fftsg3d ( )
CALL mltfftsg ( )
END
--- Comment #64 from burnus at gcc dot gnu dot org 2010-07-24 11:31 ---
Reduced a tiny bit more. If one swaps one and two (functions or use) it
works - if one swaps both, it fails again. Wild guess: gfortran does not
properly walk the tree.
Failure with -fwhole-file:
/tmp/ccN7F1tB.o:
--- Comment #65 from burnus at gcc dot gnu dot org 2010-07-24 13:08 ---
(In reply to comment #64)
Failure with -fwhole-file:
/tmp/ccN7F1tB.o: In function `__mod_MOD_four':
test.f90:(.text+0x3): undefined reference to `one_'
If one sets a breakpoint in gfc_create_function_decl,
--- Comment #66 from rguenther at suse dot de 2010-07-24 13:46 ---
Subject: Re: Problems with -fwhole-file
On Sat, 24 Jul 2010, burnus at gcc dot gnu dot org wrote:
--- Comment #64 from burnus at gcc dot gnu dot org 2010-07-24 11:31
---
Reduced a tiny bit more. If
--- Comment #67 from burnus at gcc dot gnu dot org 2010-07-24 14:08 ---
(In reply to comment #66)
Failure with -fwhole-file:
/tmp/ccN7F1tB.o: In function `__mod_MOD_four':
test.f90:(.text+0x3): undefined reference to `one_'
To diagnose these kind of problems look at
--- Comment #68 from burnus at gcc dot gnu dot org 2010-07-24 16:32 ---
Subject: Bug 40011
Author: burnus
Date: Sat Jul 24 16:32:11 2010
New Revision: 162500
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162500
Log:
2010-07-24 Tobias Burnus bur...@net-b.de
PR
--- Comment #69 from jvdelisle at gcc dot gnu dot org 2010-07-25 01:21
---
Great detective work folks! The sneaky bugs usually are simple to fix.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011
--- Comment #59 from jv244 at cam dot ac dot uk 2010-07-23 22:15 ---
I'm trying a recent trunk (162490), and I'm still observing that -fwhole-file
causing linking errors. I have no easy testcase, the way to reproduce is:
download
--- Comment #60 from jv244 at cam dot ac dot uk 2010-07-23 22:55 ---
(In reply to comment #59)
I have no easy testcase
it seems possible to retain only the first 60498 lines of all.f90 (till the end
of module fft_tools), and add END to get a much smaller testcase...
--
--- Comment #58 from dfranke at gcc dot gnu dot org 2010-07-18 20:49
---
Subject: Bug 40011
Author: dfranke
Date: Sun Jul 18 20:49:30 2010
New Revision: 162287
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162287
Log:
gcc/fortran/:
2010-07-18 Daniel Franke
--- Comment #56 from jv244 at cam dot ac dot uk 2010-05-26 13:13 ---
(In reply to comment #55)
Subject: Bug 40011
Author: pault
Date: Wed May 26 05:11:04 2010
New Revision: 159852
I'm still having linking problems with -fwhole-file on the single source file
version of CP2K. Will
--- Comment #57 from dominiq at lps dot ens dot fr 2010-05-26 14:52 ---
Author: pault
Date: Wed May 26 05:11:04 2010
New Revision: 159852
The original code of pr40440 and the reduced test of comment #47 still ICE:
(gdb) run -fwhole-file pr40440_red.f90
Starting program:
--- Comment #55 from pault at gcc dot gnu dot org 2010-05-26 05:11 ---
Subject: Bug 40011
Author: pault
Date: Wed May 26 05:11:04 2010
New Revision: 159852
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=159852
Log:
2010-05-26 Paul Thomas pa...@gcc.gnu.org
PR
--- Comment #53 from jv244 at cam dot ac dot uk 2010-05-03 10:57 ---
testcase in comment #40 now works. Comment #42 still fails.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011
--- Comment #54 from jvdelisle at gcc dot gnu dot org 2010-05-03 19:24
---
We should get the case in comment 40 added to the test suite if not already so
we do not regress it later.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011
--- Comment #51 from jv244 at cam dot ac dot uk 2009-12-09 11:50 ---
still failing with current trunk, also leading to miscomples (see PR38913). As
a consequence, should one disable -fwhole-file (and consequently -flto) for
Fortran before release?
--
jv244 at cam dot ac dot uk
--- Comment #52 from rguenther at suse dot de 2009-12-09 11:52 ---
Subject: Re: Problems with -fwhole-file
On Wed, 9 Dec 2009, jv244 at cam dot ac dot uk wrote:
--- Comment #51 from jv244 at cam dot ac dot uk 2009-12-09 11:50 ---
still failing with current trunk, also
--- Comment #50 from jv244 at cam dot ac dot uk 2009-10-11 12:45 ---
As expected, the testcases in comment #40 and comment #42 now also fail at '-O2
-flto'
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011
--- Comment #47 from dominiq at lps dot ens dot fr 2009-08-26 10:32 ---
Created an attachment (id=18427)
-- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18427action=view)
Self contained reduced test for pr40440
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011
--- Comment #48 from dominiq at lps dot ens dot fr 2009-08-26 10:34 ---
are there issues other than the ones reported in comment #44
I have opened pr41056 and pr41059 for other problems. There are ICEs for the
original test in pr40440 (with external iso_varying_string.mod, but not if
--- Comment #49 from dominiq at lps dot ens dot fr 2009-08-26 10:35 ---
Finally the last time -fwhole-file was the default, -fno-whole-file, it was
not working.
Please read: Finally the last time -fwhole-file was the default,
-fno-whole-file was not working.
--
--- Comment #44 from jv244 at cam dot ac dot uk 2009-08-03 10:12 ---
Just for completeness, current trunk still fails on the testcases in comment
#40 and comment #42.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011
--- Comment #43 from pault at gcc dot gnu dot org 2009-08-01 13:45 ---
Subject: Bug 40011
Author: pault
Date: Sat Aug 1 13:45:12 2009
New Revision: 150333
URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=150333
Log:
2009-08-01 Paul Thomas pa...@gcc.gnu.org
PR
--- Comment #42 from jv244 at cam dot ac dot uk 2009-07-28 07:37 ---
another issue I found is this:
gfortran -fwhole-file test.f90
/tmp/cciOiaMB.o: In function `__m_MOD_b':
test.f90:(.text+0xa): undefined reference to `c_'
collect2: ld returned 1 exit status
cat test.f90
SUBROUTINE
--- Comment #41 from rguenth at gcc dot gnu dot org 2009-07-26 21:23
---
3323 gcc_assert (TYPE_CONTEXT (decl) == NULL_TREE
3324 || TYPE_CONTEXT (decl) ==
sym-ns-proc_name-backend_decl);
3325 gcc_assert (DECL_CONTEXT (TYPE_STUB_DECL (decl)) ==
--- Comment #40 from jv244 at cam dot ac dot uk 2009-07-25 16:53 ---
(In reply to comment #38)
Too large, not reducing.
since you were so kind fixing PR40005, I felt some obligation ;-)
MODULE replica_types
TYPE replica_env_type
END TYPE replica_env_type
CONTAINS
SUBROUTINE
--- Comment #36 from rguenth at gcc dot gnu dot org 2009-07-24 10:24
---
With the newest whole-file patch I instead get
#1 0x087a1c89 in tree_check_failed (node=0xb6e9fcb0,
file=0x8b9d398 /home/richard/src/trunk/gcc/fortran/trans-types.c,
line=2010, function=0x8b9da9d
--- Comment #37 from rguenth at gcc dot gnu dot org 2009-07-24 10:27
---
We then get to the next ICE ...
(gdb) up
#1 0x0819bfaa in gfc_create_module_variable (sym=0x22cb3750)
at /home/richard/src/trunk/gcc/fortran/trans-decl.c:3327
3327 gcc_assert (TYPE_CONTEXT (decl) ==
--- Comment #38 from rguenth at gcc dot gnu dot org 2009-07-24 10:56
---
Too large, not reducing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011
--- Comment #39 from jv244 at cam dot ac dot uk 2009-07-24 11:29 ---
(In reply to comment #36)
All of gfortran.h seems to be ignorant of the GC - which means we may
not garbage collect while the FE is still running, so all calls to
cgraph_finalize_function should have true as their
--- Comment #34 from jv244 at cam dot ac dot uk 2009-07-24 05:39 ---
Testing paul's latest patch at
http://gcc.gnu.org/ml/fortran/2009-07/msg00202.html
on the latest all file CP2K (see also PR40005)
http://www.pci.uzh.ch/vandevondele/tmp/CP2K_2009-05-01.f90.gz
I get the following
--- Comment #35 from jv244 at cam dot ac dot uk 2009-07-24 05:48 ---
(In reply to comment #34)
I won't be able to reduce this failure for the next 10 days or so.
as a PS, the multiple-file compilation of trunk cp2k goes fine.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011
--- Comment #33 from rguenth at gcc dot gnu dot org 2009-06-14 16:58
---
I am willing to help with analyzing/fixing middle-end problems with
-fwhole-file,
but it would be nice to have some of the progression pieces in trunk to do so
;)
That said - I'm currently trying to hook up LTO
--- Comment #31 from dominiq at lps dot ens dot fr 2009-06-02 09:29 ---
With the patch in comment #28, I have a dozen new ICEs in my test suite. They
seems to be in two classes:
[ibook-dhum] f90/bug% cat pr33295.f90
module A
type A_type
real comp
end type
end module A
module B
--- Comment #32 from dominiq at lps dot ens dot fr 2009-06-02 12:32 ---
I think the following code:
function CHECK_INTEGER4_RANK1 (EXPECTED, COMPUTED)
integer(4), intent(in), dimension(:) :: EXPECTED
integer(4), intent(in), dimension(:) :: COMPUTED
logical ::
--- Comment #28 from pault at gcc dot gnu dot org 2009-06-01 18:00 ---
Created an attachment (id=17942)
-- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17942action=view)
A progression of -fwhole-file
This patch is as far as I have got. It incorporates module procedures and this
is
--- Comment #29 from jv244 at cam dot ac dot uk 2009-06-01 19:34 ---
(In reply to comment #28)
Created an attachment (id=17942)
-- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17942action=view) [edit]
A progression of -fwhole-file
This patch is as far as I have got.
this seems
--- Comment #30 from jv244 at cam dot ac dot uk 2009-06-01 19:43 ---
Created an attachment (id=17944)
-- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17944action=view)
testcase
attached is a testcase, this actually causes a segfault outside of the build
infrastructure, but consumes
--- Comment #27 from pault at gcc dot gnu dot org 2009-05-30 08:27 ---
(In reply to comment #25)
types that are identical
I'm not sure this is related, but note comment #8. Even identical types are
not
identical, unless they are sequence type.
Joost,
No, this is not related.
--- Comment #24 from pault at gcc dot gnu dot org 2009-05-29 15:33 ---
(In reply to comment #23)
I've added a 'related' PR40275 on -combine not working for Fortran. I think
that as soon as the -fwhole-file patch is added (default or not yet ;-) there
would be interest in -combine
--- Comment #25 from jv244 at cam dot ac dot uk 2009-05-29 16:34 ---
(In reply to comment #24)
However, there are some
problems involving ICEs dues to different backend_decls being used for derived
types that are identical
I'm not sure this is related, but note comment #8. Even
--- Comment #26 from burnus at gcc dot gnu dot org 2009-05-29 18:42 ---
Even identical types are not identical, unless they are sequence type.
... or BIND(C)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011
--- Comment #21 from burnus at gcc dot gnu dot org 2009-05-27 13:02 ---
Regarding -fwhole-file issues, see also PR 40176 comment 5 (endless loop for
invalid program with -fwhole-file).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011
--- Comment #22 from dominiq at lps dot ens dot fr 2009-05-27 14:05 ---
(In reply to comment #21)
Regarding -fwhole-file issues, see also PR 40176 comment 5 (endless loop for
invalid program with -fwhole-file).
My post in PR 40176 #5 was ambiguous: the infinite loop does not need the
--- Comment #23 from jv244 at cam dot ac dot uk 2009-05-27 17:51 ---
I've added a 'related' PR40275 on -combine not working for Fortran. I think
that as soon as the -fwhole-file patch is added (default or not yet ;-) there
would be interest in -combine doing the right thing.
--
--- Comment #20 from jv244 at cam dot ac dot uk 2009-05-25 06:13 ---
(In reply to comment #19)
It's good news that cp2k is now OK - did the performance improve?
I didn't check that, I suspect that, since everything is module based, it needs
the stuff for module procedure inlining
--- Comment #19 from pault at gcc dot gnu dot org 2009-05-22 13:40 ---
(In reply to comment #18)
the patch posted here:
http://gcc.gnu.org/ml/fortran/2009-05/msg00244.html
allows cp2k in its single source file form, 640klines as made available in
PR40005, to compile with
--- Comment #18 from jv244 at cam dot ac dot uk 2009-05-17 05:11 ---
the patch posted here:
http://gcc.gnu.org/ml/fortran/2009-05/msg00244.html
allows cp2k in its single source file form, 640klines as made available in
PR40005, to compile with -fwhole-file (using the ulimit -s unlimited
--- Comment #17 from dominiq at lps dot ens dot fr 2009-05-08 14:09 ---
Thanks to the second program in
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/c6621b97f448b516#
I think I have found a false positive for -fwhole-file (unpatched):
Implicit None
--- Comment #15 from dfranke at gcc dot gnu dot org 2009-05-07 18:00
---
There's a new ICE with -fwhole-file that crept in since yesterday (20090505,
using the patch in http://gcc.gnu.org/ml/fortran/2009-05/msg00056.html).
I'll try to get a reduced testcase.
--
dfranke at gcc dot
--- Comment #16 from dfranke at gcc dot gnu dot org 2009-05-07 18:34
---
$ cat ice.f90
MODULE module_foo
TYPE :: foo_node
TYPE(foo_node_private), POINTER :: p
END TYPE
TYPE :: foo_node_private
TYPE(foo_node), DIMENSION(-1:1) :: link
END TYPE
TYPE :: foo
--- Comment #9 from dominiq at lps dot ens dot fr 2009-05-05 07:04 ---
Created an attachment (id=17802)
-- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17802action=view)
Full summary for the tests with -fwhole-file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011
--- Comment #10 from dominiq at lps dot ens dot fr 2009-05-05 07:05 ---
After filtering the useless warning with a line
regsub -all (^|\n)cc1: warning: command line option .-fwhole-file. is
valid for Fortran but not for C $text text
gcc/testsuite/lib/prune.expI get:
--- Comment #11 from dominiq at lps dot ens dot fr 2009-05-05 11:33 ---
The summary of the attached file in comment #9 is:
FAIL: gfortran.dg/bounds_check_strlen_1.f90 -O0 (test for excess errors)
FAIL: gfortran.dg/bounds_temporaries_1.f90 -O (test for excess errors)
FAIL:
--- Comment #12 from dominiq at lps dot ens dot fr 2009-05-05 15:57 ---
Reduced test for gfortran.dg/contained_3.f90:
[ibook-dhum] f90/bug% cat contained_3_red.f90
MODULE ksbin1_aux_mod
CONTAINS
FUNCTION binden()
INTEGER :: binden
INTEGER :: setbd
binden = 0
ENTRY
--- Comment #13 from pault at gcc dot gnu dot org 2009-05-05 18:12 ---
(In reply to comment #12)
...snip...
[ibook-dhum] f90/bug% a.out
42
42
Abort
This turns out to be the same bug as that which caused the segfault in
gas_dyn.f90. Use associated procedures
--- Comment #14 from jv244 at cam dot ac dot uk 2009-05-05 19:28 ---
(In reply to comment #13)
I have been thinking hard about type cheating - I am likely to allow it for
std-f77 and legacy, to warn with other standards and fail with -pedantic.
this sounds reasonable. Note the other
--- Comment #1 from pault at gcc dot gnu dot org 2009-05-04 09:10 ---
Dominique,
Thanks for setting this up. I'll poll everybody involved for contributions and
have assigned myself the bug(s).
Cheers
Paul
--
pault at gcc dot gnu dot org changed:
What|Removed
--- Comment #2 from pault at gcc dot gnu dot org 2009-05-04 09:29 ---
see PR40006: allow type cheating for procedures with an implicit interface
--
pault at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #3 from pault at gcc dot gnu dot org 2009-05-04 09:31 ---
...and PR39896 : ICE with -fwhole-file
--
pault at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #4 from dominiq at lps dot ens dot fr 2009-05-04 17:54 ---
With thee patch in http://gcc.gnu.org/ml/fortran/2009-05/msg00056.html without
type cheating, all the ICEs in my tests are gone. It even fixes pr37744!-(it
may give a clue on how to fix it without -fwhole-file).
For
--- Comment #5 from dominiq at lps dot ens dot fr 2009-05-04 21:52 ---
With the patch in http://gcc.gnu.org/ml/fortran/2009-05/msg00056.html
gas_dyn.f90 fails as in commet #0, except for -O1:
[ibook-dhum] lin/test% gfc -O1 -fwhole-file gas_dyn.f90
gas_dyn.f90: In function 'chozdt':
--- Comment #6 from dominiq at lps dot ens dot fr 2009-05-04 22:20 ---
Regtest gives:
=== gfortran Summary ===
# of expected passes117714
# of unexpected failures576
# of expected failures 78
# of unsupported tests 906
for
--- Comment #7 from dominiq at lps dot ens dot fr 2009-05-04 22:44 ---
Also gfortran.dg/contained_3.f90 is miscompiled with -fwhole-file.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011
--- Comment #8 from jv244 at cam dot ac dot uk 2009-05-05 04:18 ---
(In reply to comment #6)
opt/gcc/gcc-4.5-work/gcc/testsuite/gfortran.dg/import6.f90:42.13:
call func1(x)
1
Error: Type mismatch in argument 'param' at (1); passed TYPE(my_type) to
TYPE(my_type)
71 matches
Mail list logo