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

--- Comment #8 from Gustavo Hime <gustavo.hime at mpimet dot mpg.de> ---

> 
> I understand the issue.  It isn't a problem with gfortran.
> 

You do not understand the issue, which I made quite clear when reporting the
bug. The code compiles, links and runs if no non-zero option is given to
-finit-real. The code generator is probably doing something "silly" like
attempting to fully unroll a loop of e.g. 2^30 iteration for initializing said
array. It is a compiler bug because the compiler runs out of memory. God only
knows how such a "silly" line of code, involving nothing but allocating static
memory space and filling it with a repeated 8-byte constant, can cause a
compiler to run out of memory. Probably not even He knows if this broken code
cannot manifest itself in other situations, perhaps linked to other bugs,
reported or not.

Moreover, a memory allocation request is a safe operation. A program requests
memory and may or may not get it from the OS. It is the program (i.e. compiler)
responsibility to manage denied memory allocations. It is the programmers
responsibility to make sure no unneeded memory is allocated.

> 
> The compiler did not crash.  Your operating system terminated your
> process because you exhausted the virtual memory available to you.
> The error message even tells you what you have done.

The compiler crashed because it terminated abnormally because it attempted to
use more memory than the machine has without regard for systems limitations
and, most important, without a good reason. The error message does not tell the
programmer what caused the error in the program being compiled (there is none)
nor what caused the compiler to exhaust system memory (which it had no reason
for other than bad implementation).

Are there any maintainers on the gfortran project who can see this? I am going
to reopen the bug once more, but then I wash my hands. For the record, I'm not
wasting my time reporting further bugs in gfortran if this is how the
maintainers deal with the user community. I am one of the few who advocate
gfortran in favour of the commercial alternatives at my institute, but you have
seriously shaken my views just now.

Reply via email to