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

            Bug ID: 77946
           Summary: -Wimplicit-fallthrough=1 ICE: tree check: expected
                    tree that contains ‘decl with visibility’ structure,
                    have ‘label_decl’
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

Building the Linux kernel with -Wimplicit-fallthrough=1:

 markus@x4 linux % gcc -Wp,-MD,kernel/bpf/.core.o.d -nostdinc -isystem
/var/tmp/gcc_test/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.0/include
-I./arch/x86/include -I./arch/x86/include/generated/uapi
-I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi
-I./include/uapi -I./include/generated/uapi -include
./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes
-Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -mno-sse
-mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1
-mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup
-mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args
-DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1
-DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1
-DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1
-DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables
-fno-delete-null-pointer-checks -Wno-maybe-uninitialized -O2 -Wno-array-bounds
-Wimplicit-fallthrough=1 --param=allow-store-data-races=0
-Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable
-Wno-unused-const-variable -fomit-frame-pointer -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int
-Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types
-DCC_HAVE_ASM_GOTO -DKBUILD_BASENAME='"core"' -DKBUILD_MODNAME='"core"' -c -o
kernel/bpf/core.o kernel/bpf/core.c                                             

kernel/bpf/core.c:1092:1: internal compiler error: tree check: expected tree
that contains ‘decl with visibility’ structure, have ‘label_decl’ in
default_binds_local_p_3, at varasm.c:6873
 }
 ^
0xe0ce04 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
        ../../gcc/gcc/tree.c:9913
0xe62214 contains_struct_check(tree_node const*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/gcc/tree.h:3401
0xe62214 default_binds_local_p_3(tree_node const*, bool, bool, bool, bool)
        ../../gcc/gcc/varasm.c:6873
0xe5e4f6 compute_reloc_for_constant(tree_node*)
        ../../gcc/gcc/varasm.c:4098
0xe5e44e compute_reloc_for_constant(tree_node*)
        ../../gcc/gcc/varasm.c:4130
0xe68507 get_variable_section(tree_node*, bool)
        ../../gcc/gcc/varasm.c:1147
0xe6df3d assemble_variable(tree_node*, int, int, int)
        ../../gcc/gcc/varasm.c:2218
0xe73ad9 varpool_node::assemble_decl()
        ../../gcc/gcc/varpool.c:588
0xe7475e varpool_node::assemble_decl()
        ../../gcc/gcc/varpool.c:756
0xe7475e symbol_table::output_variables()
        ../../gcc/gcc/varpool.c:754
0x771084 symbol_table::compile()
        ../../gcc/gcc/cgraphunit.c:2487
0x7736b4 symbol_table::compile()
        ../../gcc/gcc/cgraphunit.c:2579
0x7736b4 symbol_table::finalize_compilation_unit()
        ../../gcc/gcc/cgraphunit.c:2576

--save-temps of course doesn't work. I'm trying to reduce it nonetheless.

Reply via email to