Re: internal compiler error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19/01/2018 14:16, Matt Sexton wrote:

> I am encountering an internal compiler error when compiling with -O2

Is there any way to get mingw-w64 7.2 short of installing a full-blown
distro, or compiling from source?

Do the following testcases (slight variations on the one you provided)
also cause an ICE?

I used the following command-line:
gcc-7 -Wall -Wextra -std=gnu11 -O2 -S testcase.c


TESTCASE 1

struct b {
	struct { int a[0]; };
};
struct d { int c; };
__thread struct d e;
extern int f;
extern void foo(int i);
void g(void)
{
  struct b *h = &e.c;
  int *a = h->a;
  foo(a[f]);
  foo(a[f]);
}


TESTCASE 2

struct b {
	struct { int a[4]; };
};
struct d { int c; };
__thread struct d e;
extern int f;
extern void foo(int i);
void g(void)
{
  struct b *h = &e.c;
  int *a = h->a;
  foo(a[f]);
  foo(a[f]);
}


TESTCASE 3

struct b {
	struct { int a[1]; };
};
struct d { int c; };
struct d e;
extern int f;
extern void foo(int i);
void g(void)
{
  struct b *h = &e.c;
  int *a = h->a;
  foo(a[f]);
  foo(a[f]);
}


Regards.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux