From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117241 invoked by alias); 22 Jan 2018 13:14:10 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 116369 invoked by uid 89); 22 Jan 2018 13:14:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=Sexton, sexton, encountering, H*r:212.27.42 X-HELO: smtp5-g21.free.fr Received: from smtp5-g21.free.fr (HELO smtp5-g21.free.fr) (212.27.42.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 22 Jan 2018 13:14:07 +0000 Received: from [172.27.0.114] (unknown [92.154.11.170]) (Authenticated sender: slash.tmp) by smtp5-g21.free.fr (Postfix) with ESMTPSA id B17C15FFA3; Mon, 22 Jan 2018 14:13:59 +0100 (CET) Subject: Re: internal compiler error To: Matt Sexton References: Cc: GCC help From: Mason Message-ID: <64e8fad2-4708-83e4-1d78-d669c33ee3a5@free.fr> Date: Mon, 22 Jan 2018 13:14:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-01/txt/msg00103.txt.bz2 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.