From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 2FB673858D38 for ; Fri, 10 Nov 2023 07:52:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2FB673858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2FB673858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699602754; cv=none; b=dROHkD8CSBdtXbDtsf63+oi8P4sXpPT6oEHEcYr4FmtPo8C+Yy/xDfD63UJPx21fuwQAqfcMtYsi5amBO/bCcIb0YYZ2iUBcGXHWtm6oQSqwHGmwgo+GqW4sF69dONmpCPdXWwDowyElFt1yyjFPDfHmc+TnV+CcF9/iYg4SPD8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699602754; c=relaxed/simple; bh=BqBF0voyEdGz9DJENnateXGKisXmvXg48/Kq/Dc+p0c=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=a2aYy9Vs6JpTvtDkUlY32SA87FHiRsqDfTTPc3yWKbQ8hiDadljVmm1FfA7Y2qxzuFTG7jKHpL3J3srWNawxW4iw6uFM+C4hSmDMW7DfHub2XtWx/VEBXshK3yKXGvFvNTQViAS5yeGkEFSLgwHLKNtstrCj7thyvQ0maZyIrMI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AA7j9xX001418 for ; Fri, 10 Nov 2023 07:52:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=htGhx+RemuUpMEBE8AendYyh5GN0Ixhtfv3MwYUViIA=; b=GtpF6iBTs6tHrcTCsgqjeK8fcp4p4alpsRlQFmG5G9+S1WWs2sQbBi68KPN4UBwj+WVb yh8PrkRBUUfphs7mTkrffZ8nt4Uw3MpiMOwRRBM9ziEYwtXfMCxVFYt+EpRxwPdZKT8R S4XYSDSEFMhkfv7PxLEASvXF4xxhjMg9Uel84tsecwKtmFDLmYyVCMLYID/xV9tWxLLK wtS8gUsnl/h2KXh1vHuTzf3DhUJ7hWxHbi8c3vj3h1sxuOYjJxgzNLbRNpts703DVWX4 AWV/mhAcZFb6JhBotPq8a8ESbDFIF6RejYJunzopyvGri7DN9v/3wVzKd6CpFcSYPV0o dw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u9gda8b67-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 10 Nov 2023 07:52:32 +0000 Received: from m0353724.ppops.net (m0353724.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3AA7jMEW003180 for ; Fri, 10 Nov 2023 07:52:32 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u9gda8b62-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Nov 2023 07:52:32 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3AA4QtCL019224; Fri, 10 Nov 2023 07:52:31 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3u7w249ed8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Nov 2023 07:52:31 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3AA7qTgI43450866 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Nov 2023 07:52:29 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9209520040; Fri, 10 Nov 2023 07:52:29 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A27F42004B; Fri, 10 Nov 2023 07:52:28 +0000 (GMT) Received: from [9.197.249.103] (unknown [9.197.249.103]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 10 Nov 2023 07:52:28 +0000 (GMT) Message-ID: Date: Fri, 10 Nov 2023 15:52:27 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH, expand] Call misaligned memory reference in expand_builtin_return [PR112417] To: Richard Biener Cc: gcc-patches References: Content-Language: en-US From: HAO CHEN GUI In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 1HqtGKR7OW-DaIRf0roDDrg-kPtza5bY X-Proofpoint-ORIG-GUID: 5M0WEgmRjowMKVEq78UD-Fo2NAm2gaJz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-10_03,2023-11-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 suspectscore=0 phishscore=0 mlxlogscore=907 spamscore=0 clxscore=1015 mlxscore=0 adultscore=0 bulkscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311100064 X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Richard, Thanks so much for your comments. 在 2023/11/9 19:41, Richard Biener 写道: > I'm not sure if the testcase is valid though? > > @defbuiltin{{void} __builtin_return (void *@var{result})} > This built-in function returns the value described by @var{result} from > the containing function. You should specify, for @var{result}, a value > returned by @code{__builtin_apply}. > @enddefbuiltin > > I don't see __builtin_apply being used here? The prototype of the test case is from "__objc_block_forward" in libobjc/sendmsg.c. void *args, *res; args = __builtin_apply_args (); res = __objc_forward (rcv, op, args); if (res) __builtin_return (res); else ... The __builtin_apply_args puts the return values on stack by the alignment. But the forward function can do anything and return a void* pointer. IMHO the alignment might be broken. So I just simplified it to use a void* pointer as the input argument of "__builtin_return" and skip "__builtin_apply_args". Thanks Gui Haochen