From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 700DB385735E for ; Tue, 29 Aug 2023 15:35:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 700DB385735E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693323301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p2qesWo2MP22myRgmI8NHFwOrUYwX0XzpceLtyYCMAw=; b=WtknQajLiTTMTmhcmwaJRcrve+J3Qio/h2xb8atpFL/uAe/5BF1nQFzIekyK89rD845uaC McTlBRma9Wri5z2QNFGAPrKpdSWfPH1J7JO1P7RVon2d/UI9mn6HC352H5OjwU9asnUj+W hF7LvGEzTAOKS8ehHeVwmrd2bZrU9go= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-284-IpcSKWAAMNa9ayCTQAxfrw-1; Tue, 29 Aug 2023 11:34:47 -0400 X-MC-Unique: IpcSKWAAMNa9ayCTQAxfrw-1 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-76d9fb2c999so468403085a.0 for ; Tue, 29 Aug 2023 08:34:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693323286; x=1693928086; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=p2qesWo2MP22myRgmI8NHFwOrUYwX0XzpceLtyYCMAw=; b=ZnHZ8i0iQFVDBfQjaX5JcR7v+VZIqKLCzlLWh1Z45qmEE7OOOJcd9vdftFF0svMI7q F0Cd20e+604SH5oA0NMRdhpXwphjnRuCFwePt89iwqbj18ImUReSgQOeXHc9kMRl2Rl7 k09+WNZIs1RZXsdwcqdkvZNhKAqdtQ394hBoiu+w89a7HbM5OY9G2OQqSuFKgZdX5qm1 we4Q9Pl1lPOnF01nh0Q0sZmfWkL1i66Yc42MuZgW7xlTZaLCY5sfdrIh9BGUPo6t2Byf oqWSFhtLpT1fRlaNhlphnQ09xMhCtF80R9NjwHJW7I2mxOkMEi45W5to3cHFHugP616g Z1Zg== X-Gm-Message-State: AOJu0YypN570AxlKwzzBllBrp93h5XcGQuJWpoNU5l1DAA73TzMhp8ug Xsd0G+rN0clk/bCfFS0eHdCDmDwIumhm/L6v0il/12s04vPbjNCIan0ocWlI4cFcjPh3vZLzDVi X8z6C8lXubIy5ATRALg== X-Received: by 2002:a05:620a:2550:b0:768:158a:bc0 with SMTP id s16-20020a05620a255000b00768158a0bc0mr28312823qko.39.1693323286506; Tue, 29 Aug 2023 08:34:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHrZZZGDaSsfjtqp9ELyRtqUdpT2HEyD/ZKBCn6v1OQx/w18m2gjee5alGAOHYTSyDMxQoQwg== X-Received: by 2002:a05:620a:2550:b0:768:158a:bc0 with SMTP id s16-20020a05620a255000b00768158a0bc0mr28312805qko.39.1693323286187; Tue, 29 Aug 2023 08:34:46 -0700 (PDT) Received: from t14s.localdomain (c-76-28-97-5.hsd1.ma.comcast.net. [76.28.97.5]) by smtp.gmail.com with ESMTPSA id b2-20020a05620a126200b00767b0c35c15sm3157391qkl.91.2023.08.29.08.34.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Aug 2023 08:34:45 -0700 (PDT) Message-ID: Subject: Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters From: David Malcolm To: Guillaume Gomez , Antoni Boucher Cc: gcc-patches@gcc.gnu.org, jit@gcc.gnu.org Date: Tue, 29 Aug 2023 11:34:44 -0400 In-Reply-To: References: <059ffebd230df2dbbac3f138ec85016bb7a7306a.camel@redhat.com> User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP 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: On Tue, 2023-08-29 at 17:15 +0200, Guillaume Gomez wrote: > We finished the investigation and found out the issue: when passing > arguments by value to functions, rustc still provides "NoAlias" as > attribute to the argument whereas it should never be passed in this > case. Luckily for us, in case the argument is a function pointer > coming from a struct field, it crashes GCC, which is what allowed us > to figure out about this. A code which reproduces this bug: [...snip...] > So in short: the patch in the previous mail which added this check: >=20 > ``` > RETURN_NULL_IF_FAIL (type->is_pointer (), NULL, NULL, "not a pointer > type"); > ``` >=20 > is correct and ready.=C2=A0 Thanks. I've gone ahead and pushed it to gcc trunk for you as r14- 3552-g29763b002459cb. [...snip...] Dave