aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr109652.c
blob: b3d5de9c61e4b94814e902212f5aa6acba08ef97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* { dg-do compile } */
/* { dg-additional-options "-std=gnu17" } */

typedef int UInt;
UInt skeletal_RI5_instr;
__attribute__((__noreturn__)) void vex_assert_fail();
typedef struct {
  union {
    struct {
      UInt imm5;
    } I5;
  } ARMri5;
} ARMRI5;
typedef enum { ARMin_Alu, ARMin_Shift } ARMInstrTag;
void iregEnc();
static UInt skeletal_RI5(ARMRI5 *ri) {
  UInt imm5 = ri->ARMri5.I5.imm5;
  __builtin_expect(imm5, 1) ?: vex_assert_fail();
  iregEnc(ri->ARMri5);
  return skeletal_RI5_instr;
}
ARMInstrTag emit_ARMInstr_i_0;
void *emit_ARMInstr_disp_cp_chain_me_to_slowEP() {
  switch (emit_ARMInstr_i_0) {
  case ARMin_Alu:
    UInt instr, subopc;
    UInt rD, rN;
    goto bad;
    instr |= subopc | rN;
  case ARMin_Shift:
    rD = 0;
    UInt rM = 0;
    ARMRI5 argR;
    instr = skeletal_RI5(&argR);
    instr |= rD | rM;
    goto done;
  }
bad:
done:
  return 0;
}