From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4B0A439960D3; Wed, 3 Feb 2021 14:09:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4B0A439960D3 From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/98904] valgrind error in gfc_trans_assignment_1 during bootstrap Date: Wed, 03 Feb 2021 14:09:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dcb314 at hotmail dot com X-Bugzilla-Status: WAITING 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2021 14:09:06 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98904 --- Comment #10 from David Binderman --- I added the debug lines fprintf( stderr, "%d\n", flag_coarray); fprintf( stderr, "%d\n", lhs_caf_attr.codimension); fprintf( stderr, "%d\n", rhs_caf_attr.codimension); fprintf( stderr, "%d\n", lhs_caf_attr.allocatable); fprintf( stderr, "%d\n", lhs_refs_comp); fprintf( stderr, "%d\n", rhs_caf_attr.allocatable); fprintf( stderr, "%d\n", rhs_refs_comp); around line 11320 of file trans-expr.c, recompiled and re-ran the test. The output from stderr is=20 =3D=3D44799=3D=3D Conditional jump or move depends on uninitialised value(s) =3D=3D44799=3D=3D at 0x525DE53: __vfprintf_internal (in /usr/lib64/libc-= 2.32.so) =3D=3D44799=3D=3D by 0x525EA6B: buffered_vfprintf (in /usr/lib64/libc-2.= 32.so) =3D=3D44799=3D=3D by 0x52491D9: fprintf (in /usr/lib64/libc-2.32.so) =3D=3D44799=3D=3D by 0xFE3B61: gfc_trans_assignment_1(gfc_expr*, gfc_exp= r*, bool, bool, bool, bool) (trans-expr.c:11321) Line 11321 is the second line of debug, so valgrind says lhs_caf_attr.codimension is uninitialised. I also got valgrind output for lines 11322, 11323 and 11325. So it looks to me like the codimension fields and the allocatable fields are not initialised in this case. The next stage may be to find out where those fields are supposed to be initialised and find out why they aren't getting done. I have no familiarity with fortran or its compiler. Perhaps someone would be kind enough to point me in the right direction ?=