diff mbox

[trans-mem] fix memopt-1.c for 32bits

Message ID 4EB98F59.7050600@gmail.com
State New
Headers show

Commit Message

Patrick Marlier Nov. 8, 2011, 8:21 p.m. UTC
In x86/32bits, long is 4bytes, and the test checks for _ITM_RU8 
(8bytes). I propose to change to long long (it is C99 but it should not 
be a problem, right?). The other way could be to change the regex but we 
don't want that.

Tested on x86.
Richard/Aldy, can you apply it to trunk and trans-mem? (of course if 
approved). It removes a unexpected failure on x86/32.

Patrick.

         * testsuite/gcc.dg/tm/memopt-1.c: Use long long.

Comments

Richard Henderson Nov. 8, 2011, 9:29 p.m. UTC | #1
On 11/08/2011 12:21 PM, Patrick Marlier wrote:
> The other way could be to change the regex but we don't want that.

Why not?


r~
Patrick Marlier Nov. 8, 2011, 10:08 p.m. UTC | #2
On 11/08/2011 04:29 PM, Richard Henderson wrote:
> On 11/08/2011 12:21 PM, Patrick Marlier wrote:
>> The other way could be to change the regex but we don't want that.
>
> Why not?

My guess was that the purpose to have "long" in the testcase was to test 
the generation of another TM-builtin than _ITM_RU4.
3 possibilities to fix:
- change g to "long long"
- change g to "int" and match _ITM_RU4 for g
- change the match for g to _ITM_RU[48]

Patrick.
Richard Henderson Nov. 8, 2011, 10:25 p.m. UTC | #3
On 11/08/2011 02:08 PM, Patrick Marlier wrote:
> - change the match for g to _ITM_RU[48]

Change the match to [248].


r~
diff mbox

Patch

Index: testsuite/gcc.dg/tm/memopt-1.c
===================================================================
--- testsuite/gcc.dg/tm/memopt-1.c      (revision 181162)
+++ testsuite/gcc.dg/tm/memopt-1.c      (working copy)
@@ -1,7 +1,7 @@ 
  /* { dg-do compile } */
  /* { dg-options "-fgnu-tm -O -fdump-tree-tmmemopt" } */

-long g, xxx, yyy;
+long long g, xxx, yyy;
  extern george() __attribute__((transaction_callable));
  extern ringo(long int);
  int i;