Fortran: fix dependency checks for inquiry refs [PR115039]
[official-gcc.git] / gcc / testsuite / gcc.target / mips / pr51513-1.c
blobb5e0d69fa2902e58cc48959cef9d37e440913a10
1 /* { dg-do compile } */
2 /* { dg-options "-mips16 -mcode-readable=yes" } */
4 /* PR tree-optimization/51513 verification variant for MIPS16, #1. */
6 int __attribute__ ((weak))
7 frob (int i)
9 switch (i)
11 case -5:
12 return -2;
13 case -3:
14 return -1;
15 case 0:
16 return 0;
17 case 3:
18 return 1;
19 case 5:
20 break;
21 default:
22 __builtin_unreachable ();
24 return i;
27 /* Without the fix for PR tree-optimization/51513 truncated code
28 would be emitted for `frob', like:
30 .text
31 .align 2
32 .weak frob
33 .set mips16
34 .set nomicromips
35 .ent frob
36 .type frob, @function
37 frob:
38 .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0
39 .mask 0x00000000,0
40 .fmask 0x00000000,0
41 addiu $2,$4,5
42 .end frob
43 .size frob, .-frob
45 meaning `frob' will have no chance to return, let alone produce
46 the result expected. */
48 /* { dg-final { scan-assembler "\tjrc?\t\\\$31\n" } } */