From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 687183858D37; Fri, 3 Nov 2023 10:08:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 687183858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699006084; bh=wedMNTCsufRqdU5WfqH+MYKtQKYn4QH+YydVN7lfLxs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cC/4OGimEeEbg6RYbj/iZYJ2qvDe1lNxOgnvcb2jmcA1qpQrj0buAD3xLH1Z1TaHS IXKurJzpbJLDHj+hxu3++kFBt51Ey7lNj4lihnRvUHKUZ3bqZzyW8Qqm9jVWuyqOoX 8kpdl49/1eWjdgWa/+XBiJKrw/LwipfQSenm3I2w= From: "xry111 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/112364] calloc used incorrectly Date: Fri, 03 Nov 2023 10:08:04 +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: easyhack, internal-improvement X-Bugzilla-Severity: normal X-Bugzilla-Who: xry111 at gcc dot gnu.org 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 #5 from Xi Ruoyao --- (In reply to Martin Uecker from comment #4) > Interesting. But independently of alignment, the description of calloc ma= kes > it clear that it allocates an array of nmemb objects of size x. So in any > case I think the code should be changed accordingly, which seems simple > enough. Yes, it definitely needs a change.=