]> git.ipfire.org Git - thirdparty/gcc.git/commit
gfortran.dg/pr68078.f90: Avoid increasing RLIMIT_AS
authorTobias Burnus <tobias@codesourcery.com>
Thu, 22 Apr 2021 09:05:17 +0000 (11:05 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Thu, 22 Apr 2021 09:14:18 +0000 (11:14 +0200)
commitfaf7d413a3f3337be1a3ac5cdf33e0e3b87b426e
tree718731d41bf2fe2ee43ffb30420fc14f0a886deb
parent5668843346c74cabf830e46b45fad24db4566fd6
gfortran.dg/pr68078.f90: Avoid increasing RLIMIT_AS

pr68078.f90 tests out-of-memory handling and calls set_vm_limit to set the
soft limit.  However, setrlimit was then called with hard limit RLIM_INFINITY,
which failed when the current hard limit was lower.

gcc/testsuite/
* gfortran.dg/set_vm_limit.c (set_vm_limit): Call getrlimit, use
obtained hard limit, and only call setrlimit if new softlimit is lower.
gcc/testsuite/gfortran.dg/set_vm_limit.c