public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/53284] New: Several libatomic tests fail on 32-bit Solaris/x86
@ 2012-05-08 16:23 ro at gcc dot gnu.org
  2012-05-08 22:56 ` [Bug other/53284] " rth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ro at gcc dot gnu.org @ 2012-05-08 16:23 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53284
           Summary: Several libatomic tests fail on 32-bit Solaris/x86
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ro@gcc.gnu.org
                CC: rth@gcc.gnu.org
              Host: i386-pc-solaris2.9, i386-pc-solaris2.1[01]
            Target: i386-pc-solaris2.9, i386-pc-solaris2.1[01]
             Build: i386-pc-solaris2.9, i386-pc-solaris2.1[01]


With the libatomic build problems on Solaris out of the way, there remain a
couple
of testsuite failures for the default 32-bit multilib:

FAIL: libatomic.c/atomic-compare-exchange-4.c execution test
FAIL: libatomic.c/atomic-exchange-4.c execution test
FAIL: libatomic.c/atomic-load-4.c execution test
FAIL: libatomic.c/atomic-op-4.c execution test
FAIL: libatomic.c/atomic-store-4.c execution test
FAIL: libatomic.c/generic-2.c execution test

It seems all of them SEGV, e.g.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
0xfef823f7 in libat_compare_exchange_8 (mptr=0x8049e68, eptr=0x8049e70,
newval=18446744073709551615, smodel=5, fmodel=0) at
/vol/gcc/src/hg/trunk/local/libatomic/cas_n.c:41
(gdb) where
#0  0xfef823f7 in libat_compare_exchange_8 (mptr=0x8049e68, eptr=0x8049e70,
newval=18446744073709551615, smodel=5, fmodel=0) at
/vol/gcc/src/hg/trunk/local/libatomic/cas_n.c:41
#1  0xfef823fc in libat_compare_exchange_8 (mptr=0x8049e68, eptr=0x8049e70,
newval=18446744073709551615, smodel=5, fmodel=0) at
/vol/gcc/src/hg/trunk/local/libatomic/cas_n.c:41
#2  0xfef823fc in libat_compare_exchange_8 (mptr=0x8049e68, eptr=0x8049e70,
newval=18446744073709551615, smodel=5, fmodel=0) at
/vol/gcc/src/hg/trunk/local/libatomic/cas_n.c:41
#3  0xfef823fc in libat_compare_exchange_8 (mptr=0x8049e68, eptr=0x8049e70,
newval=18446744073709551615, smodel=5, fmodel=0) at
/vol/gcc/src/hg/trunk/local/libatomic/cas_n.c:41
#4  0xfef823fc in libat_compare_exchange_8 (mptr=0x8049e68, eptr=0x8049e70,
newval=18446744073709551615, smodel=5, fmodel=0) at
/vol/gcc/src/hg/trunk/local/libatomic/cas_n.c:41

Seems to be infinite recursion.

  Rainer


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

* [Bug other/53284] Several libatomic tests fail on 32-bit Solaris/x86
  2012-05-08 16:23 [Bug other/53284] New: Several libatomic tests fail on 32-bit Solaris/x86 ro at gcc dot gnu.org
@ 2012-05-08 22:56 ` rth at gcc dot gnu.org
  2012-05-09 11:48 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rth at gcc dot gnu.org @ 2012-05-08 22:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Henderson <rth at gcc dot gnu.org> 2012-05-08 22:39:35 UTC ---
Can you investigate why configure decides that __atomic_compare_exchange_8
is implemented inline?  That it isn't inline is obvious from the recursion.

Was the configure change to CFLAGS in fact wrong?


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

* [Bug other/53284] Several libatomic tests fail on 32-bit Solaris/x86
  2012-05-08 16:23 [Bug other/53284] New: Several libatomic tests fail on 32-bit Solaris/x86 ro at gcc dot gnu.org
  2012-05-08 22:56 ` [Bug other/53284] " rth at gcc dot gnu.org
@ 2012-05-09 11:48 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2012-05-09 18:08 ` rth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2012-05-09 11:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2012-05-09 11:45:10 UTC ---
> --- Comment #1 from Richard Henderson <rth at gcc dot gnu.org> 2012-05-08 22:39:35 UTC ---
> Can you investigate why configure decides that __atomic_compare_exchange_8
> is implemented inline?  That it isn't inline is obvious from the recursion.

That was the critical hint, thanks.  Comparing i386-pc-solaris2.10 and
i686-unknown-linux-gnu config.log, I see that in the Linux case the test
is run as a link test and includes -fno-sync-libcalls $XCFLAGS, while in
the Solaris case, it's an compile test and lacks all of them.

> Was the configure change to CFLAGS in fact wrong?

No, that's unrelated.

The following patch works for me and lets all tests in the above
configuration pass.  I've chosen to add to CFLAGS rather than adding
$XCFLAGS since otherwise we loose -fno-sync-libcalls.

