From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 506223858C2F; Sat, 16 Dec 2023 13:27:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 506223858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702733222; bh=IomniZ1HkAethMqFH8n0mVYBlpdfdKmL+dndDevn4iY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kHKYCdADngkhlRrayboopjxUpU/8ASQYemeXCcUjup6ZBzhpTCt8xBgBibrJ1/o4f ApxvviOk5uabI7hhHCz44yjBq+zF6LS2Q5VExJ+tAMw07RU7T9eQgjFL6W0SS7YMWU VK4Pg479Z3VrbmMhmCsYBgAfBxdJDlkmy1V1XmwU= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/112834] Class array function selector causes chain of syntax and other spurious errors Date: Sat, 16 Dec 2023 13:27:01 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pault 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=3D112834 --- Comment #3 from GCC Commits --- The master branch has been updated by Paul Thomas : https://gcc.gnu.org/g:5ae6f524f5d4ee2ab79ba797fa4901daf90afb25 commit r14-6620-g5ae6f524f5d4ee2ab79ba797fa4901daf90afb25 Author: Paul Thomas Date: Sat Dec 16 13:26:47 2023 +0000 Fortran: Fix problems with class array function selectors [PR112834] 2023-12-16 Paul Thomas gcc/fortran PR fortran/112834 * match.cc (build_associate_name): Fix whitespace issues. (select_type_set_tmp): If the selector is of unknown type, go the SELECT TYPE selector to see if this is a function and, if the result is available, use its typespec. * parse.cc (parse_associate): Again, use the function result if the type of the selector result is unknown. * trans-stmt.cc (trans_associate_var): The expression has to be of type class, for class_target to be true. Convert and fix class functions. Pass the fixed expression. PR fortran/111853 * resolve.cc (gfc_expression_rank): Avoid null dereference. gcc/testsuite/ PR fortran/112834 * gfortran.dg/associate_63.f90 : New test. PR fortran/111853 * gfortran.dg/pr111853.f90 : New test.=