public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/51038] New: [4.7 Regression]: 29_atomics/atomic_flag/clear/1.cc test_and_set/explicit.cc implicit.cc
@ 2011-11-08 20:21 hp at gcc dot gnu.org
  2011-11-09  9:52 ` [Bug testsuite/51038] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: hp at gcc dot gnu.org @ 2011-11-08 20:21 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51038
           Summary: [4.7 Regression]: 29_atomics/atomic_flag/clear/1.cc
                    test_and_set/explicit.cc implicit.cc
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: link-failure, wrong-code
          Severity: normal
          Priority: P3
         Component: regression
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hp@gcc.gnu.org
                CC: amacleod@redhat.com
              Host: x86_64-unknown-linux-gnu
            Target: cris-axis-elf


These tests previously passed, now they fail.
Apparently the "cxx-mem-model merge [6 of 9]" (formally a change in the range
181027:181034) exposed or caused these regressions.  Since then they fail as
follows:

Running
/tmp/hpautotest-gcc1/gcc/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp
...
...
FAIL: 29_atomics/atomic_flag/clear/1.cc (test for excess errors)
WARNING: 29_atomics/atomic_flag/clear/1.cc compilation failed to produce
executable
FAIL: 29_atomics/atomic_flag/test_and_set/explicit.cc (test for excess errors)
WARNING: 29_atomics/atomic_flag/test_and_set/explicit.cc compilation failed to
produce executable
FAIL: 29_atomics/atomic_flag/test_and_set/implicit.cc (test for excess errors)


The messages in libstdc++.log are similar, but have changed since the above. At
r181162 they are as follows:

Executing on host: /tmp/hpautotest-gcc1/cris-elf/gccobj/./gcc/g++
-shared-libgcc -B/tmp/hpautotest-gcc1/cris-elf/gccobj/./gcc -nostdinc++
-L/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/src
-L/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/src/.libs
-nostdinc -B/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/newlib/ -isystem
/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/newlib/targ-include -isystem
/tmp/hpautotest-gcc1/gcc/newlib/libc/include
-B/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libgloss/cris
-L/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libgloss/libnosys
-L/tmp/hpautotest-gcc1/gcc/libgloss/cris
-B/tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/bin/
-B/tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/lib/ -isystem
/tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/include -isystem
/tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/sys-include
-B/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/./libgloss/cris/
-L/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/./libgloss/cris
-L/tmp/hpautotest-gcc1/gcc/libgloss/cris
-B/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/./libstdc++-v3/src/.libs -g -O2
-D_GLIBCXX_ASSERT -fmessage-length=0 -ffunction-sections -fdata-sections -g -O2
-g -O2 -DLOCALEDIR="." -nostdinc++
-I/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/include/cris-elf
-I/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/include
-I/tmp/hpautotest-gcc1/gcc/libstdc++-v3/libsupc++
-I/tmp/hpautotest-gcc1/gcc/libstdc++-v3/include/backward
-I/tmp/hpautotest-gcc1/gcc/libstdc++-v3/testsuite/util
/tmp/hpautotest-gcc1/gcc/libstdc++-v3/testsuite/29_atomics/atomic_flag/clear/1.cc
  -std=gnu++0x ./libtestc++.a    -isystem
/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/./newlib/targ-include -isystem
/tmp/hpautotest-gcc1/gcc/newlib/libc/include
-B/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/./libgloss/cris/
-L/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/./libgloss/cris
-L/tmp/hpautotest-gcc1/gcc/libgloss/cris 
-B/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/./newlib/
-L/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/./newlib -sim3  -lm   -o
./1.exe    (timeout = 600)
/tmp/ccX4JE6W.o: In function `ZNSt11atomic_flag5clearESt12memory_order':
/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/include/bits/atomic_base.h:311:
undefined reference to `std::atomic_thread_fence(std::memory_order)'
/tmp/ccX4JE6W.o: In function
`ZNSt11atomic_flag12test_and_setESt12memory_order':
/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/include/bits/atomic_base.h:274:
undefined reference to `__sync_lock_test_and_set_1'
collect2: error: ld returned 1 exit status
compiler exited with status 1
output is:
/tmp/ccX4JE6W.o: In function `ZNSt11atomic_flag5clearESt12memory_order':
/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/include/bits/atomic_base.h:311:
undefined reference to `std::atomic_thread_fence(std::memory_order)'
/tmp/ccX4JE6W.o: In function
`ZNSt11atomic_flag12test_and_setESt12memory_order':
/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/include/bits/atomic_base.h:274:
undefined reference to `__sync_lock_test_and_set_1'
collect2: error: ld returned 1 exit status

with the 29_atomics/atomic_flag/test_and_set/explicit.cc test only having the
last undefined reference.

Author of the suspect patches in the revision range CC:ed.

cris-elf does not have any back-end atomicity support patterns specified,
there's just the libstdc++-v3/config/cpu/cris atomicity header files,
apparently obsoleted by the cxx-mem-model merge.


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

* [Bug testsuite/51038] [4.7 Regression]: 29_atomics/atomic_flag/clear/1.cc test_and_set/explicit.cc implicit.cc
  2011-11-08 20:21 [Bug regression/51038] New: [4.7 Regression]: 29_atomics/atomic_flag/clear/1.cc test_and_set/explicit.cc implicit.cc hp at gcc dot gnu.org
@ 2011-11-09  9:52 ` rguenth at gcc dot gnu.org
  2011-11-10 17:05 ` amacleod at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-11-09  9:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|regression                  |testsuite
   Target Milestone|---                         |4.7.0


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

* [Bug testsuite/51038] [4.7 Regression]: 29_atomics/atomic_flag/clear/1.cc test_and_set/explicit.cc implicit.cc
  2011-11-08 20:21 [Bug regression/51038] New: [4.7 Regression]: 29_atomics/atomic_flag/clear/1.cc test_and_set/explicit.cc implicit.cc hp at gcc dot gnu.org
  2011-11-09  9:52 ` [Bug testsuite/51038] " rguenth at gcc dot gnu.org
