public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/99694] New: gcc: fatal error: Killed signal terminated program cc1 under -O2 to -Os
@ 2021-03-21 13:48 haoxintu at gmail dot com
  2021-03-22  8:14 ` [Bug middle-end/99694] [9/10/11 Regression] gcc: fatal error: Killed signal terminated program cc1 under -O2 to -Os since r9-7156-g33579b59aaf02eb7 marxin at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: haoxintu at gmail dot com @ 2021-03-21 13:48 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99694
           Summary: gcc: fatal error: Killed signal terminated program cc1
                    under -O2 to -Os
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: haoxintu at gmail dot com
  Target Milestone: ---

Hi all.

GCC takes too much compiling time and then crashes on the valid small.c under
-O2 to -Os. Also, all GCC-9 upward versions behave the same.

$cat small.c
#include <stdint.h>
int a, b, c;
void d() {
  uint16_t e;
  int32_t *f;
  int32_t *g;
  if (a) {
    int32_t *k;
    for (;; *k += 1) {
      int32_t **i = &f;
      int32_t **l = &g;
      for (e = 6; e; e++) {
        g = k = f;
      j:
        **l = 0;
      }
      *i = c;
    }
  }
  uint16_t i = &e;
  b = i / 0;
  goto j;
}

$time gcc -w -c -O1 small.c

real    0m0.057s
user    0m0.023s
sys     0m0.006s


$time gcc -w -c -Os small.c (same as -O2 and -O3)
gcc: fatal error: Killed signal terminated program cc1
compilation terminated.

real    79m53.073s
user    78m10.888s
sys     0m28.194s

$gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/tuhaoxin/compilers/gcc/build-20210320/libexec/gcc/x86_64-pc-linux-gnu/11.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure
--prefix=/home/tuhaoxin/compilers/gcc/build-20210320/ --enable-bootstrap
--enable-checking=release --enable-languages=c,c++ -disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.1 20210320 (experimental) (GCC) 


Thanks,
Haoxin

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

end of thread, other threads:[~2021-08-04 13:19 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-21 13:48 [Bug c/99694] New: gcc: fatal error: Killed signal terminated program cc1 under -O2 to -Os haoxintu at gmail dot com
2021-03-22  8:14 ` [Bug middle-end/99694] [9/10/11 Regression] gcc: fatal error: Killed signal terminated program cc1 under -O2 to -Os since r9-7156-g33579b59aaf02eb7 marxin at gcc dot gnu.org
2021-03-22  8:32 ` jakub at gcc dot gnu.org
2021-03-22  9:05 ` rguenth at gcc dot gnu.org
2021-03-22 13:37 ` cvs-commit at gcc dot gnu.org
2021-03-22 13:38 ` [Bug middle-end/99694] [9/10 " rguenth at gcc dot gnu.org
2021-03-24 14:26 ` cvs-commit at gcc dot gnu.org
2021-03-28  3:27 ` [Bug middle-end/99694] [9 " haoxintu at gmail dot com
2021-03-30  7:31 ` marxin at gcc dot gnu.org
2021-04-12 11:23 ` cvs-commit at gcc dot gnu.org
2021-04-12 11:24 ` rguenth at gcc dot gnu.org
2021-08-04  8:31 ` haoxintu at gmail dot com
2021-08-04  8:45 ` marxin at gcc dot gnu.org
2021-08-04  8:50 ` haoxintu at gmail dot com
2021-08-04 11:37 ` rguenth at gcc dot gnu.org
2021-08-04 11:51 ` jakub at gcc dot gnu.org
2021-08-04 12:42 ` marxin at gcc dot gnu.org
2021-08-04 13:19 ` haoxintu at gmail dot com

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