From fca8ed94a2c35b23fb2e98f99a41f294086d9501 Mon Sep 17 00:00:00 2001 From: Chao-ying Fu Date: Sat, 22 Sep 2007 00:27:56 +0000 Subject: target-supports.exp (check_effective_target_fixed_point): New to check if targets have fixed-point supports. * lib/target-supports.exp (check_effective_target_fixed_point): New to check if targets have fixed-point supports. * gcc.dg/fixed-point/fixed-point.exp: New file. * gcc.dg/fixed-point/addsub.c, gcc.dg/fixed-point/allconv.c, * gcc.dg/fixed-point/allop.c, gcc.dg/fixed-point/call-by-value.c, * gcc.dg/fixed-point/cast-bad.c, gcc.dg/fixed-point/composite-type.c, * gcc.dg/fixed-point/const-1.c, gcc.dg/fixed-point/constant.c, * gcc.dg/fixed-point/constants-pedantic.c, * gcc.dg/fixed-point/convert.c, gcc.dg/fixed-point/define.c, * gcc.dg/fixed-point/keywords-c89.c, gcc.dg/fixed-point/keywords-c99.c, * gcc.dg/fixed-point/keywords-ignored-c99.c, * gcc.dg/fixed-point/keywords-pedantic.c, * gcc.dg/fixed-point/keywords-reserved.c, gcc.dg/fixed-point/binary.c, * gcc.dg/fixed-point/modes.c, gcc.dg/fixed-point/noassoc.c, * gcc.dg/fixed-point/types.c, gcc.dg/fixed-point/typespec.c, * gcc.dg/fixed-point/unary.c, gcc.dg/fixed-point/func-array.c, * gcc.dg/fixed-point/func-scalar.c, gcc.dg/fixed-point/func-struct.c, * gcc.dg/fixed-point/func-vararg-mixed.c, * gcc.dg/fixed-point/operator-logical.c, * gcc.dg/fixed-point/struct-union.c, * gcc.dg/fixed-point/bit-complement.c, * gcc.dg/fixed-point/operator-bitwise.c, * gcc.dg/fixed-point/operator-comma.c, * gcc.dg/fixed-point/struct-layout-1.c, * gcc.dg/fixed-point/union-init.c, * gcc.dg/fixed-point/Wbad-function-cast-1.c, * gcc.dg/fixed-point/func-mixed.c, * gcc.dg/fixed-point/func-vararg-size0.c, * gcc.dg/fixed-point/func-vararg.c, gcc.dg/fixed-point/int-warning.c, * gcc.dg/fixed-point/loop-index.c, gcc.dg/fixed-point/operator-cond.c, * gcc.dg/fixed-point/operator-unary.c, * gcc.dg/fixed-point/allop-const.c, * gcc.dg/fixed-point/muldiv-warning.c, * gcc.dg/nofixed-point-1.c, * gcc.target/mips/dpaq_sa_l_w.c, gcc.target/mips/dpsq_sa_l_w.c, * gcc.target/mips/fixed-vector-type.c, * gcc.target/mips/fixed-scalar-type.c: New tests. From-SVN: r128661 --- gcc/testsuite/gcc.dg/fixed-point/constant.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/fixed-point/constant.c (limited to 'gcc/testsuite/gcc.dg/fixed-point/constant.c') diff --git a/gcc/testsuite/gcc.dg/fixed-point/constant.c b/gcc/testsuite/gcc.dg/fixed-point/constant.c new file mode 100644 index 0000000..18abb45 --- /dev/null +++ b/gcc/testsuite/gcc.dg/fixed-point/constant.c @@ -0,0 +1,28 @@ +/* { dg-do compile } */ +/* { dg-options "-std=gnu99" } */ + +/* N1169 6.4.4.2a - Fixed-point constants (NEW CLAUSE). + + Check if fixed-point constants are ok. */ + +_Accum k0 = 0k; +_Accum k1 = 9999.0e0k; +_Accum k2 = 9999.0k; +_Accum k3 = 9999k; +_Accum k4 = 9999e0k; +_Accum k5 = 09999k; +_Accum k6 = 09999e0k; +_Accum k7 = 09999.0e0k; +_Accum k8 = 09999.0k; +_Accum k9 = 0x270fp0k; +_Accum k10 = 0x270f.0p0k; + +_Fract r0 = 0r; +_Fract r1 = 0e0r; +_Fract r2 = 0.0e0r; +_Fract r3 = 0.1e0r; +_Fract r4 = 0.0r; +_Fract r5 = 0.1r; +_Fract r6 = 0x0p0r; +_Fract r7 = 0x0.0p0r; +_Fract r8 = 0x0.1p0r; -- cgit v1.1