Dealing with default recursive procedures in Fortran

2018-04-12 Thread Thomas König

Hello world,

with Fortran 2018, recursive is becoming the default. This will likely
have a serious impact on many user codes, which often declare large
arrays which could then overflow stacks, leading to segfaults without
further explanation.

What could we do? A few options, not all mutally exclusive.

We could extend -fmax-stack-var-size so it allocates memory
from the heap in recursive procedures, too, and set this to
some default value.  Of course, it would also have to free them
afterwards, but we manage that for allocatable arrays already.

We could warn when large arrays with sizes known at compile time
are translated.

We could use -fsplit-stack by default. How reliable is that
option? Can it be used, for example, with -fopenmp?
Is it available on all (relevant) platforms?
One drawback would be that this would allow for infinite
recursions to go on for much longer.

A -fcheck=stack option could be added (implemented similar to
-fsplit-stack), to be included in -fcheck=all, which would abort
with a sensible error message instead of a segfault.

Other ideas / options?

Regards

Thomas


gcc-7-20180412 is now available

2018-04-12 Thread gccadmin
Snapshot gcc-7-20180412 is now available on
  ftp://gcc.gnu.org/pub/gcc/snapshots/7-20180412/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 7 SVN branch
with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-7-branch 
revision 259359

You'll find:

 gcc-7-20180412.tar.xzComplete GCC

  SHA256=dcecc9e6a3bf9d66305f3a5d99b2a60cdd2bab275462d775eccc0dbdd195a94a
  SHA1=04502674fe01c24f6c858da88d037893e0619a4d

Diffs from 7-20180405 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-7
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.