From: Arnaud Charlet Date: Thu, 27 Aug 2020 12:38:35 +0000 (-0400) Subject: [Ada] Error when closing c_stream X-Git-Tag: basepoints/gcc-12~3960 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e40d14622b5ce8771498cdb9cf8cbfe6b71d883;p=thirdparty%2Fgcc.git [Ada] Error when closing c_stream gcc/ada/ * libgnat/s-fileio.adb (Open): Fix setting of Tempfile. --- diff --git a/gcc/ada/libgnat/s-fileio.adb b/gcc/ada/libgnat/s-fileio.adb index b6377e3827d1..c574487b43e6 100644 --- a/gcc/ada/libgnat/s-fileio.adb +++ b/gcc/ada/libgnat/s-fileio.adb @@ -800,9 +800,9 @@ package body System.File_IO is Text_Encoding : Content_Encoding; - Tempfile : constant Boolean := Name = ""; + Tempfile : constant Boolean := Name = "" and Stream = NULL_Stream; -- Indicates temporary file case, which is indicated by an empty file - -- name. + -- name and no specified Stream. Namelen : constant Integer := max_path_len; -- Length required for file name, not including final ASCII.NUL.