Patchwork [testsuite] : Fix another LP64 vs LLP64 issue

login
register
mail settings
Submitter Kai Tietz
Date June 27, 2012, 7:21 p.m.
Message ID <CAEwic4ZTgH-dHms8hbyry1EbLQSXmTF2duw4pRLKYPxHS0+chQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/167732/
State New
Headers show

Comments

Kai Tietz - June 27, 2012, 7:21 p.m.
Hi,

this patch fixes a testsuite-failure for LLP64 targets.

ChangeLog

2012-06-27  Kai Tietz

        * g++.dg/cpp0x/constexpr-52672.C (ul_ptr): Use SIZE_TYPE instead of
        hard-coded 'unsigned long'.

Tested for x86_64-w64-mingw32, and x86_64-unknown-linux-gnu.  Ok for apply?

Regards,
Kai


// { dg-error "" }
Mike Stump - June 27, 2012, 11:56 p.m.
On Jun 27, 2012, at 12:21 PM, Kai Tietz wrote:
> this patch fixes a testsuite-failure for LLP64 targets.
> 
> ChangeLog
> 
> 2012-06-27  Kai Tietz
> 
>        * g++.dg/cpp0x/constexpr-52672.C (ul_ptr): Use SIZE_TYPE instead of
>        hard-coded 'unsigned long'.

> Ok for apply?

Ok.

Patch

Index: testsuite/g++.dg/cpp0x/constexpr-52672.C
===================================================================
--- testsuite/g++.dg/cpp0x/constexpr-52672.C    (revision 189009)
+++ testsuite/g++.dg/cpp0x/constexpr-52672.C    (working copy)
@@ -2,7 +2,7 @@ 
 // { dg-do compile }
 // { dg-options "-std=c++11" }

-typedef unsigned long * ul_ptr;
+__extension__ typedef __SIZE_TYPE__ * ul_ptr;
 constexpr unsigned long a = *((ul_ptr)0x0); // { dg-error "" }
 constexpr unsigned long b = *((ul_ptr)(*((ul_ptr)0x0))); // { dg-error "" }
 constexpr unsigned long c = *((ul_ptr)*((ul_ptr)(*((ul_ptr)0x0))));