public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Matt Sexton via gcc-help" <gcc-help@gcc.gnu.org>
To: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: internal compiler error
Date: Fri, 19 Jan 2018 15:54:00 -0000	[thread overview]
Message-ID: <CAMp6Wr_9=cvY4tCVq_orUspdWQNQ57AFbkShtC3BaiPwCeYWDA@mail.gmail.com> (raw)
In-Reply-To: <CAMp6Wr9NMXfsARySPOPFYMbjCH-+gQ6=yRO9k8f0=dNGC2u5XA@mail.gmail.com>

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 <http://bugzilla.redhat.com/bugzilla> for instructions.

  reply	other threads:[~2018-01-19 15:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19 13:17 Matt Sexton via gcc-help
2018-01-19 13:26 ` Mikhail Maltsev
2018-01-19 14:35   ` Matt Sexton via gcc-help
2018-01-19 15:54     ` Matt Sexton via gcc-help [this message]
2018-01-22 13:14 ` Mason
2018-01-22 13:21   ` Matt Sexton via gcc-help
  -- strict thread matches above, loose matches on Subject: below --
2012-12-24 16:44 Internal Compiler Error tanle
2012-12-24 18:19 ` Andrew Haley
2012-12-27 17:27 ` Iyer, Balaji V
2010-07-12  9:04 internal compiler error Malte.Mauelshagen
2010-07-12  9:56 ` Ian Lance Taylor
2008-02-29 21:27 raian.ufop
2008-02-29 22:16 ` Brian Dessent
2008-03-03 18:50   ` raian.ufop
2003-07-30 20:29 Internal " DEEPA SIVASANKARANE
2001-07-03  8:36 Av Vl
2001-07-02  8:04 Av Vl
1999-09-29 12:58 Guardian
1999-09-30  3:33 ` jwk
1999-09-30 23:56   ` jwk
1999-10-01  0:00   ` jwk
1999-10-01 13:49   ` Guardian
1999-10-31 13:57     ` Guardian
1999-09-30 23:56 ` Guardian
1999-10-01  0:00 ` Guardian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMp6Wr_9=cvY4tCVq_orUspdWQNQ57AFbkShtC3BaiPwCeYWDA@mail.gmail.com' \
    --to=gcc-help@gcc.gnu.org \
    --cc=matt.sexton@redlinetrading.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).