OSDN Git Service

PR testsuite/21010
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / mips-args-1.c
1 /* Check that certain preprocessor macros are defined, and do some
2    consistency checks.  */
3 /* { dg-do compile { target mips*-*-* } } */
4
5 const char *compiled_for = _MIPS_ARCH;
6 const char *optimized_for = _MIPS_TUNE;
7
8 #if __mips_fpr != 32 && __mips_fpr != 64
9 #error Bad __mips_fpr
10 #endif
11
12 /* Test complementary macro pairs: exactly one of each pair
13    must be defined.  */
14
15 #if defined (_R3000) == defined (_R4000) && !defined (__sgi__)
16 #error _R3000 / _R4000 mismatch
17 #endif
18
19 #if defined (__mips_hard_float) == defined (__mips_soft_float)
20 #error __mips_hard_float / __mips_soft_float mismatch
21 #endif
22
23 #if defined (_MIPSEL) == defined (_MIPSEB)
24 #error _MIPSEL / _MIPSEB mismatch
25 #endif
26
27 /* Check for __mips64 consistency.  */
28
29 #if defined (__mips64) != defined (_R4000) && !defined (__sgi__)
30 #error __mips64 / _R4000 mismatch
31 #endif
32
33 #if defined (__mips64) && __mips != 3 && __mips != 4 && __mips != 64
34 #error __mips64 / __mips mismatch
35 #endif