Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kQHWt-0001Jf-Ro for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Oct 2020 22:03:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kQHWs-0005Kk-AF for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Oct 2020 22:03:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kQHWs-0005Kd-3A for pgsql-hackers@lists.postgresql.org; Wed, 07 Oct 2020 22:03:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kQHWq-0007CP-1q for pgsql-hackers@lists.postgresql.org; Wed, 07 Oct 2020 22:03:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 097M3GR32398544; Wed, 7 Oct 2020 18:03:16 -0400 From: Tom Lane To: Noah Misch cc: David Rowley , PostgreSQL Developers Subject: Re: Recent failures on buildfarm member hornet In-reply-to: <2397925.1602107299@sss.pgh.pa.us> References: <1830491.1601944935@sss.pgh.pa.us> <20201007014507.GB1422897@rfd.leadboat.com> <2040113.1602035809@sss.pgh.pa.us> <20201007021941.GD1422897@rfd.leadboat.com> <2233910.1602090798@sss.pgh.pa.us> <20201007212056.GB1498955@rfd.leadboat.com> <2397925.1602107299@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Wed, 07 Oct 2020 17:48:19 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2398542.1602108196.1@sss.pgh.pa.us> Date: Wed, 07 Oct 2020 18:03:16 -0400 Message-ID: <2398543.1602108196@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > I'm tempted to propose the attached small code rearrangement, which > might dissuade the compiler from thinking it can get away with this. > While I concur with your point that an old xlc version might not be > that exciting, there could be other compilers doing the same thing > in the future. After thinking about it a bit more, I'm not even convinced that what xlc seems to be doing is illegal per C spec. There are no sequence points within return list_make2(list_concat(directargs, orderedargs), makeInteger(ndirectargs)); and therefore there's an argument to be made that the compiler doesn't have to care whether any side-effects of list_concat() occur before or after the evaluation of makeInteger(ndirectargs). If the potential side-effects of list_concat() can be disregarded until the end of this statement, then the code change is perfectly legal. Maybe some very careful language-lawyering could prove differently, but it's not as open-and-shut as one could wish. So now I'm thinking that we need this patch anyway, xlc or not. regards, tom lane