From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4A9B03851C27; Sun, 31 Jan 2021 06:17:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4A9B03851C27 From: "akim.demaille at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98899] New: ICE: Illegal instruction: 4 "error: could not convert '' from '''" on macOS Date: Sun, 31 Jan 2021 06:17:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: akim.demaille at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2021 06:17:54 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98899 Bug ID: 98899 Summary: ICE: Illegal instruction: 4 "error: could not convert '' from '''" on macOS Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: akim.demaille at gmail dot com Target Milestone: --- G++ behaves randomly on this issue. Sometimes it gives me an error message that does not seem to be meant for the user: ``` $ g++-mp-10 simple.cc -Wall -c simple.cc: In instantiation of 'yy::parser::basic_symbol::basic_symbol(typename Base::kind_type, int= &&) [with Base =3D yy::parser::by_kind; typename Base::kind_type =3D yy::parser::token::token_kind_type]': simple.cc:653:53: required from here simple.cc:484:7: error: could not convert '' from ''' not supported by dump_type' to 'bool' 484 | basic_symbol (typename Base::kind_type t, int&& v) | ^~~~~~~~~~~~ simple.cc: In instantiation of 'yy::parser::basic_symbol::basic_symbol(typename Base::kind_type, std::string&&) [with Base =3D yy::parser::by_kind; typename Base::kind_type= =3D yy::parser::token::token_kind_type; std::string =3D std::__cxx11::basic_string]': simple.cc:661:53: required from here simple.cc:497:7: error: could not convert '' from ''' not supported by dump_type' to 'bool' 497 | basic_symbol (typename Base::kind_type t, std::string&& v) | ^~~~~~~~~~~~ simple.cc: In instantiation of 'yy::parser::basic_symbol::basic_symbol(yy::parser::basic_symbol&&) [with Base =3D yy::parser::by_kind]': simple.cc:722:41: required from here simple.cc:438:7: error: could not convert '' from ''' not supported by dump_type' to 'bool' 438 | basic_symbol (basic_symbol&& that) | ^~~~~~~~~~~~ ``` and sometimes it crashes: ``` $ g++-mp-10 simple.cc -Wall -c simple.cc: In instantiation of 'yy::parser::basic_symbol::basic_symbol(typename Base::kind_type, int= &&) [with Base =3D yy::parser::by_kind; typename Base::kind_type =3D yy::parser::token::token_kind_type]': simple.cc:653:53: required from here simple.cc:484:7: internal compiler error: Illegal instruction: 4 484 | basic_symbol (typename Base::kind_type t, int&& v) | ^~~~~~~~~~~~ libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source if appropriate. See for instructions. ``` I have tried to reduce the example, but it seems to be quite touchy. This is: ``` $ g++-mp-10 --version g++-mp-10 (MacPorts gcc10 10.2.0_4) 10.2.0 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ``` FWIW, clang++ 11 accepts this source. (I have problems trying to add the attachment, will try when the issue is created.)=