This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40873] -fwhole-file -fwhole-program: Wrong decls cause too much to be optimized away
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jul 2010 20:16:15 -0000
- Subject: [Bug fortran/40873] -fwhole-file -fwhole-program: Wrong decls cause too much to be optimized away
- References: <bug-40873-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #19 from burnus at gcc dot gnu dot org 2010-07-24 20:16 -------
And of course the patch won't work out of the box:
$ gfortran -O2 -g gfortran.dg/entry_array_specs_2.f && ./a.out
gfortran.dg/entry_array_specs_2.f:16:0: internal compiler error: in output_die,
at dwarf2out.c:11046
Ditto for gfortran.dg/pr25603.f, gfortran.dg/proc_decl_2.f90,
gfortran.fortran-torture/execute/mystery_proc.f90,
gfortran.fortran-torture/execute/procarg.f90,
gfortran.dg/loc_1.f90, gfortran.dg/value_test.f90,
gfortran.dg/value_tests_f03.f90.
Probably something is wrong with the "current_function_decl = NULL_TREE;" -
hopefully, it is easily fixable and does not require a completely different
approach.
But at least:
(In reply to comment #0)
> the following Polyhedron testcases fail
> ac, aermod, doduc, gas_dyn, linpk, mdbx, rnflow and test_fpu
Using -march=native -ffast-math -funroll-loops -ftree-loop-linear -O3
-fwhole-program -fwhole-file,
*ALMOST ALL* the polyhedron tests succeed - except for gas_dyn and test_fpu
(for which there are still undefined references).
[Using "-g" one also gets issues with polyhedron tests.]
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40873