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

--- Comment #1 from Erick Ochoa <eochoa at gcc dot gnu.org> ---
Hi,

I have an ICE on this assertion as well, but I found it by compiling x264_r
with the following flags

```
   OPTIMIZE         = -g -Ofast -funroll-loops -flto
   COPTIMIZE        = --param early-inlining-insns=51
   PASS1_FLAGS      = -fprofile-generate
   PASS2_FLAGS      = -fprofile-use
```

I did a bisection and I think it might be related to commit
a11ef53238c8ebaab9a3fbf200cb8b5c997b473b.

Here is my stack trace. Please note that the assertion is in a different line
in the above commit, but it is the same assertion as the snapshot reported by
Arseny.

```
x264_src/encoder/analyse.c: In function 'x264_analyse_update_cache':
x264_src/encoder/analyse.c:3319:13: internal compiler error: in expand_mult, at
expmed.c:3575
 3319 | static void x264_analyse_update_cache( x264_t *h, x264_mb_analysis_t *a
 )
      |             ^
0x8797b3 expand_mult(machine_mode, rtx_def*, rtx_def*, rtx_def*, int, bool)
        /home/eochoa/gcc/gcc/expmed.c:3575
0x8a33db expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        /home/eochoa/gcc/gcc/expr.c:9205
0x75845f expand_gimple_stmt_1
        /home/eochoa/gcc/gcc/cfgexpand.c:3947
0x75845f expand_gimple_stmt
        /home/eochoa/gcc/gcc/cfgexpand.c:4008
0x75fa13 expand_gimple_basic_block
        /home/eochoa/gcc/gcc/cfgexpand.c:6045
0x761bc7 execute
        /home/eochoa/gcc/gcc/cfgexpand.c:6729
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
lto-wrapper: fatal error: /home/eochoa/gcc-inst/bin/gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
specmake: *** [/home/eochoa/cpu2017-unmodified/benchspec/Makefile.defaults:337:
x264_r] Error 1
```

For me, the error is triggered:
* in the second compilation stage (i.e., when -fprofile-use is used)
* --param early-inlining-insns=51 needs to be set. Otherwise, the error is not
observed. I haven't tried with some lower values
* I haven't had the time to toggle the other flags, nor reduce the test case.

Reply via email to