OSDN Git Service

Backport from mainline:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / sh / pr49880-4.c
1 /* Check that the option -mdiv=call-fp does not produce calls to the
2    library function that uses FPU to implement integer division if FPU insns
3    are not supported or are disabled.  */
4 /* { dg-do compile { target "sh*-*-*" } }  */
5 /* { dg-options "-mdiv=call-fp" }  */
6 /* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" } }  */
7 /* { dg-final { scan-assembler-not "sdivsi3_i4\n|udivsi3_i4\n" } }  */
8
9 int
10 test00 (int a, int b)
11 {
12   return a / b;
13 }
14
15 unsigned int
16 test01 (unsigned int a, unsigned b)
17 {
18   return a / b;
19 }