public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
@ 2011-11-21 19:15 ro at gcc dot gnu.org
  2011-11-21 19:32 ` [Bug middle-end/51258] " amacleod at redhat dot com
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: ro at gcc dot gnu.org @ 2011-11-21 19:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

             Bug #: 51258
           Summary: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure
                    on 32-bit Solaris/x86
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ro@gcc.gnu.org
                CC: rth@gcc.gnu.org
              Host: i386-pc-solaris2.1[01]
            Target: i386-pc-solaris2.1[01]
             Build: i386-pc-solaris2.1[01]


Several 64-bit atomic-* tests fail to link with a 32-bit Solaris/x86 gcc:

Running target unix/-m64
FAIL: gcc.dg/atomic-compare-exchange-5.c (test for excess errors)
WARNING: gcc.dg/atomic-compare-exchange-5.c compilation failed to produce
executable
FAIL: gcc.dg/atomic-exchange-5.c (test for excess errors)
WARNING: gcc.dg/atomic-exchange-5.c compilation failed to produce executable
FAIL: gcc.dg/atomic-load-5.c execution test
FAIL: gcc.dg/atomic-op-5.c (test for excess errors)
WARNING: gcc.dg/atomic-op-5.c compilation failed to produce executable
FAIL: gcc.dg/atomic-store-5.c (test for excess errors)
WARNING: gcc.dg/atomic-store-5.c compilation failed to produce executable

E.g. 

FAIL: gcc.dg/atomic-compare-exchange-5.c (test for excess errors)
Excess errors:
Undefined            first referenced
 symbol                  in file
__atomic_compare_exchange_16        /var/tmp//ccSEaa.G.o

FAIL: gcc.dg/atomic-exchange-5.c (test for excess errors)
Excess errors:
Undefined            first referenced
 symbol                  in file
__atomic_exchange_16                /var/tmp//cci5aWbI.o

FAIL: gcc.dg/atomic-op-5.c (test for excess errors)
Excess errors:
Undefined            first referenced
 symbol                  in file
__atomic_fetch_nand_16              /var/tmp//ccnFaOtM.o
__atomic_fetch_or_16                /var/tmp//ccnFaOtM.o
__atomic_fetch_add_16               /var/tmp//ccnFaOtM.o
__atomic_fetch_and_16               /var/tmp//ccnFaOtM.o
__atomic_fetch_xor_16               /var/tmp//ccnFaOtM.o
__atomic_fetch_sub_16               /var/tmp//ccnFaOtM.o

FAIL: gcc.dg/atomic-store-5.c (test for excess errors)
Excess errors:
Undefined            first referenced
 symbol                  in file
__atomic_store_16                   /var/tmp//ccV8ayIN.o


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug middle-end/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
@ 2011-11-21 19:32 ` amacleod at redhat dot com
  2011-11-21 20:03 ` rth at gcc dot gnu.org
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: amacleod at redhat dot com @ 2011-11-21 19:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

Andrew Macleod <amacleod at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com

--- Comment #1 from Andrew Macleod <amacleod at redhat dot com> 2011-11-21 19:21:30 UTC ---
32 bit targets don't usually support 128 bit atomic operations natively, and
leave calls to be resolved by an external atomic library.   There was some
issue with X32 support where 32 bit could support it under some circumstances.

Now gcc/testsuite/lib/target-supports.exp defines the testsuite check for
whether 128 bit is supported as:

proc check_effective_target_sync_int_128 { } {
    if { ([istarget x86_64-*-*] || [istarget i?86-*-*])
         && ![is-effective-target ia32] } {
        return 1
    } else {
        return 0
    }
}

I presume if 32 bit solaris isn't supporting 128 bit operations then this needs
to be tweaked...


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug middle-end/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
  2011-11-21 19:32 ` [Bug middle-end/51258] " amacleod at redhat dot com
