Bug 107149 - [13 Regression] ICE during RTL pass: dse2 - internal compiler error: in require, at machmode.h:297
Summary: [13 Regression] ICE during RTL pass: dse2 - internal compiler error: in requi...
Status: RESOLVED DUPLICATE of bug 107094
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 13.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build, ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2022-10-04 09:14 UTC by Tobias Burnus
Modified: 2022-10-04 09:28 UTC (History)
2 users (show)

See Also:
Host:
Target: amdgcn-amdhsa
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2022-10-04 09:14:38 UTC
Building current GCC mainline for AMDGCN, it fails when building libgfortran for several files with:

during RTL pass: dse2
src/gcc-mainline/libgfortran/generated/maxloc1_16_i1.c: In function 'mmaxloc1_16_i1':
src/gcc-mainline/libgfortran/generated/maxloc1_16_i1.c:460:1: internal compiler error: in require, at machmode.h:297
  460 | }
      | ^
0x672c50 opt_mode<scalar_int_mode>::require() const
        src/gcc-mainline/gcc/machmode.h:297
0x67474a opt_mode<scalar_int_mode>::require() const
        src/gcc-mainline/gcc/cselib.cc:1567
0x67474a void mode_iterator::get_known_wider<scalar_int_mode>(scalar_int_mode*)
        src/gcc-mainline/gcc/machmode.h:1124
0x67474a new_cselib_val
        src/gcc-mainline/gcc/cselib.cc:1579
0xabbc6b cselib_lookup_1
        src/gcc-mainline/gcc/cselib.cc:2315
0xabbf4e cselib_lookup(rtx_def*, machine_mode, int, machine_mode)
        src/gcc-mainline/gcc/cselib.cc:2431
0xabeaf0 cselib_record_sets
        src/gcc-mainline/gcc/cselib.cc:2932
0xabfb59 cselib_process_insn(rtx_insn*)
        src/gcc-mainline/gcc/cselib.cc:3159
0x178d554 dse_step1
        src/gcc-mainline/gcc/dse.cc:2771
0x178d554 rest_of_handle_dse
        src/gcc-mainline/gcc/dse.cc:3687
0x178d554 execute
        src/gcc-mainline/gcc/dse.cc:3760


Side note: I did spot in the log file the follow warning, which looks as if it could be related:

src/gcc-mainline/gcc/expmed.cc: In function 'rtx_def* extract_bit_field_1(rtx, poly_uint64, poly_uint64, int, rtx,
 machine_mode, machine_mode, bool, bool, rtx_def**)':
src/gcc-mainline/gcc/expmed.cc:1838:45: warning: '*(unsigned int*)((char*)&imode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))' may be used uninitialized in this function [-Wmaybe-uninitialized]
 1838 |       rtx sub = extract_bit_field_as_subreg (mode1, op0, imode,
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
 1839 |                                              bitsize, bitnum);
      |                                              ~~~~~~~~~~~~~~~~
Comment 1 Martin Liška 2022-10-04 09:28:43 UTC
Dup.

*** This bug has been marked as a duplicate of bug 107094 ***