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

            Bug ID: 92095
           Summary: ICE on sparc-gcc -O1 -mcpu=niagara2 -fPIE:
                    validize_mem(rtx_def*): gcc/gcc/explow.c:521
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at inbox dot ru
  Target Milestone: ---

Originally reported by Rolf Eike Beer as a build failure of python-3.6.9:
    https://bugs.gentoo.org/697708

Here is the minimal reproducer against ghc-master:

$ cat bug.c
    // sparc-unknown-linux-gnu-gcc -O1 -mcpu=niagara2 -fPIE -c bug.c -o bug.o
    typedef union {
      double a;
      int b[2];
    } c;
    double d(int e) {
      c f;
      (&f)->b[0] = 15728640;
      return e ? -(&f)->a : (&f)->a;
    }

$ gcc/xgcc -Bgcc -O1 -mcpu=niagara2 -fPIE -c bug.c -o bug.o
during RTL pass: reload
bug.c: In function 'd':
bug.c:10:1: internal compiler error: Segmentation fault
   10 | }
      | ^

$ gcc/xgcc -Bgcc -v
Reading specs from /home/slyfox/dev/git/gcc-sparc/gcc/specs
COLLECT_GCC=/home/slyfox/dev/git/gcc-sparc/gcc/xgcc
COLLECT_LTO_WRAPPER=/home/slyfox/dev/git/gcc-sparc/gcc/lto-wrapper
Target: sparc-unknown-linux-gnu
Configured with: ../gcc/configure --target=sparc-unknown-linux-gnu
--with-sysroot=/usr/sparc-unknown-linux-gnu --enable-languages=c
--disable-bootstrap
--prefix=/home/slyfox/dev/git/gcc-sparc/../gcc-sparc-installed
--disable-multilib --without-isl cross_compiling=yes
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.0.0 20191014 (experimental) (GCC)

Reply via email to