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

            Bug ID: 115816
           Summary: ICE: in emit_move_insn, at expr.cc:4611 with
                    target("sse4.1,arch=core2") attribute and -mavx512f
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iamanonymous.cs at gmail dot com
  Target Milestone: ---

*******************************************************************************
OS and Platform:
$ uname -a:
Linux 65dac7c84719 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC
2023 x86_64 x86_64 x86_64 GNU/Linux
*******************************************************************************
gcc version:
Using built-in specs.
COLLECT_GCC=/home/software/gcc-trunk-3aa004f/bin/gcc
COLLECT_LTO_WRAPPER=/home/software/gcc-trunk-3aa004f/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --disable-multilib --disable-bootstrap
--enable-languages=c,c++ --prefix=/home/software/gcc-trunk-3aa004f
--enable-coverage
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240630 (experimental) (GCC) 

*******************************************************************************
Program:
$ cat mutant.c
register __attribute__((__vector_size__(16 * sizeof(float)))) float a,
    b asm("zmm6"), c;
__attribute__((target("sse4.1,arch=core2"))) void d() {
  for (int e;;)
    c[e] = a[e] < b[e];
}

*******************************************************************************
Command Lines:
$ gcc -mavx512f mutant.c
mutant.c:2:5: warning: call-clobbered register used for global register
variable
    2 |     b asm("zmm6"), c;
      |     ^
mutant.c:1:69: error: register name not specified for 'a'
    1 | register __attribute__((__vector_size__(16 * sizeof(float)))) float a,
      |                                                                     ^
mutant.c:2:20: error: register name not specified for 'c'
    2 |     b asm("zmm6"), c;
      |                    ^
during RTL pass: expand
mutant.c: In function 'd':
mutant.c:5:20: internal compiler error: in emit_move_insn, at expr.cc:4611
    5 |     c[e] = a[e] < b[e];
      |                   ~^~~
0x5071bcf diagnostic_context::report_diagnostic(diagnostic_info*)
        ???:0
0x50724a1 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1],
diagnostic_t)
        ???:0
0x50924c7 internal_error(char const*, ...)
        ???:0
0x50729e4 fancy_abort(char const*, int, char const*)
        ???:0
0x147c27f emit_move_insn(rtx_def*, rtx_def*)
        ???:0
0x14b3d1b expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ???:0
0x149e86c expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        ???:0
0x148b3db store_expr(tree_node*, rtx_def*, int, bool, bool)
        ???:0
0x14885d9 expand_assignment(tree_node*, tree_node*, bool)
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Also ICE on trunk.
Compiler Explorer: https://godbolt.org/z/deK4G7bGP
  • [Bug target/115816] New: ICE... iamanonymous.cs at gmail dot com via Gcc-bugs

Reply via email to