From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25683 invoked by alias); 19 Jan 2018 15:54:36 -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 25668 invoked by uid 89); 19 Jan 2018 15:54:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: Yes, score=6.5 required=5.0 tests=AWL,BAYES_50,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=jh, H*f:sk:CAMp6Wr, UD:bug.c, bugc X-HELO: mail-io0-f177.google.com Received: from mail-io0-f177.google.com (HELO mail-io0-f177.google.com) (209.85.223.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 Jan 2018 15:54:33 +0000 Received: by mail-io0-f177.google.com with SMTP id z6so2593304iob.11 for ; Fri, 19 Jan 2018 07:54:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=MtJvOnBe7pQqrKIOV1P2+7exfWJ3e0h9PMkTEYotXhI=; b=KAV1LrdywNRcxpZLeGV77lrkNePFI+xgZ3EUQ+GydYE9hEx+3uudVP8BGH1HZYl1zX uz4t5/GzKnrF9Btkls5+qXoC4KroscFpG8hIROJDdQgaZpVxG4Rg1fmfHEqgOY3tgqOA jTT+6wxKNYhZpW2eZ/S8Ky4xJAdmYyKoleUW3UQ5EXBFpP8Q6TqoqhMOwUgH39qwfEtb Bsi644IhqMxyabc4/0ujYp06fsh9pzqtKU+OAO3yxXMhgjKVvhxBg55nmP0F3uSIja2G 5jA13w0neXY1lXZVUpJ+bPT/lGS+knNBsh4NbJtC3oZ0Mt08wcdNlIgZNHz39O2jBsSP QRwQ== X-Gm-Message-State: AKwxytecfwfcslYP+CMkBJBCv9is8Qgr8LuH4FHKX4D7JAjW7RMvmB6U 4Avnm2MV7JtJoe1oPY0IhUu4fzdIrechluWdbPDSloOAQD4= X-Google-Smtp-Source: ACJfBos3Mqeobc/gwNTnI4lvArkvLqWcy+COZNUCU8Gln+LJP1LiZ62V3UN7ByrqAgpTx29fI96ECT/wQlILMpuKutI= X-Received: by 10.107.141.83 with SMTP id p80mr16713904iod.97.1516377271547; Fri, 19 Jan 2018 07:54:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.227.136 with HTTP; Fri, 19 Jan 2018 07:54:30 -0800 (PST) In-Reply-To: References: From: "Matt Sexton via gcc-help" Reply-To: Matt Sexton Date: Fri, 19 Jan 2018 15:54:00 -0000 Message-ID: Subject: Re: internal compiler error To: gcc-help Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2018-01/txt/msg00099.txt.bz2 And here's a different piece of code that triggers a segfault: $ cat bug.c typedef enum { a } b; typedef struct { b action } c; d; inline e(void *p1) { long *f = p1; long g = f[g] = d; } typedef struct { int h } i; __thread i j; k() { int *l = &j.h; c *entryp = l; int m = &entryp[m]; for (;;) { e(&entryp[m]); entryp[m].action = a; } } $ x86_64-w64-mingw32-gcc -c -O -ftree-pre bug.c *bug.c:2:27:* *warning: *no semicolon at end of struct or union typedef struct { b action *}* c; *^* *bug.c:3:1:* *warning: *data definition has no type or storage class *d*; *^* *bug.c:3:1:* *warning: *type defaults to '*int*' in declaration of '*d*' [ *-Wimplicit-int*] *bug.c:4:8:* *warning: *return type defaults to '*int*' [*-Wimplicit-int*] inline *e*(void *p1) { *^* *bug.c:8:24:* *warning: *no semicolon at end of struct or union typedef struct { int h *}* i; *^* *bug.c:10:1:* *warning: *return type defaults to '*int*' [*-Wimplicit-int*] *k*() { *^* *bug.c:* In function '*k*': *bug.c:12:15:* *warning: *initialization from incompatible pointer type [ *-Wincompatible-pointer-types*] c *entryp = *l*; *^* *bug.c:13:11:* *warning: *initialization makes integer from pointer without a cast [*-Wint-conversion*] int m = *&*entryp[m]; *^* *bug.c:10:1:* *internal compiler error: *Segmentation fault *k*() { *^* Please submit a full bug report, with preprocessed source if appropriate. See for instructions.