public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dcb314 at hotmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/97578] New: ice during IPA pass: inline
Date: Mon, 26 Oct 2020 11:35:16 +0000	[thread overview]
Message-ID: <bug-97578-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97578

            Bug ID: 97578
           Summary: ice during IPA pass: inline
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C code:

typedef long unsigned int size_t;
   typedef unsigned char __uint8_t;
   typedef unsigned int __uint32_t;
   typedef __uint8_t uint8_t;
   typedef __uint32_t uint32_t;
   struct md5_s {
                            uint32_t nblocks;
                            uint8_t buf[64];
                            int count;
  };
   typedef struct md5_s MD5_CONTEXT;
   void * md5_write_context;
   static void md5_write(  const void *inbuf_arg , size_t inlen) {
        const unsigned char *inbuf = inbuf_arg;
        MD5_CONTEXT *hd = md5_write_context;
        if( hd->count == 64 )           transform( hd, hd->buf );
        hd->nblocks++;
        if( !inbuf )                    return;
        if( hd->count )                 md5_write( 0, 0 );
        while( inlen >= 64 )     ;
        for( ;
  inlen && hd->count < 64;
  inlen-- )                     hd->buf[hd->count++] = *inbuf++;
  }
   void * md5_final_context;
   static void md5_final( void) {
        md5_write( 0, 0);
  }
   void AddMD5(  const void *data, size_t len ) {
        md5_write(  data, len );
  }
   void EndMD5( struct md5_s *h ) {
        md5_final(  );
  }

compiled with recent gcc trunk and flag -g -O3, does this:

during IPA pass: inline
bug659.c: In function ‘AddMD5’:
bug659.c:30:9: internal compiler error: Segmentation fault
   30 |         md5_write(  data, len );
      |         ^~~~~~~~~~~~~~~~~~~~~~~
0xbd15df crash_signal
        ../../trunk.git/gcc/toplev.c:330
0xc4b608 copy_cfg_body
        ../../trunk.git/gcc/tree-inline.c:3118

The bug first seems to occur sometime between 20201022 and 20201023.

             reply	other threads:[~2020-10-26 11:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 11:35 dcb314 at hotmail dot com [this message]
2020-10-26 11:46 ` [Bug c/97578] " marxin at gcc dot gnu.org
2020-10-26 12:21 ` dcb314 at hotmail dot com
2020-10-26 12:37 ` hubicka at gcc dot gnu.org
2020-10-31 12:55 ` su at cs dot ucdavis.edu
2020-11-01 14:48   ` Jan Hubicka
2020-11-01 14:48 ` hubicka at ucw dot cz
2020-11-02 16:26 ` jamborm at gcc dot gnu.org
2020-11-03 10:56 ` cvs-commit at gcc dot gnu.org
2020-11-03 11:19 ` hubicka at gcc dot gnu.org
2020-11-03 11:21 ` jakub at gcc dot gnu.org
2020-11-03 11:25   ` Jan Hubicka
2020-11-03 11:25 ` hubicka at ucw dot cz
2021-04-27 11:39 ` jakub at gcc dot gnu.org
2021-07-28  7:05 ` rguenth at gcc dot gnu.org
2022-04-13 15:07 ` [Bug c/97578] [11 Regression] " redi at gcc dot gnu.org
2022-04-13 15:09 ` jakub at gcc dot gnu.org
2022-04-13 16:23 ` dcb314 at hotmail dot com
2022-04-13 17:21 ` jamborm at gcc dot gnu.org
2022-04-21  7:48 ` rguenth at gcc dot gnu.org
2023-05-29 10:03 ` jakub at gcc dot gnu.org

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=bug-97578-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).