From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 34FCD385842D; Fri, 17 Feb 2023 23:11:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 34FCD385842D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.97,306,1669104000"; d="scan'208,223";a="97396877" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 17 Feb 2023 15:11:40 -0800 IronPort-SDR: z3k6iVzqB3FZGSu7fLbs4r5dOGOmeLkkGscP1xYSfrjD8MRkiBVTVEv56tRtdvZsAQoEo9ovw4 oLHhGNfP2Nlmx2hjf1Y69r8uSFzIIMi1K/WxTG/ZFedAjX/YH4mtCfXAYmkEWFoBVwbZpjC7cE eNv4yKOnQTghiXuy7XAsJRjownBIRD7z3cqcJuR2gqaGl8NL7gwVMLm9c8qfISt6LDUnKka+Vv eB9qaMHE5M/7dL7BSRw04woJBvB/r91TZo/o+gwxE44t8hOUdhOPMFXz/R6i0+CHjIwUbv689N 7wQ= From: Thomas Schwinge To: , CC: Faisal Abbas <90.abbasfaisal@gmail.com>, Arthur Cohen , Jan-Benedict Glaw Subject: '#include "tm_p.h"' in 'gcc/rust/backend/rust-tree.cc' (was: [gcc r13-5533] gccrs: const folding port) In-Reply-To: <20230131131410.BC6503858426@sourceware.org> References: <20230131131410.BC6503858426@sourceware.org> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Sat, 18 Feb 2023 00:11:30 +0100 Message-ID: <87lekv3n19.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-13.mgc.mentorg.com (139.181.222.13) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,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: --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi! On 2023-01-31T13:14:10+0000, Arthur Cohen via Gcc-cvs = wrote: > commit r13-5533-ge66fec8e6ba35edf01f86c2bf6514109aba4ded2 > Author: Faisal Abbas <90.abbasfaisal@gmail.com> > Date: Mon Jun 27 16:05:49 2022 +0100 > > gccrs: const folding port > --- a/gcc/rust/backend/rust-tree.cc > +++ b/gcc/rust/backend/rust-tree.cc > @@ -21,12 +21,37 @@ > #include "stringpool.h" > #include "attribs.h" > #include "escaped_string.h" > +#include "libiberty.h" > +#include "stor-layout.h" > +#include "hash-map.h" > +#include "diagnostic.h" > +#include "timevar.h" > +#include "convert.h" > +#include "gimple-expr.h" > +#include "gimplify.h" > +#include "function.h" > +#include "gcc-rich-location.h" > +#include "target.h" > +#include "file-prefix-map.h" > +#include "cgraph.h" > + > +#include "output.h" GCC's '#include' is a m...ystery -- I've pushed to master branch commit 27a89f84c458ae938bc3eb92ad0d594c06fc3b42 "'#include "tm_p.h"' in 'gcc/rust/backend/rust-tree.cc'", see attached. Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955 --=-=-= Content-Type: text/x-diff; charset="utf-8" Content-Disposition: inline; filename="0001-include-tm_p.h-in-gcc-rust-backend-rust-tree.cc.patch" Content-Transfer-Encoding: quoted-printable >From 27a89f84c458ae938bc3eb92ad0d594c06fc3b42 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 17 Feb 2023 23:36:20 +0100 Subject: [PATCH] '#include "tm_p.h"' in 'gcc/rust/backend/rust-tree.cc' MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit ... to resolve issues like: "Upstream GCC broken for --= target=3Dpdp11-aout": In file included from ./tm.h:18:0, from [...]/gcc/target.h:52, from [...]/gcc/rust/backend/rust-tree.cc:34: [...]/gcc/rust/backend/rust-tree.cc: In function =E2=80=98void Rust::ma= rk_exp_read(tree)=E2=80=99: [...]/gcc/config/pdp11/pdp11.h:572:48: error: =E2=80=98pdp11_gen_int_la= bel=E2=80=99 was not declared in this scope pdp11_gen_int_label ((LABEL), (PREFIX), (NUM)) ^ [...]/gcc/rust/backend/rust-tree.cc:53:3: note: in expansion of macro = =E2=80=98ASM_GENERATE_INTERNAL_LABEL=E2=80=99 ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lsrc_loc", 1); ^ [...]/gcc/rust/backend/rust-tree.cc: In function =E2=80=98tree_node* Ru= st::fold_builtin_source_location(location_t)=E2=80=99: [...]/gcc/config/pdp11/pdp11.h:572:48: error: =E2=80=98pdp11_gen_int_la= bel=E2=80=99 was not declared in this scope pdp11_gen_int_label ((LABEL), (PREFIX), (NUM)) ^ [...]/gcc/rust/backend/rust-tree.cc:4799:7: note: in expansion of macro= =E2=80=98ASM_GENERATE_INTERNAL_LABEL=E2=80=99 ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lsrc_loc", source_locati= on_id++); ^ make[1]: *** [rust/rust-tree.o] Error 1 "New build failure on upstr= eam GCC for --target=3Dpowerpc-ibm-aix7.{1,2}": In file included from ./tm.h:22:0, from [...]/gcc/target.h:52, from [...]/gcc/rust/backend/rust-tree.cc:34: [...]/gcc/rust/backend/rust-tree.cc: In function =E2=80=98void Rust::ma= rk_exp_read(tree)=E2=80=99: [...]/gcc/config/rs6000/xcoff.h:206:63: error: =E2=80=98rs6000_xcoff_st= rip_dollar=E2=80=99 was not declared in this scope sprintf (LABEL, "*%s..%u", rs6000_xcoff_strip_dollar (PREFIX), (unsi= gned) (NUM)) ^ [...]/gcc/rust/backend/rust-tree.cc:53:3: note: in expansion of macro = =E2=80=98ASM_GENERATE_INTERNAL_LABEL=E2=80=99 ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lsrc_loc", 1); ^ [...]/gcc/rust/backend/rust-tree.cc: In function =E2=80=98tree_node* Ru= st::fold_builtin_source_location(location_t)=E2=80=99: [...]/gcc/config/rs6000/xcoff.h:206:63: error: =E2=80=98rs6000_xcoff_st= rip_dollar=E2=80=99 was not declared in this scope sprintf (LABEL, "*%s..%u", rs6000_xcoff_strip_dollar (PREFIX), (unsi= gned) (NUM)) ^ [...]/gcc/rust/backend/rust-tree.cc:4799:7: note: in expansion of macro= =E2=80=98ASM_GENERATE_INTERNAL_LABEL=E2=80=99 ASM_GENERATE_INTERNAL_LABEL (tmp_name, "Lsrc_loc", source_locati= on_id++); ^ make[1]: *** [rust/rust-tree.o] Error 1 Fix-up for recent commit e66fec8e6ba35edf01f86c2bf6514109aba4ded2 "gccrs: const folding port". gcc/rust/ * backend/rust-tree.cc: '#include "tm_p.h"'. --- gcc/rust/backend/rust-tree.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rust/backend/rust-tree.cc b/gcc/rust/backend/rust-tree.cc index 47506d6792a..e2595b59aa8 100644 --- a/gcc/rust/backend/rust-tree.cc +++ b/gcc/rust/backend/rust-tree.cc @@ -34,8 +34,8 @@ #include "target.h" #include "file-prefix-map.h" #include "cgraph.h" - #include "output.h" +#include "tm_p.h" =20 // forked from gcc/c-family/c-common.cc c_global_trees tree c_global_trees[CTI_MAX]; --=20 2.25.1 --=-=-=--