From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B60113858C42; Mon, 25 Dec 2023 07:31:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B60113858C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1703489515; bh=ZgB3KbcucXjSQg7IOjOJ/cnZ4LdSKjEcTTbhe57sl5s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xoxHTRQcbz+iSahSecvOyk26CdNWO9GFoREc49gJEYLIle9ZnWe5gCoE4R0Hx0fv2 0pQDBWRVUlsoSzQ6TaMk5XPXuXdKIM4GeSUNLf/ElP0q2gg/X3m9LJblUUzwor5ezq eIdQgeLnT8TsQTsp00agCLveWo98YirpyZl2x39I= From: "lipeng.zhu at intel dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/113005] 'libgomp.fortran/rwlock_1.f90', 'libgomp.fortran/rwlock_3.f90' execution test timeouts Date: Mon, 25 Dec 2023 07:31:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: testsuite X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: lipeng.zhu at intel dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113005 --- Comment #13 from Lipeng Zhu --- OK, I think I find the root cause of this error, when thread number greater than 1000, the file_name =3D 1000_tst.dat, character(11) will overflow. Thi= s will generate the same file_name like ***_tst.dat.=20 diff --git a/libgomp/testsuite/libgomp.fortran/rwlock_1.f90 b/libgomp/testsuite/libgomp.fortran/rwlock_1.f90 index f90ecbeb00f..1c271ae031d 100644 --- a/libgomp/testsuite/libgomp.fortran/rwlock_1.f90 +++ b/libgomp/testsuite/libgomp.fortran/rwlock_1.f90 @@ -7,13 +7,12 @@ program main use omp_lib implicit none integer:: unit_number, v1, v2, i - character(11) :: file_name + character(16) :: file_name character(3) :: async =3D "no" !$omp parallel private (unit_number, v1, v2, file_name, async, i) do i =3D 0, 100 unit_number =3D 10 + omp_get_thread_num () - write (file_name, "(I3, A)") unit_number, "_tst.dat" - file_name =3D adjustl(file_name) + write (file_name, "(I5.5, A)") unit_number, "_tst.dat" open (unit_number, file=3Dfile_name, asynchronous=3D"yes") ! call inquire with file parameter to test find_file in unix.c inquire (file=3Dfile_name, asynchronous=3Dasync)=