Patchwork [testsuite] Use complex floating-point constant in the macro CDBL

login
register
mail settings
Submitter Yufeng Zhang
Date Nov. 22, 2011, 3:11 p.m.
Message ID <4ECBBB95.6000705@arm.com>
Download mbox | patch
Permalink /patch/127105/
State New
Headers show

Comments

Yufeng Zhang - Nov. 22, 2011, 3:11 p.m.
Hi,

This patch changes the macro CDBL in gcc.dg/compat/compat-common.h
to use complex floating-point constant rather than complex integer
constant.

CDBL is a macro to help construct complex floating-point constants in a
number of compat tests.

I have been running the compat test against a compiler that only supports
floating-point complex types; having an integral complex constant in
CDBL has caused some troubles.

Is it OK for trunk?

Thanks,
Yufeng

gcc/testsuite/ChangeLog
2011-11-22  Yufeng Zhang <yufeng.zhang@arm.com>

         Use complex floating-point constant in CDBL.

         * gcc.dg/compat/compat-common.h (CDBL): Replace 1i with 1.0i.
Yufeng Zhang - Nov. 29, 2011, 1:20 p.m.
PING.

On 11/22/11 15:11, Yufeng Zhang wrote:
> Hi,
>
> This patch changes the macro CDBL in gcc.dg/compat/compat-common.h
> to use complex floating-point constant rather than complex integer
> constant.
>
> CDBL is a macro to help construct complex floating-point constants in a
> number of compat tests.
>
> I have been running the compat test against a compiler that only supports
> floating-point complex types; having an integral complex constant in
> CDBL has caused some troubles.
>
> Is it OK for trunk?
>
> Thanks,
> Yufeng
>
> gcc/testsuite/ChangeLog
> 2011-11-22  Yufeng Zhang  <yufeng.zhang@arm.com>
>
>           Use complex floating-point constant in CDBL.
>
>           * gcc.dg/compat/compat-common.h (CDBL): Replace 1i with 1.0i.
>
>
> patch.txt
>
>
> diff --git a/gcc/testsuite/gcc.dg/compat/compat-common.h b/gcc/testsuite/gcc.dg/compat/compat-common.h
> index 8a92ea3..4b3fb9c 100644
> --- a/gcc/testsuite/gcc.dg/compat/compat-common.h
> +++ b/gcc/testsuite/gcc.dg/compat/compat-common.h
> @@ -33,7 +33,7 @@
>   #ifndef SKIP_COMPLEX
>   #ifdef __GNUC__
>   #define CINT(x, y) (x + y * __extension__ 1i)
> -#define CDBL(x, y) (x + y * __extension__ 1i)
> +#define CDBL(x, y) (x + y * __extension__ 1.0i)
>   #else
>   #ifdef __SUNPRO_C
>   /* ??? Complex support without<complex.h>.  */
>
Richard Earnshaw - Nov. 29, 2011, 1:23 p.m.
On 29/11/11 13:20, Yufeng Zhang wrote:
> PING.
> 
> On 11/22/11 15:11, Yufeng Zhang wrote:
>> Hi,
>>
>> This patch changes the macro CDBL in gcc.dg/compat/compat-common.h
>> to use complex floating-point constant rather than complex integer
>> constant.
>>
>> CDBL is a macro to help construct complex floating-point constants in a
>> number of compat tests.
>>
>> I have been running the compat test against a compiler that only supports
>> floating-point complex types; having an integral complex constant in
>> CDBL has caused some troubles.
>>
>> Is it OK for trunk?
>>
>> Thanks,
>> Yufeng
>>
>> gcc/testsuite/ChangeLog
>> 2011-11-22  Yufeng Zhang  <yufeng.zhang@arm.com>
>>
>>           Use complex floating-point constant in CDBL.
>>
>>           * gcc.dg/compat/compat-common.h (CDBL): Replace 1i with 1.0i.
>>
>>

OK

R.

Patch

diff --git a/gcc/testsuite/gcc.dg/compat/compat-common.h b/gcc/testsuite/gcc.dg/compat/compat-common.h
index 8a92ea3..4b3fb9c 100644
--- a/gcc/testsuite/gcc.dg/compat/compat-common.h
+++ b/gcc/testsuite/gcc.dg/compat/compat-common.h
@@ -33,7 +33,7 @@ 
 #ifndef SKIP_COMPLEX
 #ifdef __GNUC__
 #define CINT(x, y) (x + y * __extension__ 1i)
-#define CDBL(x, y) (x + y * __extension__ 1i)
+#define CDBL(x, y) (x + y * __extension__ 1.0i)
 #else
 #ifdef __SUNPRO_C
 /* ??? Complex support without <complex.h>.  */