@ 2011-11-10 17:05 ` amacleod at redhat dot com
  2011-11-10 20:54 ` [Bug middle-end/51038] " amacleod at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: amacleod at redhat dot com @ 2011-11-10 17:05 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Macleod <amacleod at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-11-10
     Ever Confirmed|0                           |1

--- Comment #1 from Andrew Macleod <amacleod at redhat dot com> 2011-11-10 16:21:44 UTC ---
The issue here is no atomic support whatsoever.  The standard now *requires*
that atomic_flag be implementable in a lock free manner for compliance.

In order to support atomic_flag in a lock free manner on a target, we need at a
minimum the legacy __sync_lock_test_and_set and __sync_lock_release to be
implemented.

Previous to this release, if atomic_flag couldn't be implemented lock free, it
was implemented with locks.  libstdc++-v3 no longer supports any locked
implementations.


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

* [Bug middle-end/51038] [4.7 Regression]: 29_atomics/atomic_flag/clear/1.cc test_and_set/explicit.cc implicit.cc
  2011-11-08 20:21 [Bug regression/51038] New: [4.7 Regression]: 29_atomics/atomic_flag/clear/1.cc test_and_set/explicit.cc implicit.cc hp at gcc dot gnu.org
  2011-11-09  9:52 ` [Bug testsuite/51038] " rguenth at gcc dot gnu.org
  2011-11-10 17:05 ` amacleod at redhat dot com
@ 2011-11-10 20:54 ` amacleod at redhat dot com
  2011-11-29 16:24 ` jakub at gcc dot gnu.org
  2011-11-29 17:47 ` hp at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: amacleod at redhat dot com @ 2011-11-10 20:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Macleod <amacleod at redhat dot com> 2011-11-10 20:38:46 UTC ---
Author: amacleod
Date: Thu Nov 10 20:38:33 2011
New Revision: 181271

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181271
Log:
    PR middle-end/51038

    libstdc++-v3
    * include/bits/atomic_base.h (atomic_thread_fence): Call built-in.
    (atomic_signal_fence): Call built-in.
    (test_and_set, clear): Call new atomic built-ins.

    gcc
    * builtins.c (expand_builtin_atomic_clear): New.  Expand atomic_clear.
    (expand_builtin_atomic_test_and_set): New.  Expand atomic test_and_set.
    (expand_builtin): Add cases for test_and_set and clear.
    * sync-builtins.def (BUILT_IN_ATOMIC_TEST_AND_SET): New.
    (BUILT_IN_ATOMIC_CLEAR): New.

    testsuite
    * gcc.dg/atomic-invalid.c: Add test for invalid __atomic_clear models.
    * gcc.dg/atomic-flag.c: New.  Test __atomic_test_and_set and
    __atomic_clear.


Added:
    trunk/gcc/testsuite/gcc.dg/atomic-flag.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/gcc/sync-builtins.def
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/atomic-invalid.c
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/atomic_base.h


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

* [Bug middle-end/51038] [4.7 Regression]: 29_atomics/atomic_flag/clear/1.cc test_and_set/explicit.cc implicit.cc
  2011-11-08 20:21 [Bug regression/51038] New: [4.7 Regression]: 29_atomics/atomic_flag/clear/1.cc test_and_set/explicit.cc implicit.cc hp at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-11-10 20:54 ` [Bug middle-end/51038] " amacleod at redhat dot com
@ 2011-11-29 16:24 ` jakub at gcc dot gnu.org
  2011-11-29 17:47 ` hp at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-11-29 16:24 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-11-29 15:38:46 UTC ---
Is this now fixed (and thus, can this bug be closed)?


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

* [Bug middle-end/51038] [4.7 Regression]: 29_atomics/atomic_flag/clear/1.cc test_and_set/explicit.cc implicit.cc
  2011-11-08 20:21 [Bug regression/51038] New: [4.7 Regression]: 29_atomics/atomic_flag/clear/1.cc test_and_set/explicit.cc implicit.cc hp at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-11-29 16:24 ` jakub at gcc dot gnu.org
@ 2011-11-29 17:47 ` hp at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: hp at gcc dot gnu.org @ 2011-11-29 17:47 UTC (permalink / raw)
  To: gcc-bugs

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

Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2011-11-29 17:28:48 UTC ---
(In reply to comment #3)
> Is this now fixed (and thus, can this bug be closed)?

Yes, done.  Thanks for the reminder.


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

end of thread, other threads:[~2011-11-29 17:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-08 20:21 [Bug regression/51038] New: [4.7 Regression]: 29_atomics/atomic_flag/clear/1.cc test_and_set/explicit.cc implicit.cc hp at gcc dot gnu.org
2011-11-09  9:52 ` [Bug testsuite/51038] " rguenth at gcc dot gnu.org
2011-11-10 17:05 ` amacleod at redhat dot com
2011-11-10 20:54 ` [Bug middle-end/51038] " amacleod at redhat dot com
2011-11-29 16:24 ` jakub at gcc dot gnu.org
2011-11-29 17:47 ` hp 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).