1 /* { dg-do compile } */
2 /* { dg-options "-mmicromips" } */
3
4 void
unreachable(int i)5 unreachable (int i)
6 {
7 asm volatile goto ("b\t.\n\tbeqz\t%0,%l1" : : "r" (i) : : punt);
8 punt:
9 __builtin_unreachable ();
10 }
11
12 /* Expect assembly like:
13
14 beqz $4,$L2
15 # Anything goes here.
16 $L2: # The label must match.
17 .insn
18 $L3 = . # It's there, but we don't care.
19 .end unreachable
20
21 that is .insn to be inserted if a code label is at function's end. */
22
23 /* { dg-final { scan-assembler "\tbeqz\t\\\$\[0-9\]+,(.L\[0-9\]+)\n.*\n\\1:\n\t\\.insn\n(?:.L\[0-9\]+ = \\.\n)?\t\\.end\tunreachable\n" } } */
24