From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AF698382EAFC; Fri, 28 Jun 2024 09:08:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AF698382EAFC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1719565705; bh=97JE5/ePHLhHcE2aeCTWolRWY8pWHJynjwP+j7zIN2c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AU4PmAz2TOcR2pq4TK+K71WgwibkbrYUvx7t2paSW+ZUC6VzL2NMQaYJPjpGFhLPZ dDvFmzyNmnpl8L+Df8GcEiDd4Z4VObABm/Ti3vpEKoWpJeNl8iZag+ePG0B3VQbYR8 iwpSKEaBXM7sMGsBoCdfooH4YJGQyLx++lJcX1SA= From: "vehre at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/104130] [12/13 Regression] ICE in gfc_add_class_array_ref, at fortran/class.c:274 since r12-4467-g64f9623765da3306 Date: Fri, 28 Jun 2024 09:08:25 +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: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: vehre at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D104130 Andre Vehreschild changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vehre at gcc dot gnu.org --- Comment #7 from Andre Vehreschild --- ifort/ifx (2024.1.2) accepts the code. My fortran is not very good, but I would expect either a select around the = call to `s` or needing `x` to be of `class(*)`. The latter is what the changed example errors with: program p class(*), pointer :: z(:,:) call s(z) call s(transpose(z)) contains subroutine s(x) bind(c) integer, contiguous :: x(:,:) end end pr104130.f90:3:12: 3 | call s(z) | 1 Error: Type mismatch in argument 'x' at (1); passed CLASS(*) to INTEGER(4) pr104130.f90:4:10: 4 | call s(transpose(z)) | 1 Error: Unlimited polymorphic actual argument at (1) is not matched with eit= her an unlimited polymorphic or assumed type dummy argument=