From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 084503856DC8 for ; Thu, 19 May 2022 04:32:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 084503856DC8 Received: by mail-oi1-x22c.google.com with SMTP id v65so5122082oig.10 for ; Wed, 18 May 2022 21:32:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GqJ0m+Sgcylxk1uw32hb2DLFGiyz4hQ5SNAjVusa340=; b=LB+tHNJHfjcqL+CjiarrA9KLGiSwgigweaJUGj0SK7dPy2BLAzsT/10gvD2xa/dcq6 IGoMdf+zkcn5h4iGk5ckC/qh7t+jrJjfCs0P3FnnN0cq4jMR4pyAApemz1AZ+ByHrV1f u0S7puy3tLGeQL0xo1DQwlJsDar7UkJC2xMFfqVZ+IKkHe828B99vz2a4Vnxe3Cie5ep dTX6NAIyYL+WVpzwCo7NnDyzNrG0P9WDhRxngHgZ44A7fJl6AYLVmoJqF9Re0fEWXa+3 5Vh//sdJmIhgL5lc5uvzTowa0+OPnkZC0NTdlzvUR+nVdBAlcJ/lCaYrvd1M7jKmEEH2 WWSw== X-Gm-Message-State: AOAM533Flk8rfIn/6O2i/DYK5EDnzbuBB5kvABkBq1i44ZsPEFH6k5F5 HG/RnPZltQURijgmOVbifjtGp30NK5ba8/Dozzc= X-Google-Smtp-Source: ABdhPJyGHgwCv7zY5C1Wq9+/fasJvGkv7LUOMNSM6ZiRbdMS4TSpKFNfNt9kiPBGsLbthe3k8lR9WWN9IdBSCHjm9Mc= X-Received: by 2002:a05:6808:2097:b0:326:6bc9:407e with SMTP id s23-20020a056808209700b003266bc9407emr1757998oiw.250.1652934773291; Wed, 18 May 2022 21:32:53 -0700 (PDT) MIME-Version: 1.0 References: <98a68a34c0d95c812b49f471df3ff3d32e0bea8d.camel@xry111.site> <296056e130d014c20b4d55e9b4b036db13dcb1d2.camel@xry111.site> In-Reply-To: From: Zopolis0 Date: Thu, 19 May 2022 14:32:41 +1000 Message-ID: Subject: Re: Segfault in libjava/prims.cc while compiling gcj To: Xi Ruoyao Cc: Jonathan Wakely , gcc-help X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 May 2022 04:32:55 -0000 Ah. On further inspection, I presume the reason prims.cc fails to compile under any circumstances with the system gcc is because the system gcc has no support for the standard java types, which are enabled if extern "Java" is seen. The system gcc, having no such types, cannot act on the extern Java and thus the compilation fails. I'm now looking into using a version of gcc 6 configured with --enable-languages=java, or hacking my code to disable the compilation of libjava, and then use that version. Should I still report the ICE, even if the upstream gcc would fail before reaching it? On Thu, May 19, 2022 at 9:20 AM Zopolis0 wrote: > I'm not sure what you mean by not supported by GCC trunk, the code is part > of the gcc trunk (not the upstream one, though). The code compiled in Sep > 2016, so something must have changed between > 37b204de605563e7932e26099d28ea8c86cb1935 and now. > > On Wed, May 18, 2022 at 9:02 PM Xi Ruoyao wrote: > >> On Wed, 2022-05-18 at 11:57 +0100, Jonathan Wakely wrote: >> > On Wed, 18 May 2022 at 11:45, Zopolis0 wrote: >> > > >> > > I thought " But "-D...", "-I...", and "-B..." shall be >> > > removed." was asking me to remove them. >> > > >> > > I used -E, I said I produced the file. >> > >> > Ah I missed that, sorry. I thought you were still trying to produce a >> > .ii file. >> >> My mistake: I didn't expect that this .ii file contains "extern Java { >> ... }", not supported by GCC trunk. >> >> So for the OP, the only option seems to reduce the .ii file into a test >> case and debug the compiler. I guess the OP has made some mistake >> implementing "extern Java" for C++ FE. >> -- >> Xi Ruoyao >> School of Aerospace Science and Technology, Xidian University >> >