blob: 42501952f9cee93216dc0af57d5a92cd5b1c9b73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* { dg-do compile } */
/* { dg-options "-mno-micromips -mno-mips16" } */
void
unreachable (int i)
{
asm volatile goto ("b\t.\n\tbeqz\t%0,%l1" : : "r" (i) : : punt);
punt:
__builtin_unreachable ();
}
/* Expect assembly like:
beqz $4,$L2
# Anything goes here.
$L2: # The label must match.
.insn
$L3 = . # It's there, but we don't care.
.end unreachable
that is .insn to be inserted if a code label is at function's end. */
/* { 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" } } */
|