public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/60940] New: general operations on atomic t ypes do not work with atomic integral typedefs
@ 2014-04-23 13:21 redi at gcc dot gnu.org
  2014-04-23 17:07 ` [Bug libstdc++/60940] general operations on atomic types " redi at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2014-04-23 13:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60940
           Summary: general operations on atomic t ypes do not work with
                    atomic integral typedefs
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org

This is rejected because the atomic operations only accept std::atomic<T> not
the std::__atomic_base<T> base classes:

#ifdef __cplusplus
#include <atomic>
using namespace std;
#else
#include <stdatomic.h>
#endif

atomic_int i;

int main()
{
  atomic_store(&i, 0);
  return atomic_load(&i);
}


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

* [Bug libstdc++/60940] general operations on atomic types do not work with atomic integral typedefs
  2014-04-23 13:21 [Bug libstdc++/60940] New: general operations on atomic t ypes do not work with atomic integral typedefs redi at gcc dot gnu.org
@ 2014-04-23 17:07 ` redi at gcc dot gnu.org
  2014-05-04 21:01 ` redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2014-04-23 17:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Additionally, we fail to meet this requirement:

29.6.2  Templated operations on atomic types  [atomics.types.operations.templ]
The implementation shall declare but not define the function templates
identified as “templated operations on atomic types” in 29.2.

We only declare those functions templates when they need to be defined, i.e.
for arguments of type __atomic_base or atomic<T*>.

The declarations would need to be constrained with SFINAE to prevent them being
used for types derived from __atomic_base.
>From gcc-bugs-return-449737-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 23 17:36:51 2014
Return-Path: <gcc-bugs-return-449737-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23052 invoked by alias); 23 Apr 2014 17:36:50 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 23026 invoked by uid 48); 23 Apr 2014 17:36:47 -0000
From: "d.frey at gmx dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/60942] New: ICE on invalid code in unify_one_argument
Date: Wed, 23 Apr 2014 17:36:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: d.frey at gmx dot de
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-60942-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-04/txt/msg01757.txt.bz2
Content-length: 752

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

            Bug ID: 60942
           Summary: ICE on invalid code in unify_one_argument
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: d.frey at gmx dot de

The following (invalid) program:

template<typename> struct A {};
struct B : A<int> {};

template<int... I>
void dummy( const A< I... >& );

int main()
{
  dummy( B() );
}

yields:

$ g++ -std=c++11 t.cc
t.cc: In function ‘int main()’:
t.cc:9:14: internal compiler error: in unify_one_argument, at cp/pt.c:15506
   dummy( B() );
              ^
>From gcc-bugs-return-449738-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Apr 23 17:54:32 2014
Return-Path: <gcc-bugs-return-449738-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7624 invoked by alias); 23 Apr 2014 17:54:32 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 7584 invoked by uid 55); 23 Apr 2014 17:54:28 -0000
From: "uros at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/60909] ICE: in extract_insn, at recog.c:2202 (unrecognizable insn) with -mrdrnd and __builtin_ia32_rdrand32_step()
Date: Wed, 23 Apr 2014 17:54:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.10.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: uros at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ubizjak at gmail dot com
X-Bugzilla-Target-Milestone: 4.7.4
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-60909-4-tmYdYByu9Y@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60909-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60909-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-04/txt/msg01758.txt.bz2
Content-length: 1079

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`909

--- Comment #5 from uros at gcc dot gnu.org ---
Author: uros
Date: Wed Apr 23 17:53:56 2014
New Revision: 209715

URL: http://gcc.gnu.org/viewcvs?rev 9715&root=gcc&view=rev
Log:
        Backport from mainline
        2014-04-21  Uros Bizjak  <ubizjak@gmail.com>

        PR target/60909
        * config/i386/i386.c (ix86_expand_builtin)
        <case IX86_BUILTIN_RDRAND{16,32,64}_STEP>: Use temporary
        register for target RTX.
        <case IX86_BUILTIN_RDSEED{16,32,64}_STEP>: Ditto.

