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 <creatorsmithmdt@xxxxxxxxx> 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 <xry111@xxxxxxxxxxx> 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 <xry111@xxxxxxxxxxx> >> School of Aerospace Science and Technology, Xidian University >> >