[{"id":3628243,"web_url":"http://patchwork.ozlabs.org/comment/3628243/","msgid":"<5245253.Qq0lBPeGtt@fomalhaut>","list_archive_url":null,"date":"2025-12-22T19:56:06","subject":"Re: [Ada] Fix ICE in fld_incomplete_type_of when building GtkAda with\n LTO","submitter":{"id":78832,"url":"http://patchwork.ozlabs.org/api/people/78832/","name":"Eric Botcazou","email":"botcazou@adacore.com"},"content":"> This is a regression from GCC 9 present on mainline and all active branches:\n> the compilation of GtkAda in LTO mode trips on the assertion present in the\n> fld_incomplete_type_of function about the TYPE_CANONICAL of types pointed\n> to by pointer (or reference) types.  The problem comes from an oversight in\n> the update_pointer_to function on gcc-interface, which correctly propagates\n> the TYPE_CANONICAL of the new pointer type to the old one when there is a\n> new pointer type, but fails to synthesize it when there is no new pointer\n> type.\n> \n> Tested on x86-64/Linux, applied on the mainline, 15 and 14 branches.\n> \n> \n> 2025-12-15  Eric Botcazou  <ebotcazou@adacore.com>\n> \n> \tPR ada/123060\n> \t* gcc-interface/utils.cc (update_pointer_to): Synthesize a new\n> \tTYPE_CANONICAL for the old pointer type in the case where there\n> \tis no new pointer type.  Likewise for references.\n\nThe change incorrectly resets the alias set of the old pointer/reference, \nwhich leads to the miscompilation of a few ACATS tests on some platforms.\n\nFixed thus, applied on the mainline, 15 and 14 branches.\n\n\tPR ada/123060\n\t* gcc-interface/utils.cc (update_pointer_to): Preserve the alias\n\tsets present on the old pointer and old reference, if any.","headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256\n header.s=google header.b=gS7kfJ76;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (2048-bit key,\n secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256\n header.s=google header.b=gS7kfJ76","sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=adacore.com","sourceware.org; spf=pass smtp.mailfrom=adacore.com","server2.sourceware.org;\n arc=none smtp.remote-ip=209.85.221.54"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4dZpnB75b7z1xty\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 23 Dec 2025 06:56:46 +1100 (AEDT)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id E98E74BA2E1C\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 22 Dec 2025 19:56:44 +0000 (GMT)","from mail-wr1-f54.google.com (mail-wr1-f54.google.com\n [209.85.221.54])\n by sourceware.org (Postfix) with ESMTPS id 44DB54BA2E07\n for <gcc-patches@gcc.gnu.org>; Mon, 22 Dec 2025 19:56:10 +0000 (GMT)","by mail-wr1-f54.google.com with SMTP id\n ffacd0b85a97d-43246af170aso2387926f8f.0\n for <gcc-patches@gcc.gnu.org>; Mon, 22 Dec 2025 11:56:10 -0800 (PST)","from fomalhaut.localnet ([2a01:e0a:8d5:d990:e654:e8ff:fe8f:2ce6])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-4324ea82fa1sm22938457f8f.23.2025.12.22.11.56.06\n for <gcc-patches@gcc.gnu.org>\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 22 Dec 2025 11:56:07 -0800 (PST)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org E98E74BA2E1C","OpenDKIM Filter v2.11.0 sourceware.org 44DB54BA2E07"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 44DB54BA2E07","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 44DB54BA2E07","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1766433370; cv=none;\n b=jXRehdThxHOZJ+Jvzgfn3KXERSBSlfFrKeTmFeuIh/1Not7CfbVuqgl2JSLoH6RkhvKXn+qO4JUuRH0n5KqTL8cBBxdpAqezdb3YWmMiUycpX3QcRPYYM1lq/wTlNkAbKtEe5CnbDxbURqg7n1mrPUmwq2P8Kih8BrFvx+/Mc80=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1766433370; c=relaxed/simple;\n bh=Pa9P6zCBAo7oOes6u0qUtiP3DGxognWN1rtkBJNyohE=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=qI+YgDK5f7aCzD99vZHQc/Zlm0/U4vRugRdstxtzg4AF21jmtSLOU4biRazELItd1Ap8FpARNE8l7xKTpjoU5wDKKRjN6NMaP7ICmGnioNFzmAvecUvpDsJSiHHnlmuSL9uhiPzVA388PHB4uuN9D/Mooao//YLSqZ2bh12P7Ug=","ARC-Authentication-Results":"i=1; server2.sourceware.org","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=adacore.com; s=google; t=1766433369; x=1767038169; darn=gcc.gnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:from:to:cc:subject:date:message-id\n :reply-to; bh=u7jDoKtP6jqRCtLTqRX5UW8PhQDKKWTx/6IBqW8DAOE=;\n b=gS7kfJ76T2cdzXM8C0/2tm5KJ7A1QQLy+eIxtZ0Ek7U2lKZuFTUEdQso46Jcz4zdZn\n yUYc5MI39nxdssygBt4Z5jqVodqV9ZVcLGSycI6HDl+qyST58qumIEVa1W3MSA6VJv3b\n DdyjbXlWLiqIIEMOcWawBPF64jGun0F7HwECqQjnqnUJLCR/qxhpjtRVnxEdzZm2enwE\n 1Id6QSh+rBKNIjkrfW0i4pirpx5nEHsgYAgSyjqubF9F62T1tmK66JM3cNR8f8v6W4Kx\n Q84lR/UH9lQ2Cp8vY3QLRoBzx7gkUt417mjf7tMF6tYQmY+z2T4pVZSUNZDOWCBIWi8G\n zsdA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1766433369; x=1767038169;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=u7jDoKtP6jqRCtLTqRX5UW8PhQDKKWTx/6IBqW8DAOE=;\n b=O/SlzREMW1djwCtBmRdv0AMOPbARj8mRNt2DU/N9TU5dyr4bI0eUBzjetQnoUSJxx7\n w66bCjzIs40CFxpn+/AC+ydnN/sTqQL6pCcjBWa0+36KKwM7p+iCqMbqZ9aKqkc961YZ\n vCAyrj/CngKl+D8XoWGGjwWIdHBRPjGN/fEOjxgLCxATsKc2AXKuahHonOofFn3kRnJZ\n CQz1GjB9WPbo7Vc8CX6qdkMAwJYmm1AqSyqinMS49E1ujAa4lrsA6vd/d2iBRBXaK+X+\n qkXs+k3e7BNVF3Rv7zrmlkdF8hFwFKxKp7FLGO3JYqoy/H/4rCq79WDAqy95zY8IITbF\n 7+nw==","X-Gm-Message-State":"AOJu0YyFbYeok+viGKa9wim6Bf5/7QUsnPbuVwPfT8FtcqwIaLpraWWi\n e3gFMdE1+mJLZuEdC0TDVsbsKb49k3Cz3KWPzv7vYzPTFkL5qh0czL4iS4pozlBfYk37BJO2mcp\n SS+k=","X-Gm-Gg":"AY/fxX671ZqkUdbN1VOlFmaDV6XmtmoG2f0ni3zTFuYUZawfnexy4jppCDRoOeJ2YMH\n EVhBrh/7gTgQozlZOj1RWblkaVHXjZvPH3cyhHe+HUHrIhByh2Gl7UshCUkD193XDJZ8qyIsPoH\n AiX0C45eV85Rzp6xUTT+ChaHn1FCvGMsR42QMbLSRygVbg3UEjFNICkoi+JCD7y1B8yBP8LBfN2\n GA8IumFqhoVsVwdbEnw6bb94LVkmE4t/Jp0Sb4n83buHJ48S0mlM4cOTEbcXCCBs1ZR77KC4+6+\n MhgIoKR8R+vwrtksjT8G6qaAcu2J4A+IGasIQNEmYn9seiA+Yv15YxYWldG96lbvLh49IMtHCWN\n g7AKMR1bnP+eHPh5Hl0/lkWDWWHyILsSI7R6/97YUX004BDo4ngejVbQ0iQ6C6yzVKPhN/PaE46\n YwKaNxB7QYb7+hFGVvfW6ovUY=","X-Google-Smtp-Source":"\n AGHT+IHdiOECmhCibopviTYtWnCxl4Yq2izMV0fXYtveFD/4YrNiJt1watnuYOPRs5DFDUZAvSUWFA==","X-Received":"by 2002:a05:6000:230d:b0:430:fb00:108a with SMTP id\n ffacd0b85a97d-4324e3ebfddmr15684895f8f.2.1766433368799;\n Mon, 22 Dec 2025 11:56:08 -0800 (PST)","From":"Eric Botcazou <botcazou@adacore.com>","X-Google-Original-From":"Eric Botcazou <ebotcazou@adacore.com>","To":"gcc-patches@gcc.gnu.org","Subject":"Re: [Ada] Fix ICE in fld_incomplete_type_of when building GtkAda with\n LTO","Date":"Mon, 22 Dec 2025 20:56:06 +0100","Message-ID":"<5245253.Qq0lBPeGtt@fomalhaut>","In-Reply-To":"<5736333.rdbgypaU67@fomalhaut>","References":"<5736333.rdbgypaU67@fomalhaut>","MIME-Version":"1.0","Content-Type":"multipart/mixed; boundary=\"nextPart5795195.IbC2pHGDlb\"","Content-Transfer-Encoding":"7Bit","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"}}]