[Bug middle-end/87647] New: ICE on valid code in decode_addr_const, at varasm.c:2958
tavianator at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Oct 18 18:34:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87647
Bug ID: 87647
Summary: ICE on valid code in decode_addr_const, at
varasm.c:2958
Product: gcc
Version: 8.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: tavianator at gmail dot com
Target Milestone: ---
$ cat test.c
struct a {
};
struct a *const b = &(struct a){};
int main() {
struct {
char *s;
struct a *t;
} a[] = {"", b, "", b, "", b, "", b, "", b, "", b, "", b, "", b, "",
b, "", b, "", b, "", b, "", b, "", b, "", b, "", b, "", b};
}
$ gcc -O1 test.c
test.c: In function ‘main’:
test.c:8:5: internal compiler error: in decode_addr_const, at varasm.c:2958
} a[] = {"", b, "", b, "", b, "", b, "", b, "", b, "", b, "", b, "",
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
$ gcc --version
gcc (GCC) 8.2.1 20180831
Copyright (C) 2018 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.
Reduced from a reddit post:
https://www.reddit.com/r/C_Programming/comments/9p44be/internal_compiler_error/
More information about the Gcc-bugs
mailing list