From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14718 invoked by alias); 23 May 2013 21:23:29 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 14612 invoked by uid 48); 23 May 2013 21:23:19 -0000 From: "daniel.kruegler at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57248] string parameter to constexpr functions Date: Thu, 23 May 2013 21:23: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: daniel.kruegler at googlemail dot com 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: In-Reply-To: References: 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-05/txt/msg01667.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D57248 --- Comment #3 from Daniel Kr=C3=BCgler --- The code looks valid to me. I think that Paolo just wanted to point out that the library implementation does not cause this. I agree with him and can confirm that the code is also rejected when emulating the library such as in the following way: template struct enable_if{}; template struct enable_if{ typedef T type; }; template struct tuple { T1 t1; T2 t2; }; template constexpr typename enable_if::type get(tuple t) { return t.t1; } template constexpr typename enable_if::type get(tuple t) { return t.t2; } template constexpr tuple make_tuple(T1 t1, T2 t2) { return tuple{t1, t2}; } Same error here. >>From gcc-bugs-return-422995-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu May 23 21:34:47 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 19574 invoked by alias); 23 May 2013 21:34:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 19511 invoked by uid 48); 23 May 2013 21:34:41 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/57359] wrong code for union access at -O3 on x86_64-linux Date: Thu, 23 May 2013 21:34: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: RESOLVED 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: cc Message-ID: In-Reply-To: References: 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-05/txt/msg01668.txt.bz2 Content-length: 448 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57359 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek --- NP, and thanks a lot for the bugreports, they are very much appreciated.