@ 2011-11-21 20:03 ` rth at gcc dot gnu.org
  2011-11-22 15:10 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rth at gcc dot gnu.org @ 2011-11-21 20:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

--- Comment #2 from Richard Henderson <rth at gcc dot gnu.org> 2011-11-21 19:41:16 UTC ---
The quoted test ought to have worked for i386-solaris.
If one of those predicates is wrong (e.g. is-effective-target ia32)
then there are other tests in the testsuite that are going to be
failing unnecessarily.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug middle-end/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
  2011-11-21 19:32 ` [Bug middle-end/51258] " amacleod at redhat dot com
  2011-11-21 20:03 ` rth at gcc dot gnu.org
@ 2011-11-22 15:10 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2011-11-22 16:15 ` amacleod at redhat dot com
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2011-11-22 15:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

--- Comment #3 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-11-22 15:05:13 UTC ---
> --- Comment #1 from Andrew Macleod <amacleod at redhat dot com> 2011-11-21 19:21:30 UTC ---
> 32 bit targets don't usually support 128 bit atomic operations natively, and
> leave calls to be resolved by an external atomic library.   There was some
> issue with X32 support where 32 bit could support it under some circumstances.
>
> Now gcc/testsuite/lib/target-supports.exp defines the testsuite check for
> whether 128 bit is supported as:
>
> proc check_effective_target_sync_int_128 { } {
>     if { ([istarget x86_64-*-*] || [istarget i?86-*-*])
>          && ![is-effective-target ia32] } {
>         return 1
>     } else {
>         return 0
>     }
> }
>
> I presume if 32 bit solaris isn't supporting 128 bit operations then this needs
> to be tweaked...

There's nothing Solaris-specific here, as I'm seeing the same issue on a
bi-arch i386-apple-darwin9.8.0 compiler for the 64-bit multilib.  It
seems the 32-bit compiler doesn't generate the 128-bit atomic insns when
generating 64-bit code.

    Rainer


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug middle-end/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-11-22 15:10 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2011-11-22 16:15 ` amacleod at redhat dot com
  2011-11-22 18:58 ` ubizjak at gmail dot com
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: amacleod at redhat dot com @ 2011-11-22 16:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

--- Comment #4 from Andrew Macleod <amacleod at redhat dot com> 2011-11-22 16:07:52 UTC ---
I built a compiler in my linux box with a target of i386-apple-darwin.

during expanding an atomic_exchange it fails the call to
can_compare_and_swap_p(TImode, true).

It returns CODE_FOR_nothing for both cases:

icode = direct_optab_handler (atomic_compare_and_swap_optab, mode);
if (icode != CODE_FOR_nothing)
  return true;

icode = optab_handler (sync_compare_and_swap_optab, mode);
if (icode != CODE_FOR_nothing)
  return true;

so something in the config/i386/sync.md file must be wrong for a 32 bit
compiler which specifies -m64.  It does not set up the optab table for a TI
mode compare_and_swap.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug middle-end/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-11-22 16:15 ` amacleod at redhat dot com
@ 2011-11-22 18:58 ` ubizjak at gmail dot com
  2011-11-22 19:39 ` [Bug testsuite/51258] " ubizjak at gmail dot com
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ubizjak at gmail dot com @ 2011-11-22 18:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

--- Comment #5 from Uros Bizjak <ubizjak at gmail dot com> 2011-11-22 18:52:56 UTC ---
(In reply to comment #4)

> so something in the config/i386/sync.md file must be wrong for a 32 bit
> compiler which specifies -m64.  It does not set up the optab table for a TI
> mode compare_and_swap.

-mcx16 ?


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug testsuite/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-11-22 18:58 ` ubizjak at gmail dot com
@ 2011-11-22 19:39 ` ubizjak at gmail dot com
  2011-11-22 20:15 ` ubizjak at gmail dot com
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ubizjak at gmail dot com @ 2011-11-22 19:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |testsuite

--- Comment #6 from Uros Bizjak <ubizjak at gmail dot com> 2011-11-22 19:22:54 UTC ---
It is a testsuite problem:

/* { dg-options "-mcx16" { target { x86_64-*-* } } } */

