[Bug middle-end/105312] New: attribute__((optimize("-O3"))) stress_matrix_xy_identity compiling stress-ng for arm

raj.khem at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Apr 19 17:34:44 GMT 2022


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

            Bug ID: 105312
           Summary: attribute__((optimize("-O3")))
                    stress_matrix_xy_identity compiling stress-ng for arm
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: raj.khem at gmail dot com
  Target Milestone: ---

GCC 12 gets into an ICE when compiling this testcase (reduced from stress-ng)

typedef float stress_matrix_type_t;
typedef unsigned int size_t;
static void __attribute__((optimize("-O3"))) stress_matrix_xy_identity(
 const size_t n,
 stress_matrix_type_t a[restrict n][n],
 stress_matrix_type_t b[restrict n][n],
 stress_matrix_type_t r[restrict n][n])
{
 register size_t i;
 (void)a;
 (void)b;
 for (i = 0; i < n; i++) {
  register size_t j;
  for (j = 0; j < n; j++)
   r[i][j] = (i == j) ? 1.0 : 0.0;
   return;
 }
}

===============================

arm-yoe-linux-musleabi-gcc -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a15
-fstack-protector-strong -D_FORTIFY_SOURCE=2 stress-matrix.i
during GIMPLE pass: isel
stress-matrix.i: In function 'stress_matrix_xy_identity':
stress-matrix.i:3:46: internal compiler error: in gimple_expand_vec_cond_expr,
at gimple-isel.cc:268
    3 | static void __attribute__((optimize("-O3"))) stress_matrix_xy_identity(
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
0x15d4b28 internal_error(char const*, ...)
        ???:0
0x6005fb fancy_abort(char const*, int, char const*)
        ???: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.


More information about the Gcc-bugs mailing list