This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/69914] New: ICE in check_global_declaration, upon -Wunused-variable of an array
- From: "sbergman at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 23 Feb 2016 10:50:20 +0000
- Subject: [Bug c/69914] New: ICE in check_global_declaration, upon -Wunused-variable of an array
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69914
Bug ID: 69914
Summary: ICE in check_global_declaration, upon
-Wunused-variable of an array
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: sbergman at redhat dot com
Target Milestone: ---
With recent trunk@233620:
> $ cat test.c
> typedef struct S {
> int a;
> void * b;
> int c;
> } S;
> void f(void) {
> S a[] = {
> {0x00000120, ((void *)0), 0},
> {0x00000120, ((void *)0), 0},
> {0x00000120, ((void *)0), 0},
> {0x00000120, ((void *)0), 0},
> {0, ((void *)0), 0},
> {0, ((void *)0), 0}
> };
> }
> $ gcc -Wunused-variable -c test.c
> test.c: In function âfâ:
> test.c:7:7: warning: unused variable âaâ [-Wunused-variable]
> S a[] = {
> ^
> At top level:
> cc1: internal compiler error: Segmentation fault
> 0xb2497f crash_signal
> ../../src/gcc/toplev.c:335
> 0x7506bd check_global_declaration
> ../../src/gcc/cgraphunit.c:947
> 0x7506bd analyze_functions
> ../../src/gcc/cgraphunit.c:1168
> 0x750f98 symbol_table::finalize_compilation_unit()
> ../../src/gcc/cgraphunit.c:2537