Something is missing there ... ;)


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug testsuite/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-11-22 19:39 ` [Bug testsuite/51258] " ubizjak at gmail dot com
@ 2011-11-22 20:15 ` ubizjak at gmail dot com
  2011-11-22 20:22 ` amacleod at redhat dot com
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ubizjak at gmail dot com @ 2011-11-22 20:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

--- Comment #7 from Uros Bizjak <ubizjak at gmail dot com> 2011-11-22 19:29:20 UTC ---
Can somebody please test following change:

--cut here--
Index: atomic-exchange-5.c
===================================================================
--- atomic-exchange-5.c (revision 181628)
+++ atomic-exchange-5.c (working copy)
@@ -2,7 +2,7 @@
    values with each valid memory model.  */
 /* { dg-do run } */
 /* { dg-require-effective-target sync_int_128 } */
-/* { dg-options "-mcx16" { target { x86_64-*-* } } } */
+/* { dg-options "-mcx16" { target { i?86-*-* x86_64-*-* } } } */

 /* Test the execution of the __atomic_X builtin for a 16 byte value.  */

--cut here--


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug testsuite/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2011-11-22 20:15 ` ubizjak at gmail dot com
@ 2011-11-22 20:22 ` amacleod at redhat dot com
  2011-11-23 16:02 ` ro at gcc dot gnu.org
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: amacleod at redhat dot com @ 2011-11-22 20:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

--- Comment #8 from Andrew Macleod <amacleod at redhat dot com> 2011-11-22 19:34:03 UTC ---
yes, presuming that it works, which I think it will, that will have to be
applied to all the gcc.dg/atomic*-5.c files, as well as the
gcc.dg/simulate-thread/atomic-*-int128.c files.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug testsuite/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2011-11-22 20:22 ` amacleod at redhat dot com
@ 2011-11-23 16:02 ` ro at gcc dot gnu.org
  2011-11-24 17:10 ` ro at gcc dot gnu.org
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ro at gcc dot gnu.org @ 2011-11-23 16:02 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2011-11/msg02308.htm
                   |                            |l
   Last reconfirmed|                            |2011-11-23
         AssignedTo|unassigned at gcc dot       |ro at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.7.0
     Ever Confirmed|0                           |1

--- Comment #9 from Rainer Orth <ro at gcc dot gnu.org> 2011-11-23 15:16:47 UTC ---
Should have looked more closely ;-)  Patch posted.

  Rainer


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug testsuite/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2011-11-23 16:02 ` ro at gcc dot gnu.org
@ 2011-11-24 17:10 ` ro at gcc dot gnu.org
  2011-11-25 16:36 ` ubizjak at gmail dot com
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ro at gcc dot gnu.org @ 2011-11-24 17:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

--- Comment #10 from Rainer Orth <ro at gcc dot gnu.org> 2011-11-24 16:34:16 UTC ---
Author: ro
Date: Thu Nov 24 16:34:09 2011
New Revision: 181697

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181697
Log:
Fix several atomic tests on 32-bit x86 (PR testsuite/51258)

    PR testsuite/51258
    * gcc.dg/atomic-compare-exchange-5.c: Add -mcx16 on i?86-*-*.
    * gcc.dg/atomic-exchange-5.c: Likewise.
    * gcc.dg/atomic-load-5.c: Likewise.
    * gcc.dg/atomic-op-5.c: Likewise.
    * gcc.dg/atomic-store-5.c: Likewise.
    * gcc.dg/simulate-thread/atomic-other-int128.c: Fix typo.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/atomic-compare-exchange-5.c
    trunk/gcc/testsuite/gcc.dg/atomic-exchange-5.c
    trunk/gcc/testsuite/gcc.dg/atomic-load-5.c
    trunk/gcc/testsuite/gcc.dg/atomic-op-5.c
    trunk/gcc/testsuite/gcc.dg/atomic-store-5.c
    trunk/gcc/testsuite/gcc.dg/simulate-thread/atomic-other-int128.c


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug testsuite/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2011-11-24 17:10 ` ro at gcc dot gnu.org
@ 2011-11-25 16:36 ` ubizjak at gmail dot com
  2011-11-25 17:19 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ubizjak at gmail dot com @ 2011-11-25 16:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

--- Comment #11 from Uros Bizjak <ubizjak at gmail dot com> 2011-11-25 16:26:41 UTC ---
I have additional patch that checks cpuid bit_CMPXCHG16B (and bit_CMPXCHG8B
fwiw) for runtime support.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug testsuite/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2011-11-25 16:36 ` ubizjak at gmail dot com
@ 2011-11-25 17:19 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2011-11-25 18:35 ` uros at gcc dot gnu.org
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2011-11-25 17:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

