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

            Bug ID: 111811
           Summary: gcc: internal compiler error: tree check: expected
                    none of vector_type, have vector_type in finish_struct
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: congli at smail dot nju.edu.cn
  Target Milestone: ---

Compiler explorer: https://godbolt.org/z/WWzcPWcqs.

The following program `small.c` triggers a crash in gcc-14:

``` sh
% cat small.c
struct A {
    __attribute__((__vector_size__(4))) float d : 1;
};


% gcc-tk -O0 small.c
<source>:2:47: error: bit-field 'd' has invalid type
    2 |     __attribute__((__vector_size__(4))) float d : 1;
      |                                               ^
<source>:3:1: internal compiler error: tree check: expected none of
vector_type, have vector_type in finish_struct, at c/c-decl.cc:9358
    3 | };
      | ^
0x22ff3ee internal_error(char const*, ...)
  ???:0
0x8a7b87 tree_not_check_failed(tree_node const*, char const*, int, char const*,
...)
  ???:0
0xa7ab0d c_parser_declspecs(c_parser*, c_declspecs*, bool, bool, bool, bool,
bool, bool, bool, c_lookahead_kind)
  ???:0
0xaa468d c_parse_file()
  ???:0
0xb17919 c_common_parse_file()
  ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
```

GCC version:

```
gcc
(Compiler-Explorer-Build-gcc-300d7d3a8f4b53d045ce43f1ed4e10301781c786-binutils-2.40)
14.0.0 20231014 (experimental)
Copyright (C) 2023 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