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 1F3A63857C5B for ; Thu, 13 Aug 2020 18:58:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1F3A63857C5B Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07DIX0FZ033235; Thu, 13 Aug 2020 14:58:34 -0400 Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com with ESMTP id 32t93thrgu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Aug 2020 14:58:34 -0400 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 07DIoKfN024109; Thu, 13 Aug 2020 18:58:33 GMT Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by ppma05wdc.us.ibm.com with ESMTP id 32skp9maq5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Aug 2020 18:58:33 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 07DIwWj254657440 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Aug 2020 18:58:32 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B790AB2064; Thu, 13 Aug 2020 18:58:32 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4E3D2B205F; Thu, 13 Aug 2020 18:58:32 +0000 (GMT) Received: from [9.160.79.236] (unknown [9.160.79.236]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 13 Aug 2020 18:58:32 +0000 (GMT) Subject: Re: [PATCH v2] rs6000: ICE when using an MMA type as a function param or return value [PR96506] From: Peter Bergner To: Segher Boessenkool Cc: Bill Schmidt , GCC Patches References: <397d63db-9190-e875-44a9-b165964a5199@linux.ibm.com> <20200812020028.GP6753@gate.crashing.org> <0105dcce-8dc7-efe8-97a6-9f3afe10d6ff@linux.ibm.com> <20200813010024.GD6753@gate.crashing.org> Message-ID: <42c64e56-0223-daf8-409d-8253e030b14c@linux.ibm.com> Date: Thu, 13 Aug 2020 13:58:31 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-13_15:2020-08-13, 2020-08-13 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 malwarescore=0 adultscore=0 mlxscore=0 bulkscore=0 clxscore=1015 lowpriorityscore=0 mlxlogscore=800 impostorscore=0 phishscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008130131 X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2020 18:58:36 -0000 On 8/12/20 8:59 PM, Peter Bergner wrote: > On 8/12/20 8:00 PM, Segher Boessenkool wrote: >> On Wed, Aug 12, 2020 at 03:32:18PM -0500, Peter Bergner wrote: > Ok, how about this comment then? > > @@ -6444,8 +6444,30 @@ machine_mode > rs6000_promote_function_mode (const_tree type ATTRIBUTE_UNUSED, > machine_mode mode, > int *punsignedp ATTRIBUTE_UNUSED, > - const_tree, int) > + const_tree, int for_return) > { > + /* Warning: this is a static local variable and not always NULL! > + This function is called multiple times for the same function > + and return value. PREV_FUNC is used to keep track of the > + first time we encounter a function's return value in order > + to not report an error with that return value multiple times. */ > + static struct function *prev_func = NULL; Approved offline, so I pushed this to trunk. Thanks! Are we ok to backport this to GCC 10? If you don't want this trickery in GCC 10, we could just backport the param handling which doesn't use the trickery and leave the return value unhandled. Peter