--- Comment #12 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-11-25 16:35:43 UTC ---
> --- Comment #11 from Uros Bizjak <ubizjak at gmail dot com> 2011-11-25 16:26:41 UTC ---
> I have additional patch that checks cpuid bit_CMPXCHG16B (and bit_CMPXCHG8B
> fwiw) for runtime support.

Thanks for the heads up.  I've already committed my patch and meant to
work on this part over the weekend.

    Rainer


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug testsuite/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2011-11-25 17:19 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2011-11-25 18:35 ` uros at gcc dot gnu.org
  2011-11-25 20:13 ` uros at gcc dot gnu.org
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: uros at gcc dot gnu.org @ 2011-11-25 18:35 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

--- Comment #13 from uros at gcc dot gnu.org 2011-11-25 17:41:49 UTC ---
Author: uros
Date: Fri Nov 25 17:41:44 2011
New Revision: 181727

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181727
Log:
    PR testsuite/51258
    * lib/target-supports.exp
    (check_effective_target_sync_int_128_runtime): New procedure.
    (check_effective_target_sync_long_long_runtime): Ditto.
    (check_effective_target_sync_long_long): Add arm*-*-*.
    (check_effective_target_sync_longlong): Remove.

    * gcc.dg/atomic-op-5.c: Require sync_int_128_runtime effective target.
    * gcc.dg/atomic-compare-exchange-5.c: Ditto.
    * gcc.dg/atomic-exchange-5.c: Ditto.
    * gcc.dg/atomic-load-5.c: Ditto.
    * gcc.dg/atomic-store-5.c: Ditto.
    * gcc.dg/simulate-thread/atomic-load-int128.c: Ditto.
    * gcc.dg/simulate-thread/atomic-other-int128.c: Ditto.
    * gcc.dg/atomic-op-4.c: Require sync_long_long_runtime
    effective target.
    * gcc.dg/atomic-compare-exchange-4.c: Ditto.
    * gcc.dg/atomic-exchange-4.c: Ditto.
    * gcc.dg/atomic-load-4.c: Ditto.
    * gcc.dg/atomic-store-4.c: Ditto.
    * gcc.dg/di-longlong64-sync-1.c: Ditto.
    * gcc.dg/di-sync-multithread.c: Ditto.
    * gcc.dg/simulate-thread/atomic-load-longlong.c: Ditto.
    * gcc.dg/simulate-thread/atomic-other-longlong.c: Ditto.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/atomic-compare-exchange-4.c
    trunk/gcc/testsuite/gcc.dg/atomic-compare-exchange-5.c
    trunk/gcc/testsuite/gcc.dg/atomic-exchange-4.c
    trunk/gcc/testsuite/gcc.dg/atomic-exchange-5.c
    trunk/gcc/testsuite/gcc.dg/atomic-load-4.c
    trunk/gcc/testsuite/gcc.dg/atomic-load-5.c
    trunk/gcc/testsuite/gcc.dg/atomic-op-4.c
    trunk/gcc/testsuite/gcc.dg/atomic-op-5.c
    trunk/gcc/testsuite/gcc.dg/atomic-store-4.c
    trunk/gcc/testsuite/gcc.dg/atomic-store-5.c
    trunk/gcc/testsuite/gcc.dg/di-longlong64-sync-1.c
    trunk/gcc/testsuite/gcc.dg/di-sync-multithread.c
    trunk/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int128.c
    trunk/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-longlong.c
    trunk/gcc/testsuite/gcc.dg/simulate-thread/atomic-other-int128.c
    trunk/gcc/testsuite/gcc.dg/simulate-thread/atomic-other-longlong.c
    trunk/gcc/testsuite/lib/target-supports.exp


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug testsuite/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2011-11-25 18:35 ` uros at gcc dot gnu.org
@ 2011-11-25 20:13 ` uros at gcc dot gnu.org
  2011-12-06 19:09 ` howarth at nitro dot med.uc.edu
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: uros at gcc dot gnu.org @ 2011-11-25 20:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

--- Comment #14 from uros at gcc dot gnu.org 2011-11-25 19:31:02 UTC ---
Author: uros
Date: Fri Nov 25 19:30:58 2011
New Revision: 181728

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181728
Log:
    PR testsuite/51258
    * lib/target-supports.exp
    (check_effective_target_sync_long_long): Also supported on 32bit
    x86 targets.  Add comment about required dg-options.
    Add alpha*-*-* targets.
    (check_effective_target_sync_long_long_runtime): Ditto.

    * gcc.dg/atomic-op-4.c (dg-options): Add -march=pentium for
    32bit x86 targets.
    * gcc.dg/atomic-compare-exchange-4.c: Ditto.
    * gcc.dg/atomic-exchange-4.c: Ditto.
    * gcc.dg/atomic-load-4.c: Ditto.
    * gcc.dg/atomic-store-4.c: Ditto.
    * gcc.dg/di-longlong64-sync-1.c: Ditto.
    * gcc.dg/di-sync-multithread.c: Ditto.
    * gcc.dg/simulate-thread/atomic-load-longlong.c: Ditto.
    * gcc.dg/simulate-thread/atomic-other-longlong.c: Ditto.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/atomic-compare-exchange-4.c
    trunk/gcc/testsuite/gcc.dg/atomic-exchange-4.c
    trunk/gcc/testsuite/gcc.dg/atomic-load-4.c
    trunk/gcc/testsuite/gcc.dg/atomic-op-4.c
    trunk/gcc/testsuite/gcc.dg/atomic-store-4.c
    trunk/gcc/testsuite/gcc.dg/di-longlong64-sync-1.c
    trunk/gcc/testsuite/gcc.dg/di-sync-multithread.c
    trunk/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-longlong.c
    trunk/gcc/testsuite/gcc.dg/simulate-thread/atomic-other-longlong.c
    trunk/gcc/testsuite/lib/target-supports.exp


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug testsuite/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2011-11-25 20:13 ` uros at gcc dot gnu.org
@ 2011-12-06 19:09 ` howarth at nitro dot med.uc.edu
  2011-12-06 19:15 ` howarth at nitro dot med.uc.edu
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-12-06 19:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

