Bug 97806 - [11 regression] bootstrap ICE starting with r11-4921
Summary: [11 regression] bootstrap ICE starting with r11-4921
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 11.0
: P1 normal
Target Milestone: 11.0
Assignee: Richard Biener
URL:
Keywords: ice-on-valid-code
: 97809 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-11-12 03:00 UTC by seurer
Modified: 2020-11-12 10:01 UTC (History)
6 users (show)

See Also:
Host: powerpc64*-linux-gnu
Target: powerpc64*-linux-gnu
Build: powerpc64*-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2020-11-12 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description seurer 2020-11-12 03:00:17 UTC
g:86cca5cc14602814b98e55aae313fbe237af1b04, r11-4921 

commit 86cca5cc14602814b98e55aae313fbe237af1b04
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Nov 11 16:09:17 2020 +0100



/bin/sh ../libtool  --tag=CC   --mode=compile /home/seurer/gcc/git/build/gcc-test/./prev-gcc/xgcc -B/home/seurer/gcc/git/build/gcc-test/./prev-gcc/ -B/home/seurer/gcc/git/install/gcc-test/powerpc64-unknown-linux-gnu/bin/ -B/home/seurer/gcc/git/install/gcc-test/powerpc64-unknown-linux-gnu/bin/ -B/home/seurer/gcc/git/install/gcc-test/powerpc64-unknown-linux-gnu/lib/ -isystem /home/seurer/gcc/git/install/gcc-test/powerpc64-unknown-linux-gnu/include -isystem /home/seurer/gcc/git/install/gcc-test/powerpc64-unknown-linux-gnu/sys-include   -fchecking=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_LOCALE_H=1 -DHAVE_WCHAR_H=1 -DHAVE_STDARG=1 -DHAVE_SYS_TIME_H=1 -DHAVE_STRUCT_LCONV_DECIMAL_POINT=1 -DHAVE_STRUCT_LCONV_THOUSANDS_SEP=1 -DHAVE_ALLOCA_H=1 -DHAVE_STDINT_H=1 -DHAVE_VA_COPY=1 -DHAVE_SETLOCALE=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_LONG_LONG=1 -DHAVE_INTMAX_T=1 -DMPFR_HAVE_INTMAX_MAX=1 -DMPFR_HAVE_FESETROUND=1 -DHAVE_DENORMS=1 -DHAVE_SIGNEDZ=1 -DHAVE_ROUND=1 -DHAVE_TRUNC=1 -DHAVE_FLOOR=1 -DHAVE_CEIL=1 -DHAVE_NEARBYINT=1 -DMPFR_USE_THREAD_SAFE=1 -DMPFR_USE_C11_THREAD_SAFE=1 -DHAVE_CLOCK_GETTIME=1 -DLT_OBJDIR=\".libs/\" -DHAVE_ATTRIBUTE_MODE=1 -DHAVE___GMPN_ROOTREM=1 -DHAVE___GMPN_SBPI1_DIVAPPR_Q=1 -I. -I/home/seurer/gcc/git/gcc-test/mpfr/src   -I/home/seurer/gcc/git/build/gcc-test/gmp -DNO_ASM -g -O2 -fchecking=1 -MT sub1sp.lo -MD -MP -MF .deps/sub1sp.Tpo -c -o sub1sp.lo /home/seurer/gcc/git/gcc-test/mpfr/src/sub1sp.c
libtool: compile:  /home/seurer/gcc/git/build/gcc-test/./prev-gcc/xgcc -B/home/seurer/gcc/git/build/gcc-test/./prev-gcc/ -B/home/seurer/gcc/git/install/gcc-test/powerpc64-unknown-linux-gnu/bin/ -B/home/seurer/gcc/git/install/gcc-test/powerpc64-unknown-linux-gnu/bin/ -B/home/seurer/gcc/git/install/gcc-test/powerpc64-unknown-linux-gnu/lib/ -isystem /home/seurer/gcc/git/install/gcc-test/powerpc64-unknown-linux-gnu/include -isystem /home/seurer/gcc/git/install/gcc-test/powerpc64-unknown-linux-gnu/sys-include -fchecking=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_LOCALE_H=1 -DHAVE_WCHAR_H=1 -DHAVE_STDARG=1 -DHAVE_SYS_TIME_H=1 -DHAVE_STRUCT_LCONV_DECIMAL_POINT=1 -DHAVE_STRUCT_LCONV_THOUSANDS_SEP=1 -DHAVE_ALLOCA_H=1 -DHAVE_STDINT_H=1 -DHAVE_VA_COPY=1 -DHAVE_SETLOCALE=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_LONG_LONG=1 -DHAVE_INTMAX_T=1 -DMPFR_HAVE_INTMAX_MAX=1 -DMPFR_HAVE_FESETROUND=1 -DHAVE_DENORMS=1 -DHAVE_SIGNEDZ=1 -DHAVE_ROUND=1 -DHAVE_TRUNC=1 -DHAVE_FLOOR=1 -DHAVE_CEIL=1 -DHAVE_NEARBYINT=1 -DMPFR_USE_THREAD_SAFE=1 -DMPFR_USE_C11_THREAD_SAFE=1 -DHAVE_CLOCK_GETTIME=1 -DLT_OBJDIR=\".libs/\" -DHAVE_ATTRIBUTE_MODE=1 -DHAVE___GMPN_ROOTREM=1 -DHAVE___GMPN_SBPI1_DIVAPPR_Q=1 -I. -I/home/seurer/gcc/git/gcc-test/mpfr/src -I/home/seurer/gcc/git/build/gcc-test/gmp -DNO_ASM -g -O2 -fchecking=1 -MT sub1sp.lo -MD -MP -MF .deps/sub1sp.Tpo -c /home/seurer/gcc/git/gcc-test/mpfr/src/sub1sp.c -o sub1sp.o
during GIMPLE pass: pre
/home/seurer/gcc/git/gcc-test/mpfr/src/sub1sp.c: In function 'mpfr_sub1sp':
/home/seurer/gcc/git/gcc-test/mpfr/src/sub1sp.c:135:1: internal compiler error: in clean, at tree-ssa-pre.c:2053
  135 | mpfr_sub1sp (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t rnd_mode)
      | ^~~~~~~~~~~
