public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "akim.demaille at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/98899] New: ICE: Illegal instruction: 4 "error: could not convert '<unparsed>' from ''<invalid tree code>'" on macOS
Date: Sun, 31 Jan 2021 06:17:54 +0000	[thread overview]
Message-ID: <bug-98899-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98899

            Bug ID: 98899
           Summary: ICE: Illegal instruction: 4 "error: could not convert
                    '<unparsed>' from ''<invalid tree code>'" 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<Base>::basic_symbol(typename Base::kind_type, int&&)
[with Base = yy::parser::by_kind; typename Base::kind_type =
yy::parser::token::token_kind_type]':
simple.cc:653:53:   required from here
simple.cc:484:7: error: could not convert '<unparsed>' from ''<invalid tree
code>' not supported by dump_type<type error>' to 'bool'
  484 |       basic_symbol (typename Base::kind_type t, int&& v)
      |       ^~~~~~~~~~~~
simple.cc: In instantiation of
'yy::parser::basic_symbol<Base>::basic_symbol(typename Base::kind_type,
std::string&&) [with Base = yy::parser::by_kind; typename Base::kind_type =
yy::parser::token::token_kind_type; std::string =
std::__cxx11::basic_string<char>]':
simple.cc:661:53:   required from here
simple.cc:497:7: error: could not convert '<unparsed>' from ''<invalid tree
code>' not supported by dump_type<type error>' to 'bool'
  497 |       basic_symbol (typename Base::kind_type t, std::string&& v)
      |       ^~~~~~~~~~~~
simple.cc: In instantiation of
'yy::parser::basic_symbol<Base>::basic_symbol(yy::parser::basic_symbol<Base>&&)
[with Base = yy::parser::by_kind]':
simple.cc:722:41:   required from here
simple.cc:438:7: error: could not convert '<unparsed>' from ''<invalid tree
code>' not supported by dump_type<type error>' 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<Base>::basic_symbol(typename Base::kind_type, int&&)
[with Base = yy::parser::by_kind; typename Base::kind_type =
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 <https://trac.macports.org/newticket> 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.)

             reply	other threads:[~2021-01-31  6:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-31  6:17 akim.demaille at gmail dot com [this message]
2021-01-31  6:20 ` [Bug c++/98899] " akim.demaille at gmail dot com
2021-01-31  6:21 ` akim.demaille at gmail dot com
2021-02-01  8:53 ` [Bug c++/98899] [10/11 Regression] ICE in tsubst_copy, at cp/pt.c:16198 since r10-1280-g78f7607db4c53f8c marxin at gcc dot gnu.org
2021-02-01 13:15 ` ppalka at gcc dot gnu.org
2021-02-01 13:28 ` mpolacek at gcc dot gnu.org
2021-02-03 15:17 ` cvs-commit at gcc dot gnu.org
2021-02-03 15:22 ` [Bug c++/98899] [10 " mpolacek at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-04-09 22:57 ` mpolacek at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-98899-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).