Patchwork [testsuite,stdint] Patch for gcc.dg/torture/pr44806.c

login
register
mail settings
Submitter Steve Ellcey
Date Sept. 2, 2010, 4:25 p.m.
Message ID <201009021625.o82GPVc11962@lucas.cup.hp.com>
Download mbox | patch
Permalink /patch/63504/
State New
Headers show

Comments

Steve Ellcey - Sept. 2, 2010, 4:25 p.m.
Unless I get an objection I will check in this testsuite patch as
obvious.  The test includes stdint.h and uses uint32_t so it should only
be run on targets that support the stdint types.

Tested on IA64 HP-UX and Linux.

Steve Ellcey
sje@cup.hp.com


2010-09-02  Steve Ellcey  <sje@cup.hp.com>

	* gcc.dg/torture/pr44806.c: Require stdint_types.
Andrew Pinski - Sept. 2, 2010, 4:29 p.m.
Shouldn't target stdint_types be true now for all targets? Sinc

On Sep 2, 2010, at 9:25 AM, Steve Ellcey <sje@cup.hp.com> wrote:

> Unless I get an objection I will check in this testsuite patch as
> obvious.  The test includes stdint.h and uses uint32_t so it should  
> only
> be run on targets that support the stdint types.
>
> Tested on IA64 HP-UX and Linux.
>
> Steve Ellcey
> sje@cup.hp.com
>
>
> 2010-09-02  Steve Ellcey  <sje@cup.hp.com>
>
>    * gcc.dg/torture/pr44806.c: Require stdint_types.
>
>
> Index: gcc.dg/torture/pr44806.c
> ===================================================================
> --- gcc.dg/torture/pr44806.c    (revision 163437)
> +++ gcc.dg/torture/pr44806.c    (working copy)
> @@ -1,4 +1,4 @@
> -/* { dg-do run } */
> +/* { dg-do run  { target { stdint_types } } } */
>
> #include <stdint.h>
>
Steve Ellcey - Sept. 2, 2010, 4:37 p.m.
On Thu, 2010-09-02 at 09:29 -0700, Andrew Pinski wrote:
> Shouldn't target stdint_types be true now for all targets? Sinc

I think stdint.h should exist for all targets now but I am not sure if
the types like uint32_t will always exist.  The failure I am getting
is because uint32_t is not defined.

It looks like (at least on IA64 HP-UX) uint32_t is only defined if I
specify -std=c99.

Steve Ellcey
sje@cup.hp.com
Richard Henderson - Sept. 2, 2010, 7:42 p.m.
On 09/02/2010 09:37 AM, Steve Ellcey wrote:
> On Thu, 2010-09-02 at 09:29 -0700, Andrew Pinski wrote:
>> Shouldn't target stdint_types be true now for all targets? Sinc
> 
> I think stdint.h should exist for all targets now but I am not sure if
> the types like uint32_t will always exist.  The failure I am getting
> is because uint32_t is not defined.
> 
> It looks like (at least on IA64 HP-UX) uint32_t is only defined if I
> specify -std=c99.

The test case would not be hurt by either adding -std=c99 to dg-options,
or switching the types to "unsigned" and "unsigned long long".

I'm fine with either of those changes.


r~
Steve Ellcey - Sept. 3, 2010, 4:04 p.m.
On Thu, 2010-09-02 at 12:42 -0700, Richard Henderson wrote:
> On 09/02/2010 09:37 AM, Steve Ellcey wrote:
> > On Thu, 2010-09-02 at 09:29 -0700, Andrew Pinski wrote:
> >> Shouldn't target stdint_types be true now for all targets? Sinc
> > 
> > I think stdint.h should exist for all targets now but I am not sure if
> > the types like uint32_t will always exist.  The failure I am getting
> > is because uint32_t is not defined.
> > 
> > It looks like (at least on IA64 HP-UX) uint32_t is only defined if I
> > specify -std=c99.
> 
> The test case would not be hurt by either adding -std=c99 to dg-options,
> or switching the types to "unsigned" and "unsigned long long".
> 
> I'm fine with either of those changes.
> 
> 
> r~

I checked in a patch to add -std=c99.

Steve Ellcey
sje@cup.hp.com

Patch

Index: gcc.dg/torture/pr44806.c
===================================================================
--- gcc.dg/torture/pr44806.c	(revision 163437)
+++ gcc.dg/torture/pr44806.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-do run } */
+/* { dg-do run  { target { stdint_types } } } */
 
 #include <stdint.h>