Jack Howarth <howarth at nitro dot med.uc.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |howarth at nitro dot
                   |                            |med.uc.edu

--- Comment #15 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-12-06 19:08:22 UTC ---
On x86_64-apple-darwin11, we are seeing the following failures at -m64 (but not
-m32)...

Running
/sw/src/fink.build/gcc47-4.7.0-1/gcc-4.7-20111206/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp
...
FAIL: gcc.dg/simulate-thread/atomic-load-int128.c  -O1 -g  thread simulation
test
FAIL: gcc.dg/simulate-thread/atomic-load-int128.c  -O2 -g  thread simulation
test
FAIL: gcc.dg/simulate-thread/atomic-load-int128.c  -O3 -g  thread simulation
test
FAIL: gcc.dg/simulate-thread/atomic-load-int128.c  -Os -g  thread simulation
test

The output for the first failure is attached.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug testsuite/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2011-12-06 19:09 ` howarth at nitro dot med.uc.edu
@ 2011-12-06 19:15 ` howarth at nitro dot med.uc.edu
  2011-12-06 19:30 ` ubizjak at gmail dot com
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-12-06 19:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

--- Comment #16 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-12-06 19:13:59 UTC ---
Created attachment 26009
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26009
log of FAIL: gcc.dg/simulate-thread/atomic-load-int128.c  -O1 -g  thread
simulation test failure on x86_64-apple-darwin11


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug testsuite/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2011-12-06 19:15 ` howarth at nitro dot med.uc.edu
@ 2011-12-06 19:30 ` ubizjak at gmail dot com
  2011-12-06 20:54 ` howarth at nitro dot med.uc.edu
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ubizjak at gmail dot com @ 2011-12-06 19:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

