[Bug fortran/81827] Large compile time with derived-type rrays

pault at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Oct 16 11:32:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81827

--- Comment #24 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Luke Robison from comment #23)
> (In reply to Luke Robison from comment #22)
> > (In reply to Luke Robison from comment #21)
> > > (1) Changing some or all of the "type(levelNN)" definitions to
> > > "class(levelNN)" definitions
> > > (2) Changing from "allocatable" to "pointer"
> > > 
> > 
> > Although these work-arounds seem sufficient for this test case, they did not
> > alleviate the problem in the original program.  We are still unable to use
> > recent gfortran versions on our main codebase due to this error.
> > 
> > 
> > Luke
> 
> Correction: I found an additional few declarations which I had not
> converted.  The work-around I describe above does reduce compile time to a
> feasible (yet still slow) level.  Compiling with -O3 is substantially slower
> than -O0, despite my module containing only type declarations (no
> procedures).

Hi Luke,

I have a rather more conclusive fix in mind, which will greatly reduce the code
cascade that the declarations produce.

At present, the copy and finalize functions nest the copy and deallocate for
the allocatable components in line. The better approach is to call the
corresponding vtable functions.

I'll give it a whirl this weekend.

Regards

Paul


More information about the Gcc-bugs mailing list