testsuite/ChangeLog:

        Backport from mainline
        2014-04-21  Uros Bizjak  <ubizjak@gmail.com>

        PR target/60909
        * gcc.target/i386/pr60909-1.c: New test.
        * gcc.target/i386/pr60909-2.c: Ditto.


Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr60909-1.c
    branches/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr60909-2.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/config/i386/i386.c
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


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

* [Bug libstdc++/60940] general operations on atomic types do not work with atomic integral typedefs
  2014-04-23 13:21 [Bug libstdc++/60940] New: general operations on atomic t ypes do not work with atomic integral typedefs redi at gcc dot gnu.org
  2014-04-23 17:07 ` [Bug libstdc++/60940] general operations on atomic types " redi at gcc dot gnu.org
@ 2014-05-04 21:01 ` redi at gcc dot gnu.org
  2014-09-19 14:00 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2014-05-04 21:01 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-05-04
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
     Ever confirmed|0                           |1


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

* [Bug libstdc++/60940] general operations on atomic types do not work with atomic integral typedefs
  2014-04-23 13:21 [Bug libstdc++/60940] New: general operations on atomic t ypes do not work with atomic integral typedefs redi at gcc dot gnu.org
  2014-04-23 17:07 ` [Bug libstdc++/60940] general operations on atomic types " redi at gcc dot gnu.org
  2014-05-04 21:01 ` redi at gcc dot gnu.org
@ 2014-09-19 14:00 ` redi at gcc dot gnu.org
  2015-01-17  1:24 ` redi at gcc dot gnu.org
  2015-01-17  1:24 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2014-09-19 14:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60940

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |5.0


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

* [Bug libstdc++/60940] general operations on atomic types do not work with atomic integral typedefs
  2014-04-23 13:21 [Bug libstdc++/60940] New: general operations on atomic t ypes do not work with atomic integral typedefs redi at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-09-19 14:00 ` redi at gcc dot gnu.org
@ 2015-01-17  1:24 ` redi at gcc dot gnu.org
  2015-01-17  1:24 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2015-01-17  1:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60940

Jonathan Wakely <redi at gcc dot gnu.org> changed:

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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for GCC 5


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

* [Bug libstdc++/60940] general operations on atomic types do not work with atomic integral typedefs
  2014-04-23 13:21 [Bug libstdc++/60940] New: general operations on atomic t ypes do not work with atomic integral typedefs redi at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-01-17  1:24 ` redi at gcc dot gnu.org
@ 2015-01-17  1:24 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2015-01-17  1:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60940

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Sat Jan 17 01:23:28 2015
New Revision: 219790

URL: https://gcc.gnu.org/viewcvs?rev=219790&root=gcc&view=rev
Log:
    PR libstdc++/60940
    * include/bits/atomic_base.h: Remove atomic integral typedefs as
    synonyms for __atomic_base<int> etc.
    * include/std/atomic: Make atomic_int a synonym for atomic<int> and
    likewise for all atomic integral types.
    * testsuite/29_atomics/atomic_integral/cons/copy_list.cc: New.
    * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error line number.

Added:
    trunk/libstdc++-v3/testsuite/29_atomics/atomic_integral/60940.cc
      - copied, changed from r219785,
trunk/libstdc++-v3/testsuite/29_atomics/atomic/60695.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/atomic_base.h
    trunk/libstdc++-v3/include/std/atomic
    trunk/libstdc++-v3/testsuite/29_atomics/atomic/60695.cc


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

end of thread, other threads:[~2015-01-17  1:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-23 13:21 [Bug libstdc++/60940] New: general operations on atomic t ypes do not work with atomic integral typedefs redi at gcc dot gnu.org
2014-04-23 17:07 ` [Bug libstdc++/60940] general operations on atomic types " redi at gcc dot gnu.org
2014-05-04 21:01 ` redi at gcc dot gnu.org
2014-09-19 14:00 ` redi at gcc dot gnu.org
2015-01-17  1:24 ` redi at gcc dot gnu.org
2015-01-17  1:24 ` redi 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).