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

            Bug ID: 115509
           Summary: ICE: in set_underlying_type, at
                    c-family/c-common.cc:8613 with attribute aligned and
                    sentinel
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iamanonymous.cs at gmail dot com
  Target Milestone: ---

Compiler Explorer: https://godbolt.org/z/da8Txxbs9

*******************************************************************************
OS and Platform:
$ uname -a:
Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023
x86_64 x86_64 x86_64 GNU/Linux
*******************************************************************************
gcc version:
Using built-in specs.
COLLECT_GCC=/root/gcc_set/trunk-48a320a/bin/gcc
COLLECT_LTO_WRAPPER=/root/gcc_set/trunk-48a320a/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/root/gcc_set/trunk-48a320a
--with-gmp=/root/build_essential --with-mpfr=/root/build_essential
--with-mpc=/root/build_essential --enable-languages=c,c++ --disable-multilib
--with-sanitizer=address,undefined,thread,leak --enable-coverage
--disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240426 (experimental) (GCC) 

*******************************************************************************
Program:
$ cat mutant.c
__attribute__((aligned, sentinel)) typedef (*a)();

*******************************************************************************
Command Lines:
$ gcc mutant.c
mutant.c:1:46: error: type defaults to ‘int’ in declaration of ‘a’
[-Wimplicit-int]
    1 | __attribute__((aligned, sentinel)) typedef (*a)();
      |                                              ^
mutant.c:1:1: warning: ‘sentinel’ attribute requires prototypes with named
arguments [-Wattributes]
    1 | __attribute__((aligned, sentinel)) typedef (*a)();
      | ^~~~~~~~~~~~~
mutant.c:1:1: internal compiler error: in set_underlying_type, at
c-family/c-common.cc:8613
0xf793db set_underlying_type(tree_node*)
        ../../gcc/gcc/c-family/c-common.cc:8613
0xd50e3f pushdecl(tree_node*)
        ../../gcc/gcc/c/c-decl.cc:3524
0xd5ad62 start_decl(c_declarator*, c_declspecs*, bool, tree_node*, bool,
unsigned int*)
        ../../gcc/gcc/c/c-decl.cc:5705
0xe3fd91 c_parser_declaration_or_fndef
        ../../gcc/gcc/c/c-parser.cc:2766
0xe3c6ed c_parser_external_declaration
        ../../gcc/gcc/c/c-parser.cc:2046
0xe3bbd7 c_parser_translation_unit
        ../../gcc/gcc/c/c-parser.cc:1900
0xeccd02 c_parse_file()
        ../../gcc/gcc/c/c-parser.cc:26889
0xfe8faa c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.cc:1311
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.

Reply via email to