From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F33883858CD1; Fri, 3 Nov 2023 16:03:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F33883858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699027432; bh=UzgUzDg3K8WwKt3SJe4AQrOhivRTjDR5+kkYa9X3LaI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Zri8ZhjmXaHYnKHmLjWOkBU59x4hayfxz4Wxu+qwfylVa3Bh8BldHVCiSzw+o2V2A pqJXTbt9jUB1xYcTnkibN66MfOeNbW/yIbGhlm3M+Ix1MLYoFd7qH1VIln1i0z3/7b f8D6D2EOp7O5LpYv2cY/rByCsn7HDxBB7mn7pmWQ= From: "joseph at codesourcery dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/112364] calloc used incorrectly Date: Fri, 03 Nov 2023 16:03:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: build, diagnostic, easyhack, internal-improvement X-Bugzilla-Severity: normal X-Bugzilla-Who: joseph at codesourcery 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=3D112364 --- Comment #7 from joseph at codesourcery dot com --- I believe "size requested" refers to the product nmemb * size in the case=20 of calloc, so getting the arguments the "wrong" way round does not affect=20 the required alignment. The point of the change was to override DR#075=20 and stop requiring e.g. 1-byte allocations to be suitably aligned for=20 larger types, not to make alignment for calloc depend on more than the=20 product of the two arguments.=