--- Comment #17 from Uros Bizjak <ubizjak at gmail dot com> 2011-12-06 19:29:09 UTC ---
(In reply to comment #16)
> Created attachment 26009 [details]
> log of FAIL: gcc.dg/simulate-thread/atomic-load-int128.c  -O1 -g  thread
> simulation test failure on x86_64-apple-darwin11

Can you try with increased timeout value?

In testsuite/lib/gcc-simulate-thread.exp find following line:

    # Set timeout to 10 seconds due to huge amount of generated log.
    remote_expect target 10 {

and increase 10.

If this fails, you should check if generated executable runs OK outside of the
debugger.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug testsuite/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2011-12-06 19:30 ` ubizjak at gmail dot com
@ 2011-12-06 20:54 ` howarth at nitro dot med.uc.edu
  2012-03-22  9:17 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-12-06 20:54 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

--- Comment #18 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-12-06 20:53:35 UTC ---
The actual binaries for atomic-load-int128.c  at -O1 and higher run fine on
x86_64-apple-darwin64 at -m64. However they take around 16 seconds to execute
on a...

      Model Name: Mac Pro
      Model Identifier: MacPro3,1
      Processor Name: Quad-Core Intel Xeon
      Processor Speed: 2.8 GHz
      Number of Processors: 2
      Total Number of Cores: 8
      L2 Cache (per Processor): 12 MB
      Memory: 12 GB
      Bus Speed: 1.6 GHz

Increasing the timeout to 20 seconds allows all of the
gcc.dg/simulate-thread/atomic-load-int128.c tests to pass.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug testsuite/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (17 preceding siblings ...)
  2011-12-06 20:54 ` howarth at nitro dot med.uc.edu
@ 2012-03-22  9:17 ` rguenth at gcc dot gnu.org
  2012-03-22 12:26 ` amacleod at redhat dot com
  2012-03-22 12:29 ` ro at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-22  9:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.0                       |4.7.1

--- Comment #19 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-22 08:27:23 UTC ---
GCC 4.7.0 is being released, adjusting target milestone.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug testsuite/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (18 preceding siblings ...)
  2012-03-22  9:17 ` rguenth at gcc dot gnu.org
@ 2012-03-22 12:26 ` amacleod at redhat dot com
  2012-03-22 12:29 ` ro at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: amacleod at redhat dot com @ 2012-03-22 12:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

--- Comment #20 from Andrew Macleod <amacleod at redhat dot com> 2012-03-22 12:10:45 UTC ---
Is this not resolved in 4.7?  I thought we had changed the timeouts back to
normal and added other mechanisms to avoid large infinite loops


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug testsuite/51258] 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86
  2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (19 preceding siblings ...)
  2012-03-22 12:26 ` amacleod at redhat dot com
@ 2012-03-22 12:29 ` ro at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: ro at gcc dot gnu.org @ 2012-03-22 12:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51258

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.7.1                       |4.7.0

--- Comment #21 from Rainer Orth <ro at gcc dot gnu.org> 2012-03-22 12:25:26 UTC ---
Indeed, so closing.

  Rainer


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2012-03-22 12:26 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-21 19:15 [Bug middle-end/51258] New: 64-bit gcc.dg/atomic-compare-exchange-5.c link failure on 32-bit Solaris/x86 ro at gcc dot gnu.org
2011-11-21 19:32 ` [Bug middle-end/51258] " amacleod at redhat dot com
2011-11-21 20:03 ` rth at gcc dot gnu.org
2011-11-22 15:10 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-11-22 16:15 ` amacleod at redhat dot com
2011-11-22 18:58 ` ubizjak at gmail dot com
2011-11-22 19:39 ` [Bug testsuite/51258] " ubizjak at gmail dot com
2011-11-22 20:15 ` ubizjak at gmail dot com
2011-11-22 20:22 ` amacleod at redhat dot com
2011-11-23 16:02 ` ro at gcc dot gnu.org
2011-11-24 17:10 ` ro at gcc dot gnu.org
2011-11-25 16:36 ` ubizjak at gmail dot com
2011-11-25 17:19 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-11-25 18:35 ` uros at gcc dot gnu.org
2011-11-25 20:13 ` uros at gcc dot gnu.org
2011-12-06 19:09 ` howarth at nitro dot med.uc.edu
2011-12-06 19:15 ` howarth at nitro dot med.uc.edu
2011-12-06 19:30 ` ubizjak at gmail dot com
2011-12-06 20:54 ` howarth at nitro dot med.uc.edu
2012-03-22  9:17 ` rguenth at gcc dot gnu.org
2012-03-22 12:26 ` amacleod at redhat dot com
2012-03-22 12:29 ` ro at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).