Ok for mainline?

Thanks.
        Rainer


2012-05-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

    * acinclude.m4 (LIBAT_TEST_ATOMIC_BUILTIN): Add -O0 -S to CFLAGS
    instead of overriding.
    * configure: Regenerate.

diff --git a/libatomic/acinclude.m4 b/libatomic/acinclude.m4
--- a/libatomic/acinclude.m4
+++ b/libatomic/acinclude.m4
@@ -67,7 +67,7 @@ AC_DEFUN([LIBAT_TEST_ATOMIC_BUILTIN],[
     else
       old_CFLAGS="$CFLAGS"
       # Compile unoptimized.
-      CFLAGS='-O0 -S'
+      CFLAGS="$CFLAGS -O0 -S"
       if AC_TRY_EVAL(ac_compile); then
         if grep __atomic_ conftest.s >/dev/null 2>&1 ; then
       eval $2=no


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

* [Bug other/53284] Several libatomic tests fail on 32-bit Solaris/x86
  2012-05-08 16:23 [Bug other/53284] New: Several libatomic tests fail on 32-bit Solaris/x86 ro at gcc dot gnu.org
  2012-05-08 22:56 ` [Bug other/53284] " rth at gcc dot gnu.org
  2012-05-09 11:48 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2012-05-09 18:08 ` rth at gcc dot gnu.org
  2012-05-10  9:18 ` ro at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rth at gcc dot gnu.org @ 2012-05-09 18:08 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Henderson <rth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-05-09
         AssignedTo|unassigned at gcc dot       |ro at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #3 from Richard Henderson <rth at gcc dot gnu.org> 2012-05-09 18:00:29 UTC ---
Yep, that looks good.


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

* [Bug other/53284] Several libatomic tests fail on 32-bit Solaris/x86
  2012-05-08 16:23 [Bug other/53284] New: Several libatomic tests fail on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-05-09 18:08 ` rth at gcc dot gnu.org
@ 2012-05-10  9:18 ` ro at gcc dot gnu.org
  2012-05-10  9:46 ` ro at gcc dot gnu.org
  2012-05-10 12:36 ` dominiq at lps dot ens.fr
  5 siblings, 0 replies; 7+ messages in thread
From: ro at gcc dot gnu.org @ 2012-05-10  9:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Rainer Orth <ro at gcc dot gnu.org> 2012-05-10 09:11:14 UTC ---
Author: ro
Date: Thu May 10 09:11:05 2012
New Revision: 187366

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187366
Log:
Always compile atomic builtin tests with $XCFLAGS

    PR other/53284
    * acinclude.m4 (LIBAT_TEST_ATOMIC_BUILTIN): Add -O0 -S to CFLAGS
    instead of overriding.
    * configure: Regenerate.

Modified:
    trunk/libatomic/ChangeLog
    trunk/libatomic/acinclude.m4
    trunk/libatomic/configure   (contents, props changed)


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

* [Bug other/53284] Several libatomic tests fail on 32-bit Solaris/x86
  2012-05-08 16:23 [Bug other/53284] New: Several libatomic tests fail on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-05-10  9:18 ` ro at gcc dot gnu.org
@ 2012-05-10  9:46 ` ro at gcc dot gnu.org
  2012-05-10 12:36 ` dominiq at lps dot ens.fr
  5 siblings, 0 replies; 7+ messages in thread
From: ro at gcc dot gnu.org @ 2012-05-10  9:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2012-05/msg00725.htm
                   |                            |l
         Resolution|                            |FIXED
   Target Milestone|---                         |4.8.0

--- Comment #5 from Rainer Orth <ro at gcc dot gnu.org> 2012-05-10 09:17:40 UTC ---
Fixed for 4.8.0.


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

* [Bug other/53284] Several libatomic tests fail on 32-bit Solaris/x86
  2012-05-08 16:23 [Bug other/53284] New: Several libatomic tests fail on 32-bit Solaris/x86 ro at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-05-10  9:46 ` ro at gcc dot gnu.org
@ 2012-05-10 12:36 ` dominiq at lps dot ens.fr
  5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-05-10 12:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-05-10 12:17:17 UTC ---
For the record, r187366 fixes the same failures on x86_64-apple-darwin10.


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

end of thread, other threads:[~2012-05-10 12:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-08 16:23 [Bug other/53284] New: Several libatomic tests fail on 32-bit Solaris/x86 ro at gcc dot gnu.org
2012-05-08 22:56 ` [Bug other/53284] " rth at gcc dot gnu.org
2012-05-09 11:48 ` ro at CeBiTec dot Uni-Bielefeld.DE
2012-05-09 18:08 ` rth at gcc dot gnu.org
2012-05-10  9:18 ` ro at gcc dot gnu.org
2012-05-10  9:46 ` ro at gcc dot gnu.org
2012-05-10 12:36 ` dominiq at lps dot ens.fr

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).