public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55039] New: std::addressof vs. constexpr
@ 2012-10-23 18:12 bkoz at gcc dot gnu.org
  2012-10-23 18:16 ` [Bug c++/55039] " daniel.kruegler at googlemail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: bkoz at gcc dot gnu.org @ 2012-10-23 18:12 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55039
           Summary: std::addressof vs. constexpr
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: bkoz@gcc.gnu.org


If std::addressof can be made constexpr, then the iterator member functions of
std::array should be able to be made constexpr as well (begin/end, etc.)

As it stands, std::addressof calls into std::__addressof, which has a
reinterpret_cast, killing constexpr. 

If some variation of

http://gcc.gnu.org/onlinedocs/gcc/Return-Address.html

could be extended to support this, then the new intrinsic could be used to
implement std::addressof.


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

* [Bug c++/55039] std::addressof vs. constexpr
  2012-10-23 18:12 [Bug c++/55039] New: std::addressof vs. constexpr bkoz at gcc dot gnu.org
@ 2012-10-23 18:16 ` daniel.kruegler at googlemail dot com
  2012-10-23 20:54 ` paolo.carlini at oracle dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2012-10-23 18:16 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2012-10-23 18:15:38 UTC ---
I agree, an intrinsic is needed


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

* [Bug c++/55039] std::addressof vs. constexpr
  2012-10-23 18:12 [Bug c++/55039] New: std::addressof vs. constexpr bkoz at gcc dot gnu.org
  2012-10-23 18:16 ` [Bug c++/55039] " daniel.kruegler at googlemail dot com
@ 2012-10-23 20:54 ` paolo.carlini at oracle dot com
  2012-10-23 20:56 ` daniel.kruegler at googlemail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-23 20:54 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-23 20:53:41 UTC ---
Daniel, I'm confused: didn't we agree in that other open PR we have got about
reinterpret_cast vs constexpr that actually the Standard should be amended
exactly to allow this meaningful use of reint cast in the impl of address_of?


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

* [Bug c++/55039] std::addressof vs. constexpr
  2012-10-23 18:12 [Bug c++/55039] New: std::addressof vs. constexpr bkoz at gcc dot gnu.org
  2012-10-23 18:16 ` [Bug c++/55039] " daniel.kruegler at googlemail dot com
  2012-10-23 20:54 ` paolo.carlini at oracle dot com
@ 2012-10-23 20:56 ` daniel.kruegler at googlemail dot com
  2012-10-23 21:06 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2012-10-23 20:56 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2012-10-23 20:56:36 UTC ---
(In reply to comment #2)
During the Portland meeting the issue

http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1384

was discussed and core had consensus *not* to support reinterpret_cast in
constant core expressions. I think this means we need to bite the bullet now.


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

* [Bug c++/55039] std::addressof vs. constexpr
  2012-10-23 18:12 [Bug c++/55039] New: std::addressof vs. constexpr bkoz at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-10-23 20:56 ` daniel.kruegler at googlemail dot com
@ 2012-10-23 21:06 ` paolo.carlini at oracle dot com
  2014-11-17 20:55 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-23 21:06 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-23 21:06:09 UTC ---
Ok, thanks, I wasn't there. Then please somebody add a note to that other PR.
In any case, the other PR being about us actually accepting reint casts for the
time being, I think it's Ok for our library to just constexpr for the time
being and add a big comment about this PR, that is about the eventual need of
an intrinsics as implementation detail.


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

* [Bug c++/55039] std::addressof vs. constexpr
  2012-10-23 18:12 [Bug c++/55039] New: std::addressof vs. constexpr bkoz at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-10-23 21:06 ` paolo.carlini at oracle dot com
@ 2014-11-17 20:55 ` jason at gcc dot gnu.org
  2014-11-17 20:58 ` daniel.kruegler at googlemail dot com
  2014-11-17 21:26 ` glisse at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-11-17 20:55 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

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

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Since LWG decided not to allow implementations to add constexpr (sigh), I guess
we don't need this intrinsic.


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

* [Bug c++/55039] std::addressof vs. constexpr
  2012-10-23 18:12 [Bug c++/55039] New: std::addressof vs. constexpr bkoz at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-11-17 20:55 ` jason at gcc dot gnu.org
@ 2014-11-17 20:58 ` daniel.kruegler at googlemail dot com
  2014-11-17 21:26 ` glisse at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2014-11-17 20:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
(In reply to Jason Merrill from comment #5)

Given that there exists the still open issue

http://cplusplus.github.io/LWG/lwg-active.html#2296

should this bugzilla issue remain open?
>From gcc-bugs-return-467080-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 17 21:10:24 2014
Return-Path: <gcc-bugs-return-467080-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 11927 invoked by alias); 17 Nov 2014 21:10:24 -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 11884 invoked by uid 48); 17 Nov 2014 21:10:18 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/63844] [4.8/4.9/5 Regression] open mp parallelization prevents vectorization
Date: Mon, 17 Nov 2014 21:10:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 4.9.3
X-Bugzilla-Keywords: missed-optimization, openmp
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.4
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc assigned_to target_milestone short_desc everconfirmed
Message-ID: <bug-63844-4-DvaixgwZY7@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63844-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63844-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-11/txt/msg01552.txt.bz2
Content-length: 1011

https://gcc.gnu.org/bugzilla/show_bug.cgi?idc844

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-11-17
                 CC|                            |jakub at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
   Target Milestone|---                         |4.8.4
            Summary|open mp parallelization     |[4.8/4.9/5 Regression] open
                   |prevents vectorization      |mp parallelization prevents
                   |                            |vectorization
     Ever confirmed|0                           |1

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I certainly see the same thing in 4.8, it seems this regressed in r161655.
Anyway, I will have a look tomorrow.


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

* [Bug c++/55039] std::addressof vs. constexpr
  2012-10-23 18:12 [Bug c++/55039] New: std::addressof vs. constexpr bkoz at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-11-17 20:58 ` daniel.kruegler at googlemail dot com
@ 2014-11-17 21:26 ` glisse at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-11-17 21:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Marc Glisse <glisse at gcc dot gnu.org> ---
std::addressof can be constexpr with -std=gnu++XX, and even in strict mode
std::__addressof can be constexpr for internal use in libstdc++.


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

end of thread, other threads:[~2014-11-17 21:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-23 18:12 [Bug c++/55039] New: std::addressof vs. constexpr bkoz at gcc dot gnu.org
2012-10-23 18:16 ` [Bug c++/55039] " daniel.kruegler at googlemail dot com
2012-10-23 20:54 ` paolo.carlini at oracle dot com
2012-10-23 20:56 ` daniel.kruegler at googlemail dot com
2012-10-23 21:06 ` paolo.carlini at oracle dot com
2014-11-17 20:55 ` jason at gcc dot gnu.org
2014-11-17 20:58 ` daniel.kruegler at googlemail dot com
2014-11-17 21:26 ` glisse 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).