diff mbox

[RFC] Tweak gcc.c-torture/execute/pr39228.c

Message ID 20140903.142610.389979994.kkojima@rr.iij4u.or.jp
State New
Headers show

Commit Message

Kaz Kojima Sept. 3, 2014, 5:26 a.m. UTC
Oleg Endo <oleg.endo@t-online.de> wrote:
> -mieee should be the default on sh* and thus can be removed from the dg-options line, or is it not?  If -mieee is still needed (for alpha) maybe it's better to use dg-additional-options instead?

Sure.  The attached is a revised one.

Regards,
	kaz
--
	* gcc.c-torture/execute/pr39228.c: Use dg-additional-options
	instead of dg-options and remove sh*-*-* from its target list.
	Add "inline" keyword to test functions.

Comments

Jeff Law Sept. 3, 2014, 7:03 p.m. UTC | #1
On 09/02/14 23:26, Kaz Kojima wrote:
> Oleg Endo <oleg.endo@t-online.de> wrote:
>> -mieee should be the default on sh* and thus can be removed from the dg-options line, or is it not?  If -mieee is still needed (for alpha) maybe it's better to use dg-additional-options instead?
>
> Sure.  The attached is a revised one.
>
> Regards,
> 	kaz
> --
> 	* gcc.c-torture/execute/pr39228.c: Use dg-additional-options
> 	instead of dg-options and remove sh*-*-* from its target list.
> 	Add "inline" keyword to test functions.
Wouldn't we be better off moving this into execute/ieee?

jeff
Kaz Kojima Sept. 4, 2014, 12:22 a.m. UTC | #2
Jeff Law <law@redhat.com> wrote:
>> 	* gcc.c-torture/execute/pr39228.c: Use dg-additional-options
>> 	instead of dg-options and remove sh*-*-* from its target list.
>> 	Add "inline" keyword to test functions.
> Wouldn't we be better off moving this into execute/ieee?

I've tried it and found that all execute/ieee tests are compiled
with -fno-inline.  Perhaps it's a reason for not having moved
that test into there, though I could be wrong about that.

Regards,
	kaz
Jeff Law Sept. 5, 2014, 4:39 a.m. UTC | #3
On 09/03/14 18:22, Kaz Kojima wrote:
> Jeff Law <law@redhat.com> wrote:
>>> 	* gcc.c-torture/execute/pr39228.c: Use dg-additional-options
>>> 	instead of dg-options and remove sh*-*-* from its target list.
>>> 	Add "inline" keyword to test functions.
>> Wouldn't we be better off moving this into execute/ieee?
>
> I've tried it and found that all execute/ieee tests are compiled
> with -fno-inline.  Perhaps it's a reason for not having moved
> that test into there, though I could be wrong about that.
More likely nobody even pondered it.  I'm not going to object to just 
tweaking the test in-place, but just wanted to throw out a suggestion 
that might be worth investigation.

jeff
diff mbox

Patch

--- ORIG/trunk/gcc/testsuite/gcc.c-torture/execute/pr39228.c	2014-08-26 09:26:20.000000000 +0900
+++ trunk/gcc/testsuite/gcc.c-torture/execute/pr39228.c	2014-09-03 14:16:23.313631715 +0900
@@ -1,23 +1,23 @@ 
-/* { dg-options "-mieee" { target sh*-*-* alpha*-*-* } } */
+/* { dg-additional-options "-mieee" { target alpha*-*-* } } */
 /* { dg-skip-if "No Inf/NaN support" { spu-*-* } "*" "" } */
 
 extern void abort (void);
 
-static int __attribute__((always_inline)) testf (float b)
+static inline int __attribute__((always_inline)) testf (float b)
 {
   float c = 1.01f * b;
 
   return __builtin_isinff (c);
 }
 
-static int __attribute__((always_inline)) test (double b)
+static inline int __attribute__((always_inline)) test (double b)
 {
   double c = 1.01 * b;
 
   return __builtin_isinf (c);
 }
 
-static int __attribute__((always_inline)) testl (long double b)
+static inline int __attribute__((always_inline)) testl (long double b)
 {
   long double c = 1.01L * b;