0x3fffb7c87c6b generic_start_main
	../csu/libc-start.c:266
Comment 1 Richard Biener 2020-11-12 07:17:37 UTC
Mine - trying to reproduce on x86_64-linux with in-tree mpfr.
Comment 2 Richard Biener 2020-11-12 07:41:00 UTC
OK, confirmed and reducing a testcase.
Comment 3 Richard Biener 2020-11-12 07:42:58 UTC
int b;
long c;
int g();
void h(long *);
void i(long *);
void d() {
  int e, f = b - e;
  if (g())
    h(&c + f);
  else
    i(&c + f);
  __builtin_memset(0, 0, f * 8);
}

heh, quite simple - so much for test coverage :/
Comment 4 Richard Biener 2020-11-12 08:00:08 UTC
OK, happens because topological sorting is not correct for the case where we have multiple expressions for a value in the set.
Comment 5 Tamar Christina 2020-11-12 09:48:32 UTC
*** Bug 97809 has been marked as a duplicate of this bug. ***
Comment 6 GCC Commits 2020-11-12 10:01:01 UTC
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:64326bb428ac750ec3b0f56c06dfb98277cd41b5

commit r11-4937-g64326bb428ac750ec3b0f56c06dfb98277cd41b5
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Nov 12 09:10:51 2020 +0100

    tree-optimization/97806 - fix PRE expression post order
    
    This fixes the postorder compute for the case of multiple
    expression leaders for a value.
    
    2020-11-12  Richard Biener  <rguenther@suse.de>
    
            PR tree-optimization/97806
            * tree-ssa-pre.c (pre_expr_DFS): New overload for visiting
            values, visiting all leaders for a value.  Use a bitmap
            for visited values.
            (sorted_array_from_bitmap_set): Walk over values and adjust.
    
            * gcc.dg/pr97806.c: New testcase.
Comment 7 Richard Biener 2020-11-12 10:01:12 UTC
Fixed.