public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/58938] New: [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support
@ 2013-10-31 11:17 rafal at rawicki dot org
  2013-10-31 12:19 ` [Bug libstdc++/58938] " paolo.carlini at oracle dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: rafal at rawicki dot org @ 2013-10-31 11:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58938
           Summary: [4.7/4.8/4.9 Regression] std::exception_ptr is missing
                    on architectures with incomplete atomic int support
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rafal at rawicki dot org

In file ./libstdc++-v3/libsupc++/exception (also in trunk) bits/exception_ptr.h
is included conditionally:

#if (__cplusplus >= 201103L) && (ATOMIC_INT_LOCK_FREE > 1)
#include <bits/exception_ptr.h>
#include <bits/nested_exception.h>
#endif

On ARM architecture ATOMIC_INT_LOCK_FREE is set to 1. That leads to losing some
functionality of standard library for no good reason.


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

* [Bug libstdc++/58938] [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support
  2013-10-31 11:17 [Bug libstdc++/58938] New: [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support rafal at rawicki dot org
@ 2013-10-31 12:19 ` paolo.carlini at oracle dot com
  2013-10-31 13:10 ` redi at gcc dot gnu.org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-31 12:19 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jwakely.gcc at gmail dot com

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Was included conditionally before r181869 too, but the condition was different,
checked _GLIBCXX_ATOMIC_BUILTINS_4 instead of ATOMIC_INT_LOCK_FREE > 1.


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

* [Bug libstdc++/58938] [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support
  2013-10-31 11:17 [Bug libstdc++/58938] New: [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support rafal at rawicki dot org
  2013-10-31 12:19 ` [Bug libstdc++/58938] " paolo.carlini at oracle dot com
@ 2013-10-31 13:10 ` redi at gcc dot gnu.org
  2013-10-31 13:37 ` rafal at rawicki dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2013-10-31 13:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
So why is this a regression?  Does ARM define _GLIBCXX_ATOMIC_BUILTINS_4 but
ATOMIC_INT_LOCK_FREE=1 ? That seems like a bug in those definitions.


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

* [Bug libstdc++/58938] [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support
  2013-10-31 11:17 [Bug libstdc++/58938] New: [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support rafal at rawicki dot org
  2013-10-31 12:19 ` [Bug libstdc++/58938] " paolo.carlini at oracle dot com
  2013-10-31 13:10 ` redi at gcc dot gnu.org
@ 2013-10-31 13:37 ` rafal at rawicki dot org
  2013-10-31 13:39 ` rafal at rawicki dot org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rafal at rawicki dot org @ 2013-10-31 13:37 UTC (permalink / raw)
  To: gcc-bugs

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

Rafał Rawicki <rafal at rawicki dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rafal at rawicki dot org

--- Comment #3 from Rafał Rawicki <rafal at rawicki dot org> ---
This is a regression, because a more specific _GLIBCXX_ATOMIC_BUILTINS_4 was
defined (but is no longer available) and now there is defined
ATOMIC_INT_LOCK_FREE=1 (I think think the definition is correct, because there
were available _GLIBCXX_ATOMIC_BUILTINS_{1,2,4} and no
_GLIBCXX_ATOMIC_BUILTINS_8).

The other thing is, std::exception_ptr availability should not depend on the
fact whether the platform has lock-free atomics or not.
>From gcc-bugs-return-433180-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Oct 31 13:39:38 2013
Return-Path: <gcc-bugs-return-433180-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 31509 invoked by alias); 31 Oct 2013 13:39:38 -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 31078 invoked by uid 55); 31 Oct 2013 13:39:34 -0000
From: "jamborm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/10474] shrink wrapping for functions
Date: Thu, 31 Oct 2013 13:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 3.4.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: jamborm at gcc dot gnu.org
X-Bugzilla-Status: NEW
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:
Message-ID: <bug-10474-4-iFrCBvoy7z@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-10474-4@http.gcc.gnu.org/bugzilla/>
References: <bug-10474-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: 2013-10/txt/msg02324.txt.bz2
Content-length: 1105

http://gcc.gnu.org/bugzilla/show_bug.cgi?id\x10474

--- Comment #14 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Author: jamborm
Date: Thu Oct 31 13:39:26 2013
New Revision: 204254

URL: http://gcc.gnu.org/viewcvs?rev 4254&root=gcc&view=rev
Log:
2013-10-31  Martin Jambor  <mjambor@suse.cz>

    PR rtl-optimization/58934
    Revert:
    2013-10-30  Martin Jambor  <mjambor@suse.cz>
    PR rtl-optimization/10474
    * ira.c (find_moveable_pseudos): Do not calculate dominance info
    nor df analysis.
    (interesting_dest_for_shprep): New function.
    (split_live_ranges_for_shrink_wrap): Likewise.
    (ira): Calculate dominance info and df analysis. Call
    split_live_ranges_for_shrink_wrap.

testsuite/
    * gcc.dg/pr10474.c: New testcase.
    * gcc.dg/ira-shrinkwrap-prep-1.c: Likewise.
    * gcc.dg/ira-shrinkwrap-prep-2.c: Likewise.


Removed:
    trunk/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c
    trunk/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-2.c
    trunk/gcc/testsuite/gcc.dg/pr10474.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ira.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug libstdc++/58938] [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support
  2013-10-31 11:17 [Bug libstdc++/58938] New: [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support rafal at rawicki dot org
                   ` (2 preceding siblings ...)
  2013-10-31 13:37 ` rafal at rawicki dot org
@ 2013-10-31 13:39 ` rafal at rawicki dot org
  2013-10-31 14:11 ` paolo.carlini at oracle dot com
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rafal at rawicki dot org @ 2013-10-31 13:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Rafał Rawicki <rafal at rawicki dot org> ---
(In reply to Rafał Rawicki from comment #3)
> This is a regression, because a more specific _GLIBCXX_ATOMIC_BUILTINS_4 was
> defined (but is no longer available) and now there is defined
> ATOMIC_INT_LOCK_FREE=1 (I think think the definition is correct, because
> there were available _GLIBCXX_ATOMIC_BUILTINS_{1,2,4} and no
> _GLIBCXX_ATOMIC_BUILTINS_8).
> 
> The other thing is, std::exception_ptr availability should not depend on the
> fact whether the platform has lock-free atomics or not.

s/_GLIBCXX_ATOMIC_BUILTINS_4 was defined/_GLIBCXX_ATOMIC_BUILTINS_4 was used/
>From gcc-bugs-return-433179-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Oct 31 13:39:35 2013
Return-Path: <gcc-bugs-return-433179-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 31126 invoked by alias); 31 Oct 2013 13:39:35 -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 30730 invoked by uid 55); 31 Oct 2013 13:39:30 -0000
From: "jamborm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/58934] [4.9 Regression]: build fails on cris-elf in reload_cse_simplify_operands for newlib dtoa.c
Date: Thu, 31 Oct 2013 13:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: build, ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jamborm at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jamborm at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-58934-4-4CjHqYwNkI@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58934-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58934-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: 2013-10/txt/msg02323.txt.bz2
Content-length: 1104

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX934

--- Comment #7 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Author: jamborm
Date: Thu Oct 31 13:39:26 2013
New Revision: 204254

URL: http://gcc.gnu.org/viewcvs?rev 4254&root=gcc&view=rev
Log:
2013-10-31  Martin Jambor  <mjambor@suse.cz>

    PR rtl-optimization/58934
    Revert:
    2013-10-30  Martin Jambor  <mjambor@suse.cz>
    PR rtl-optimization/10474
    * ira.c (find_moveable_pseudos): Do not calculate dominance info
    nor df analysis.
    (interesting_dest_for_shprep): New function.
    (split_live_ranges_for_shrink_wrap): Likewise.
    (ira): Calculate dominance info and df analysis. Call
    split_live_ranges_for_shrink_wrap.

testsuite/
    * gcc.dg/pr10474.c: New testcase.
    * gcc.dg/ira-shrinkwrap-prep-1.c: Likewise.
    * gcc.dg/ira-shrinkwrap-prep-2.c: Likewise.


Removed:
    trunk/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c
    trunk/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-2.c
    trunk/gcc/testsuite/gcc.dg/pr10474.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ira.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug libstdc++/58938] [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support
  2013-10-31 11:17 [Bug libstdc++/58938] New: [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support rafal at rawicki dot org
                   ` (3 preceding siblings ...)
  2013-10-31 13:39 ` rafal at rawicki dot org
@ 2013-10-31 14:11 ` paolo.carlini at oracle dot com
  2013-10-31 14:13 ` redi at gcc dot gnu.org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-31 14:11 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|rafal at rawicki dot org           |amacleod at redhat dot com

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
This is the relevant thread:

  http://gcc.gnu.org/ml/libstdc++/2011-11/msg00192.html

Let's add Andrew in CC.


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

* [Bug libstdc++/58938] [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support
  2013-10-31 11:17 [Bug libstdc++/58938] New: [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support rafal at rawicki dot org
                   ` (4 preceding siblings ...)
  2013-10-31 14:11 ` paolo.carlini at oracle dot com
@ 2013-10-31 14:13 ` redi at gcc dot gnu.org
  2013-10-31 14:55 ` amacleod at redhat dot com
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2013-10-31 14:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Rafał Rawicki from comment #3)
> This is a regression, because a more specific _GLIBCXX_ATOMIC_BUILTINS_4 was
> defined (but is no longer available) and now there is defined
> ATOMIC_INT_LOCK_FREE=1 (I think think the definition is correct, because
> there were available _GLIBCXX_ATOMIC_BUILTINS_{1,2,4} and no
> _GLIBCXX_ATOMIC_BUILTINS_8).

But ATOMIC_INT_LOCK_FREE only refers to int, i.e. 4-byte integer, so if
_GLIBCXX_ATOMIC_BUILTINS_4 was defined then I would expect atomic ops on int to
always be lock-free, i.e. the macro should be defined to 2.  It's independent
of whether atomic ops for 8-byte types are supported.

> The other thing is, std::exception_ptr availability should not depend on the
> fact whether the platform has lock-free atomics or not.

Without them you either need libatomic.so or you risk undefined behaviour such
as  leaking exception objects or worse, dangling references to destroyed
exceptions.
>From gcc-bugs-return-433188-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Oct 31 14:42:13 2013
Return-Path: <gcc-bugs-return-433188-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 24082 invoked by alias); 31 Oct 2013 14:42:13 -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 23712 invoked by uid 48); 31 Oct 2013 14:42:09 -0000
From: "martin at netbsd dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/58901] vax bootstrap fails on subreg reload
Date: Thu, 31 Oct 2013 14:42: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.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: martin at netbsd dot org
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:
Message-ID: <bug-58901-4-oAx80CYtWx@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58901-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58901-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: 2013-10/txt/msg02332.txt.bz2
Content-length: 1150

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX901

--- Comment #4 from Martin Husemann <martin at netbsd dot org> ---
I got a quick lesson in addressing modes for vax ;-)
It seems the mode = HImode passed to the upper functions in the call stack is
the problem - with HImode we can only use index operands with a factor of 2,
but this rtx has a factor of 4.

The problem starts in alter_subreg(), where the call to adjust_address_1 is
done:

#6  0x002d1a06 in alter_subreg (xp=0x7f0e8bc8, final_p=true, 2131659720, 1)
    at ../../gcc-4.8.2/gcc/final.c:3072
3072            *xp = adjust_address (y, GET_MODE (x), offset);

and x has (due to subreg) HImode:

(gdb) p debug_rtx(x)
(subreg:HI (mem/u/c:SI (plus:SI (mult:SI (reg/v:SI 0 %r0 [orig:81 count ] [81])
                (const_int 4 [0x4]))
            (symbol_ref:SI ("DECPOWERS") [flags 0x40] <var_decl 0x7f22fe60
DECPOWERS>)) [3 DECPOWERS S4 A32]) 0)
$12 = void
(gdb) p debug_rtx(y)
(mem/u/c:SI (plus:SI (mult:SI (reg/v:SI 0 %r0 [orig:81 count ] [81])
            (const_int 4 [0x4]))
        (symbol_ref:SI ("DECPOWERS") [flags 0x40] <var_decl 0x7f22fe60
DECPOWERS>)) [3 DECPOWERS S4 A32])


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

* [Bug libstdc++/58938] [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support
  2013-10-31 11:17 [Bug libstdc++/58938] New: [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support rafal at rawicki dot org
                   ` (5 preceding siblings ...)
  2013-10-31 14:13 ` redi at gcc dot gnu.org
@ 2013-10-31 14:55 ` amacleod at redhat dot com
  2013-11-04 14:17 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: amacleod at redhat dot com @ 2013-10-31 14:55 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 9185 bytes --]

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

--- Comment #7 from Andrew Macleod <amacleod at redhat dot com> ---
(In reply to Jonathan Wakely from comment #6)
> (In reply to Rafał Rawicki from comment #3)
> > This is a regression, because a more specific _GLIBCXX_ATOMIC_BUILTINS_4 was
> > defined (but is no longer available) and now there is defined
> > ATOMIC_INT_LOCK_FREE=1 (I think think the definition is correct, because
> > there were available _GLIBCXX_ATOMIC_BUILTINS_{1,2,4} and no
> > _GLIBCXX_ATOMIC_BUILTINS_8).
> 
> But ATOMIC_INT_LOCK_FREE only refers to int, i.e. 4-byte integer, so if
> _GLIBCXX_ATOMIC_BUILTINS_4 was defined then I would expect atomic ops on int
> to always be lock-free, i.e. the macro should be defined to 2.  It's
> independent of whether atomic ops for 8-byte types are supported.


yes. if an integer_type_node is 4 bytes, and the architecture has a 4 byte
compare and swap, it should be set to 2 regardless of the lack of an 8 byte
lock free operation.

this assert should never fail:
if (__atomic_always_lock_free(4, NULL) && (sizeof(int) == 4))
   assert (ATOMIC_INT_LOCK_FREE == 2);

In theory _GLIBCXX_ATOMIC_BUILTINS_4 should have been the same as
ATOMIC_INT_LOCK_FREE as long as sizeof (int) == 4


> 
> > The other thing is, std::exception_ptr availability should not depend on the
> > fact whether the platform has lock-free atomics or not.
> 
> Without them you either need libatomic.so or you risk undefined behaviour
> such as  leaking exception objects or worse, dangling references to
> destroyed exceptions.
>From gcc-bugs-return-433192-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Oct 31 15:11:11 2013
Return-Path: <gcc-bugs-return-433192-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 21522 invoked by alias); 31 Oct 2013 15:11:10 -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 21492 invoked by uid 48); 31 Oct 2013 15:11:06 -0000
From: "tprince at computer dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/58942] New: cilkplus internal compiler error: tree check __sec_reduce_max_ind
Date: Thu, 31 Oct 2013 15:11: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: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: tprince at computer dot org
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 attachments.created
Message-ID: <bug-58942-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: 2013-10/txt/msg02336.txt.bz2
Content-length: 2442

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

            Bug ID: 58942
           Summary: cilkplus internal compiler error: tree check
                    __sec_reduce_max_ind
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tprince at computer dot org

Created attachment 31123
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31123&action=edit
pre-processed source

gcc -O2 -ftree-vectorize -fopenmp -std=c99 -funroll-loops --param
max-unroll-times=4  -c -fcilkplus s315.i
s315.c: In function ‘s315_’:
s315.c:89:5: internal compiler error: tree check: accessed operand 2 of
indirect_ref with 1 operands in fix_builtin_array_notation_fn, at
c/c-array-notation.c:477
     }
     ^
0xbe4721 tree_operand_check_failed(int, tree_node const*, char const*, int,
char const*)
    ../../gcc/tree.c:9507
0x5e09bf tree_operand_check
    ../../gcc/tree.h:3127
0x5e09bf fix_builtin_array_notation_fn
    ../../gcc/c/c-array-notation.c:477
0x5e28dd build_array_notation_expr(unsigned int, tree_node*, tree_node*,
tree_code, unsigned int, tree_node*, tree_node*)
    ../../gcc/c/c-array-notation.c:640
0x5e5478 expand_array_notation_exprs(tree_node*)
    ../../gcc/c/c-array-notation.c:1275
0x5e5108 expand_array_notation_exprs(tree_node*)
    ../../gcc/c/c-array-notation.c:1263
0x5d91eb c_parser_compound_statement
    ../../gcc/c/c-parser.c:4174
0x5d7267 c_parser_statement_after_labels
    ../../gcc/c/c-parser.c:4570
0x5db593 c_parser_c99_block_statement
    ../../gcc/c/c-parser.c:4757
0x5dbb36 c_parser_for_statement
    ../../gcc/c/c-parser.c:5219
0x5d76b3 c_parser_statement_after_labels
    ../../gcc/c/c-parser.c:4588
0x5d8926 c_parser_compound_statement_nostart
    ../../gcc/c/c-parser.c:4338
0x5d917e c_parser_compound_statement
    ../../gcc/c/c-parser.c:4170
0x5da0fa c_parser_declaration_or_fndef
    ../../gcc/c/c-parser.c:1810
0x5dd995 c_parser_external_declaration
    ../../gcc/c/c-parser.c:1380
0x5de439 c_parser_translation_unit
    ../../gcc/c/c-parser.c:1267
0x5de439 c_parse_file()
    ../../gcc/c/c-parser.c:13297
0x62e753 c_common_parse_file()
    ../../gcc/c-family/c-opts.c:1046
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
>From gcc-bugs-return-433193-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Oct 31 15:13:24 2013
Return-Path: <gcc-bugs-return-433193-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23869 invoked by alias); 31 Oct 2013 15:13:23 -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 23716 invoked by uid 48); 31 Oct 2013 15:13:19 -0000
From: "tprince at computer dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/58942] cilkplus internal compiler error: tree check __sec_reduce_max_ind
Date: Thu, 31 Oct 2013 15:13:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: tprince at computer dot org
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:
Message-ID: <bug-58942-4-Hq5bGeiobT@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58942-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58942-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: 2013-10/txt/msg02337.txt.bz2
Content-length: 1503

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX942

--- Comment #1 from tprince at computer dot org ---
 gcc -O2 -ftree-vectorize -fopenmp -stdÉ9 -funroll-loops --param
max-unroll-times=4  -c -fcilkplus -v s315.i
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/usr/local/gcc-4.9 --enable-languages='c
c++ fortran'
Thread model: posix
gcc version 4.9.0 20131031 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-O2' '-ftree-vectorize' '-fopenmp' '-stdÉ9'
'-funroll-loops' '--param' 'max-unroll-times=4' '-c' '-fcilkplus' '-v'
'-mtune=generic' '-march=x86-64' '-pthread'
 /usr/local/gcc-4.9/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/cc1
-fpreprocessed s315.i -quiet -dumpbase s315.i -mtune=generic -march=x86-64
-auxbase s315 -O2 -stdÉ9 -version -ftree-vectorize -fopenmp -funroll-loops
-fcilkplus --param max-unroll-times=4 -o /tmp/ccwvvwef.s
GNU C (GCC) version 4.9.0 20131031 (experimental) (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.9.0 20131031 (experimental), GMP version 4.3.2,
MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand0 --param ggc-min-heapsize@96
GNU C (GCC) version 4.9.0 20131031 (experimental) (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.9.0 20131031 (experimental), GMP version 4.3.2,
MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand0 --param ggc-min-heapsize@96
Compiler executable checksum: 0002240542c88ef466dc653c18157e56


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

* [Bug libstdc++/58938] [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support
  2013-10-31 11:17 [Bug libstdc++/58938] New: [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support rafal at rawicki dot org
                   ` (6 preceding siblings ...)
  2013-10-31 14:55 ` amacleod at redhat dot com
@ 2013-11-04 14:17 ` rguenth at gcc dot gnu.org
  2013-11-04 14:50 ` paolo.carlini at oracle dot com
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-04 14:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.4


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

* [Bug libstdc++/58938] [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support
  2013-10-31 11:17 [Bug libstdc++/58938] New: [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support rafal at rawicki dot org
                   ` (7 preceding siblings ...)
  2013-11-04 14:17 ` rguenth at gcc dot gnu.org
@ 2013-11-04 14:50 ` paolo.carlini at oracle dot com
  2013-11-04 15:46 ` rafal at rawicki dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-11-04 14:50 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Closing then.


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

* [Bug libstdc++/58938] [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support
  2013-10-31 11:17 [Bug libstdc++/58938] New: [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support rafal at rawicki dot org
                   ` (8 preceding siblings ...)
  2013-11-04 14:50 ` paolo.carlini at oracle dot com
@ 2013-11-04 15:46 ` rafal at rawicki dot org
  2013-11-04 16:24 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rafal at rawicki dot org @ 2013-11-04 15:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Rafał Rawicki <rafal at rawicki dot org> ---
I'm sorry about my confusion of ATOMIC_INT_LOCK_FREE and
_GLIBCXX_ATOMIC_BUILTINS meaning.

In the meantime I've checked, when ATOMIC_INT_LOCK_FREE is defined as 2 and the
target platform I have problems with (XScale, that is ARMv5), shouldn't have
that defined. I'm still checking why I had _GLIBCXX_ATOMIC_BUILTINS_4 on gcc
4.6.

I would like to have the same codebase on all platforms and I wouldn't like to
stop using std::exception_ptr. Jonathan Wakely wrote, that without hardware
support I need libatomic.so or I'd have an undefined behaviour.

I do link with libatomic.so - does that mean, I can patch this conditional out
(and similar conditional in the exception_ptr.h) and use exception_ptrs?

Why it was decided to remove a part of standard library instead of enforcing
user to link with libatomic.so?
>From gcc-bugs-return-433471-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 04 15:55:19 2013
Return-Path: <gcc-bugs-return-433471-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 4305 invoked by alias); 4 Nov 2013 15:55:19 -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 2968 invoked by uid 48); 4 Nov 2013 15:53:17 -0000
From: "bviyer at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/58951] [4.9 regression] cilk build fails due to use of -ldl
Date: Mon, 04 Nov 2013 15:55:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: bootstrap
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords: build
X-Bugzilla-Severity: normal
X-Bugzilla-Who: bviyer at gmail dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: bviyer at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-58951-4-MvvaQ4Eut8@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58951-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58951-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: 2013-11/txt/msg00248.txt.bz2
Content-length: 455

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX951

Balaji V. Iyer <bviyer at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bviyer at gmail dot com

--- Comment #1 from Balaji V. Iyer <bviyer at gmail dot com> ---
I am on it.  I will let you know as soon as get a fix.

Thanks,

Balaji V. Iyer.


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

* [Bug libstdc++/58938] [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support
  2013-10-31 11:17 [Bug libstdc++/58938] New: [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support rafal at rawicki dot org
                   ` (9 preceding siblings ...)
  2013-11-04 15:46 ` rafal at rawicki dot org
@ 2013-11-04 16:24 ` redi at gcc dot gnu.org
  2014-10-31 20:48 ` frankhb1989 at gmail dot com
  2014-10-31 20:59 ` [Bug libstdc++/58938] " redi at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2013-11-04 16:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Rafał Rawicki from comment #9)
> I do link with libatomic.so - does that mean, I can patch this conditional
> out (and similar conditional in the exception_ptr.h) and use exception_ptrs?

You could try it.  I don't know if it will work correctly.

> Why it was decided to remove a part of standard library instead of enforcing
> user to link with libatomic.so?

That's the usual policy for the library, we don't define components that rely
on features that are missing from target platforms.
>From gcc-bugs-return-433477-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 04 16:24:00 2013
Return-Path: <gcc-bugs-return-433477-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 20275 invoked by alias); 4 Nov 2013 16:24:00 -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 16789 invoked by uid 48); 4 Nov 2013 16:21:57 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/58979] [4.8/4.9 Regression] ICE with invalid use of pointer-to-member
Date: Mon, 04 Nov 2013 16:24:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: ice-on-invalid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.4
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-58979-4-NoMYZ2GyHU@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58979-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58979-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: 2013-11/txt/msg00254.txt.bz2
Content-length: 427

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX979

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

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

--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed.


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

* [Bug libstdc++/58938] [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support
  2013-10-31 11:17 [Bug libstdc++/58938] New: [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support rafal at rawicki dot org
                   ` (10 preceding siblings ...)
  2013-11-04 16:24 ` redi at gcc dot gnu.org
@ 2014-10-31 20:48 ` frankhb1989 at gmail dot com
  2014-10-31 20:59 ` [Bug libstdc++/58938] " redi at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: frankhb1989 at gmail dot com @ 2014-10-31 20:48 UTC (permalink / raw)
  To: gcc-bugs

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

frankhb1989 at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |frankhb1989 at gmail dot com

--- Comment #11 from frankhb1989 at gmail dot com ---
I'd like to say it should be a bug, if I did not get it wrong.
Even for a freestanding implementation, ISO C++11 explicitly specified
<exception> as one of required header in table 16, and it should meet the same
requirements as for a hosted implementation. Missing exception propagation is
definitely not conforming, whether it can actually be implemented or not.
Moreover, the standard doesn't specify anything about atomic operations on
exception propagation, though it does requires that there should be no data
race during some operations. Atomic operations here seem to be purely
implementation details. Can it be implemented with something like
__shared_ptr's lock policy?
This issue also has effect on nested exceptions. Anyway, I feel something
indeed wrong when I have to miss std::nested_exception for this reason on a
platform which has even no multithreading support at all (as allowed by C++11).
Sigh.
BTW, libstdc++ manual Table 1.2 just tell me 'Y' for 18.8.5 and 18.8.6. Found
no other notes about this issue. So at least it can be a defect of
documentation.


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

* [Bug libstdc++/58938] std::exception_ptr is missing on architectures with incomplete atomic int support
  2013-10-31 11:17 [Bug libstdc++/58938] New: [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support rafal at rawicki dot org
                   ` (11 preceding siblings ...)
  2014-10-31 20:48 ` frankhb1989 at gmail dot com
@ 2014-10-31 20:59 ` redi at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2014-10-31 20:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2014-10-31
         Resolution|INVALID                     |---
   Target Milestone|4.7.4                       |---
            Summary|[4.7/4.8/4.9 Regression]    |std::exception_ptr is
                   |std::exception_ptr is       |missing on architectures
                   |missing on architectures    |with incomplete atomic int
                   |with incomplete atomic int  |support
                   |support                     |
     Ever confirmed|0                           |1
           Severity|normal                      |enhancement

--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Someone just needs to do the work to support it on other targets.

One option would be to require libatomic, another would be to not use atomics
at all if e.g. !defined(__GTHREADS)


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

end of thread, other threads:[~2014-10-31 20:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-31 11:17 [Bug libstdc++/58938] New: [4.7/4.8/4.9 Regression] std::exception_ptr is missing on architectures with incomplete atomic int support rafal at rawicki dot org
2013-10-31 12:19 ` [Bug libstdc++/58938] " paolo.carlini at oracle dot com
2013-10-31 13:10 ` redi at gcc dot gnu.org
2013-10-31 13:37 ` rafal at rawicki dot org
2013-10-31 13:39 ` rafal at rawicki dot org
2013-10-31 14:11 ` paolo.carlini at oracle dot com
2013-10-31 14:13 ` redi at gcc dot gnu.org
2013-10-31 14:55 ` amacleod at redhat dot com
2013-11-04 14:17 ` rguenth at gcc dot gnu.org
2013-11-04 14:50 ` paolo.carlini at oracle dot com
2013-11-04 15:46 ` rafal at rawicki dot org
2013-11-04 16:24 ` redi at gcc dot gnu.org
2014-10-31 20:48 ` frankhb1989 at gmail dot com
2014-10-31 20:59 ` [Bug libstdc++/58938] " 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).