public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/97578] New: ice during IPA pass: inline
@ 2020-10-26 11:35 dcb314 at hotmail dot com
  2020-10-26 11:46 ` [Bug c/97578] " marxin at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 21+ messages in thread
From: dcb314 at hotmail dot com @ 2020-10-26 11:35 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2023-05-29 10:03 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 11:35 [Bug c/97578] New: ice during IPA pass: inline dcb314 at hotmail dot com
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

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).