Skip to content

[PowerPC] Wrong code at Os #158431

@XChy

Description

@XChy

Generated by Csmith:

#include "csmith.h"
struct S0 {
  int32_t f1
};
struct {
  struct S0 f3
} g_4, g_1048;
int8_t g_470;
int main() {
  int print_hash_value, i, j;
  crc32_gentab();
  int32_t *l_7 = &g_4;
  int32_t *l_10 = &g_4;
  uint64_t l_18[9][3];
  i = 0;
  for (; i < 9; i++)
    for (; j < 3; j++)
      l_18[i][j] = 9055118;
  for (g_1048.f3.f1 = 0; g_1048.f3.f1 != 8;
       g_1048.f3.f1 = safe_sub_func_uint64_t_u_u(g_1048.f3.f1, 6))
    *l_7 |= l_18[6][0];
  g_470 = safe_rshift_func_uint8_t_u_u(
      safe_sub_func_int64_t_s_s(safe_lshift_func_uint64_t_u_s(*l_10, 0), 0), 0);
  transparent_crc(g_470, "", print_hash_value);
  platform_main_end(crc32_context, print_hash_value);
}

Compile with -Os and run on qemu-ppc64le:

checksum = 368DB106

On X86 it outputs:

checksum = DEBB20E3

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions