public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/61661] New: [C++11][4.9/4.10 Regression] Bogus error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant expression
@ 2014-06-30 18:16 brooks at gcc dot gnu.org
2014-07-07 8:47 ` [Bug c++/61661] " paolo.carlini at oracle dot com
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: brooks at gcc dot gnu.org @ 2014-06-30 18:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61661
Bug ID: 61661
Summary: [C++11][4.9/4.10 Regression] Bogus error: ‘const
Outer::Foo{&Outer::Bar}’ is not a constant expression
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: brooks at gcc dot gnu.org
Google ref: b/15984570
This source:
/// --- cut ---
struct Outer {
void Bar();
struct Foo {
void (Outer::*ptr)() ;
};
static constexpr Foo foo = { &Outer::Bar };
};
/// --- cut ---
compiles fine with gcc-4.8 and Clang, fails with gcc-4_9 and current trunk.
Started to fail after r195189 and before r197259 (boundaries are not exact).
./gcc-svn-r211990/bin/g++ -c -std=c++11 -o /tmp/t.o /tmp/t.cc
/tmp/t.cc:9:44: error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant
expression
static constexpr Foo foo = { &Outer::Bar };
^
>From gcc-bugs-return-455382-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jun 30 18:25:42 2014
Return-Path: <gcc-bugs-return-455382-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 15307 invoked by alias); 30 Jun 2014 18:25:41 -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 14982 invoked by uid 48); 30 Jun 2014 18:25:36 -0000
From: "mrs at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/52268] native tls support should be added for darwin11
Date: Mon, 30 Jun 2014 18:25: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.7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: mrs 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-52268-4-40qt5z8dER@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-52268-4@http.gcc.gnu.org/bugzilla/>
References: <bug-52268-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-06/txt/msg02464.txt.bz2
Content-length: 178
https://gcc.gnu.org/bugzilla/show_bug.cgi?idR268
--- Comment #11 from mrs at gcc dot gnu.org <mrs at gcc dot gnu.org> ---
Fixed title to reflect that this is for native tls.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/61661] [C++11][4.9/4.10 Regression] Bogus error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant expression
2014-06-30 18:16 [Bug c++/61661] New: [C++11][4.9/4.10 Regression] Bogus error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant expression brooks at gcc dot gnu.org
@ 2014-07-07 8:47 ` paolo.carlini at oracle dot com
2014-07-07 11:10 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-07-07 8:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61661
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
We should bisect this.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/61661] [C++11][4.9/4.10 Regression] Bogus error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant expression
2014-06-30 18:16 [Bug c++/61661] New: [C++11][4.9/4.10 Regression] Bogus error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant expression brooks at gcc dot gnu.org
2014-07-07 8:47 ` [Bug c++/61661] " paolo.carlini at oracle dot com
@ 2014-07-07 11:10 ` rguenth at gcc dot gnu.org
2014-07-10 9:38 ` paolo.carlini at oracle dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-07-07 11:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61661
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Version|unknown |4.9.0
Target Milestone|--- |4.9.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/61661] [C++11][4.9/4.10 Regression] Bogus error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant expression
2014-06-30 18:16 [Bug c++/61661] New: [C++11][4.9/4.10 Regression] Bogus error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant expression brooks at gcc dot gnu.org
2014-07-07 8:47 ` [Bug c++/61661] " paolo.carlini at oracle dot com
2014-07-07 11:10 ` rguenth at gcc dot gnu.org
@ 2014-07-10 9:38 ` paolo.carlini at oracle dot com
2014-07-10 20:56 ` [Bug c++/61661] [4.9/4.10 " jason at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-07-10 9:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61661
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-07-10
CC| |jason at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Regressed with r196852:
Author: jason
Date: Thu Mar 21 03:25:35 2013
New Revision: 196852
URL: http://gcc.gnu.org/viewcvs?rev=196852&root=gcc&view=rev
Log:
PR c++/54532
* expr.c (cplus_expand_constant): Do nothing if the class is
incomplete.
* semantics.c (reduced_constant_expression_p): Allow PTRMEM_CST.
* typeck2.c (store_init_value): Use reduced_constant_expression_p.
* decl.c (maybe_register_incomplete_var): Handle PTRMEM_CST.
(complete_vars): Likewise.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-static11.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/cp/expr.c
trunk/gcc/cp/semantics.c
trunk/gcc/cp/typeck2.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/61661] [4.9/4.10 Regression] Bogus error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant expression
2014-06-30 18:16 [Bug c++/61661] New: [C++11][4.9/4.10 Regression] Bogus error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant expression brooks at gcc dot gnu.org
` (2 preceding siblings ...)
2014-07-10 9:38 ` paolo.carlini at oracle dot com
@ 2014-07-10 20:56 ` jason at gcc dot gnu.org
2014-07-10 21:49 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-07-10 20:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61661
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/61661] [4.9/4.10 Regression] Bogus error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant expression
2014-06-30 18:16 [Bug c++/61661] New: [C++11][4.9/4.10 Regression] Bogus error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant expression brooks at gcc dot gnu.org
` (3 preceding siblings ...)
2014-07-10 20:56 ` [Bug c++/61661] [4.9/4.10 " jason at gcc dot gnu.org
@ 2014-07-10 21:49 ` jason at gcc dot gnu.org
2014-07-10 21:54 ` jason at gcc dot gnu.org
2014-07-10 21:56 ` jason at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-07-10 21:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61661
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Thu Jul 10 21:48:26 2014
New Revision: 212439
URL: https://gcc.gnu.org/viewcvs?rev=212439&root=gcc&view=rev
Log:
PR c++/61661
* semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/61661] [4.9/4.10 Regression] Bogus error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant expression
2014-06-30 18:16 [Bug c++/61661] New: [C++11][4.9/4.10 Regression] Bogus error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant expression brooks at gcc dot gnu.org
` (4 preceding siblings ...)
2014-07-10 21:49 ` jason at gcc dot gnu.org
@ 2014-07-10 21:54 ` jason at gcc dot gnu.org
2014-07-10 21:56 ` jason at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-07-10 21:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61661
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Thu Jul 10 21:53:23 2014
New Revision: 212440
URL: https://gcc.gnu.org/viewcvs?rev=212440&root=gcc&view=rev
Log:
PR c++/61661
* semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
Added:
branches/gcc-4_9-branch/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem2.C
Modified:
branches/gcc-4_9-branch/gcc/cp/ChangeLog
branches/gcc-4_9-branch/gcc/cp/semantics.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/61661] [4.9/4.10 Regression] Bogus error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant expression
2014-06-30 18:16 [Bug c++/61661] New: [C++11][4.9/4.10 Regression] Bogus error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant expression brooks at gcc dot gnu.org
` (5 preceding siblings ...)
2014-07-10 21:54 ` jason at gcc dot gnu.org
@ 2014-07-10 21:56 ` jason at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-07-10 21:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61661
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-07-10 21:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-30 18:16 [Bug c++/61661] New: [C++11][4.9/4.10 Regression] Bogus error: ‘const Outer::Foo{&Outer::Bar}’ is not a constant expression brooks at gcc dot gnu.org
2014-07-07 8:47 ` [Bug c++/61661] " paolo.carlini at oracle dot com
2014-07-07 11:10 ` rguenth at gcc dot gnu.org
2014-07-10 9:38 ` paolo.carlini at oracle dot com
2014-07-10 20:56 ` [Bug c++/61661] [4.9/4.10 " jason at gcc dot gnu.org
2014-07-10 21:49 ` jason at gcc dot gnu.org
2014-07-10 21:54 ` jason at gcc dot gnu.org
2014-07-10 21:56 ` jason 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).