internal compiler error
Matt Sexton via gcc-help
gcc-help@gcc.gnu.org
Fri Jan 19 14:35:00 GMT 2018
On Fri, Jan 19, 2018 at 8:26 AM, Mikhail Maltsev <maltsevm@gmail.com> wrote:
> On Fri, Jan 19, 2018 at 1:16 PM, Matt Sexton via gcc-help <
> gcc-help@gcc.gnu.org> wrote:
>
>> At this point, I do not have a small piece of code that I can share that
>> triggers the problem, though I will try to do so.
>>
> You might want to try to use https://embed.cs.utah.edu/creduce/ to
> generate such a piece of code from your source automatically. See also:
> https://gcc.gnu.org/wiki/A_guide_to_testcase_reduction
>
>>
>>
Great suggestion. What a brilliant tool. It reduced the test case to the
following:
$ cat bug.c
typedef struct {
struct {
int a[0]
}
} b;
typedef struct { int c } d;
__thread d e;
f;
g() {
b *h = &e.c;
int *a = h->a;
i(a[f]);
i(a[f]);
}
$ x86_64-w64-mingw32-gcc -O2 bug.c
bug.c:4:3: warning: no semicolon at end of struct or union
}
^
bug.c:5:1: warning: no semicolon at end of struct or union
} b;
^
bug.c:6:24: warning: no semicolon at end of struct or union
typedef struct { int c } d;
^
bug.c:8:1: warning: data definition has no type or storage class
f;
^
bug.c:8:1: warning: type defaults to 'int' in declaration of 'f'
[-Wimplicit-int]
bug.c:9:1: warning: return type defaults to 'int' [-Wimplicit-int]
g() {
^
bug.c: In function 'g':
bug.c:10:10: warning: initialization from incompatible pointer type
[-Wincompatible-pointer-types]
b *h = &e.c;
^
bug.c:12:3: warning: implicit declaration of function 'i'
[-Wimplicit-function-declaration]
i(a[f]);
^
bug.c:9:1: internal compiler error: in get_constraint_for_ptr_offset, at
tree-ssa-structalias.c:3155
g() {
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
More information about the Gcc-help
mailing list