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

            Bug ID: 95819
           Summary: ICE: Segmentation fault signal terminated program
                    cc1plus
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: haoxintu at gmail dot com
  Target Milestone: ---

This case bug.cc, reduced by C-Reduce, makes GCC crashed.

$cat bug.cc
wchar_t  a  =  [] (struct  {


$g++ bug.cc
bug.cc:1:33: error: types may not be defined in parameter types
    1 |      wchar_t  a  =  [] (struct  {
      |                                 ^
bug.cc:2: error: expected ‘}’ at end of input
bug.cc:1:33: note: to match this ‘{’
    1 |      wchar_t  a  =  [] (struct  {
      |                                 ^
bug.cc:2: error: expected ‘,’ or ‘...’ at end of input
bug.cc:1:34: error: expected ‘)’ at end of input
    1 |      wchar_t  a  =  [] (struct  {
      |                        ~         ^
      |                                  )
g++: internal compiler error: Segmentation fault signal terminated program
cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.

My GCC version
$g++ --version
g++ (GCC) 11.0.0 20200605 (experimental)
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.

Reply via email to