public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67021] New: [c++-concepts]
@ 2015-07-26 19:10 Casey at Carter dot net
2015-07-28 23:09 ` [Bug c++/67021] [c++-concepts] ICE in finish_member_declaration Casey at Carter dot net
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Casey at Carter dot net @ 2015-07-26 19:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67021
Bug ID: 67021
Summary: [c++-concepts]
Product: gcc
Version: c++-concepts
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: Casey at Carter dot net
Target Milestone: ---
Created attachment 36062
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36062&action=edit
Test case
This program:
#include <type_traits>
template <class...>
struct all_same { static constexpr bool value = true; };
template <class T, class...Rest>
struct all_same<T, T, Rest...> : all_same<T, Rest...> {};
template <class T, class U, class...Rest>
struct all_same<T, U, Rest...> { static constexpr bool value = false; };
template <class...Us>
concept bool Same() {
return all_same<Us...>::value;
}
template <class R>
using ValueType = int;
template <class I>
concept bool A() {
return requires (I& i) {
requires Same<ValueType<I>, ValueType<decltype(i++)>>();
};
}
template <A>
requires false
constexpr bool f() { return false; }
template <A>
constexpr bool f() { return true; }
int main() {
static_assert(f<int>());
}
ICEs with:
~/concept-gcc/bin/g++ -std=gnu++1z foo3.cpp -c
foo3.cpp: In instantiation of ‘struct all_same<ValueType<I>, ValueType<decltype
((i ++))> >’:
foo3.cpp:29:18: required from here
foo3.cpp:8:56: internal compiler error: in finish_member_declaration, at
cp/semantics.c:2862
struct all_same<T, U, Rest...> { static constexpr bool value = false; };
^
0x772373 finish_member_declaration(tree_node*)
../../gcc/cp/semantics.c:2862
0x68321f instantiate_class_template_1
../../gcc/cp/pt.c:10028
0x68321f instantiate_class_template(tree_node*)
../../gcc/cp/pt.c:10237
0x720403 complete_type(tree_node*)
../../gcc/cp/typeck.c:138
0x7633c4 lookup_member(tree_node*, tree_node*, int, bool, int)
../../gcc/cp/search.c:1205
0x7c2de9 lookup_qualified_name(tree_node*, tree_node*, bool, bool)
../../gcc/cp/name-lookup.c:4532
0x65027b tsubst_qualified_id
../../gcc/cp/pt.c:13402
0x6524db tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/cp/pt.c:15491
0x64462e tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
../../gcc/cp/pt.c:15092
0x8057df lift_function_definition
../../gcc/cp/constraint.cc:407
0x80488d lift_requires_expression
../../gcc/cp/constraint.cc:526
0x80488d lift_expression
../../gcc/cp/constraint.cc:558
0x805220 normalize_predicate_constraint
../../gcc/cp/constraint.cc:955
0x805220 normalize_constraint
../../gcc/cp/constraint.cc:993
0x805508 build_constraints(tree_node*, tree_node*)
../../gcc/cp/constraint.cc:1096
0x5af175 grokfndecl
../../gcc/cp/decl.c:7788
0x6208f6 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
../../gcc/cp/decl.c:11202
0x622066 start_function(cp_decl_specifier_seq*, cp_declarator const*,
tree_node*)
../../gcc/cp/decl.c:13964
0x710ce8 cp_parser_function_definition_from_specifiers_and_declarator
../../gcc/cp/parser.c:24317
0x710ce8 cp_parser_init_declarator
../../gcc/cp/parser.c:17632
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
Here's where things get weird: despite the fact that nothing in the test case
refers to any entity in namespace std, removing "#include <type_traits>"
results in a correctly compiling program.
>From gcc-bugs-return-493384-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Jul 26 19:32:11 2015
Return-Path: <gcc-bugs-return-493384-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 95894 invoked by alias); 26 Jul 2015 19:32:11 -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 95851 invoked by uid 48); 26 Jul 2015 19:32:08 -0000
From: "ppalka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/18969] Invalid return statement diagnosed too late
Date: Sun, 26 Jul 2015 19:32: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.0.0
X-Bugzilla-Keywords: accepts-invalid, monitored
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ppalka at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: FIXED
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cc resolution target_milestone
Message-ID: <bug-18969-4-Wn9OUA7ubY@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-18969-4@http.gcc.gnu.org/bugzilla/>
References: <bug-18969-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: 2015-07/txt/msg02274.txt.bz2
Content-length: 552
https://gcc.gnu.org/bugzilla/show_bug.cgi?id\x18969
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |ppalka at gcc dot gnu.org
Resolution|--- |FIXED
Target Milestone|--- |6.0
--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/67021] [c++-concepts] ICE in finish_member_declaration
2015-07-26 19:10 [Bug c++/67021] New: [c++-concepts] Casey at Carter dot net
@ 2015-07-28 23:09 ` Casey at Carter dot net
2015-07-30 5:12 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Casey at Carter dot net @ 2015-07-28 23:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67021
Casey Carter <Casey at Carter dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-valid-code |
--- Comment #1 from Casey Carter <Casey at Carter dot net> ---
The test case no longer ICEs r226327, but it still fails to compile only when
<type_traits> is included.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/67021] [c++-concepts] ICE in finish_member_declaration
2015-07-26 19:10 [Bug c++/67021] New: [c++-concepts] Casey at Carter dot net
2015-07-28 23:09 ` [Bug c++/67021] [c++-concepts] ICE in finish_member_declaration Casey at Carter dot net
@ 2015-07-30 5:12 ` jason at gcc dot gnu.org
2015-07-30 5:29 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2015-07-30 5:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67021
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2015-07-30
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/67021] [c++-concepts] ICE in finish_member_declaration
2015-07-26 19:10 [Bug c++/67021] New: [c++-concepts] Casey at Carter dot net
2015-07-28 23:09 ` [Bug c++/67021] [c++-concepts] ICE in finish_member_declaration Casey at Carter dot net
2015-07-30 5:12 ` jason at gcc dot gnu.org
@ 2015-07-30 5:29 ` jason at gcc dot gnu.org
2015-07-30 5:31 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2015-07-30 5:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67021
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Thu Jul 30 05:27:34 2015
New Revision: 226381
URL: https://gcc.gnu.org/viewcvs?rev=226381&root=gcc&view=rev
Log:
DR 1558
PR c++/67021
* pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/alias-decl-52.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/67021] [c++-concepts] ICE in finish_member_declaration
2015-07-26 19:10 [Bug c++/67021] New: [c++-concepts] Casey at Carter dot net
` (2 preceding siblings ...)
2015-07-30 5:29 ` jason at gcc dot gnu.org
@ 2015-07-30 5:31 ` jason at gcc dot gnu.org
2015-07-30 5:32 ` jason at gcc dot gnu.org
2015-07-30 5:49 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2015-07-30 5:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67021
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Thu Jul 30 05:31:09 2015
New Revision: 226382
URL: https://gcc.gnu.org/viewcvs?rev=226382&root=gcc&view=rev
Log:
DR 1558
PR c++/67021
* pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
Added:
branches/c++-concepts/gcc/testsuite/g++.dg/cpp0x/alias-decl-52.C
Modified:
branches/c++-concepts/gcc/cp/pt.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/67021] [c++-concepts] ICE in finish_member_declaration
2015-07-26 19:10 [Bug c++/67021] New: [c++-concepts] Casey at Carter dot net
` (3 preceding siblings ...)
2015-07-30 5:31 ` jason at gcc dot gnu.org
@ 2015-07-30 5:32 ` jason at gcc dot gnu.org
2015-07-30 5:49 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2015-07-30 5:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67021
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/67021] [c++-concepts] ICE in finish_member_declaration
2015-07-26 19:10 [Bug c++/67021] New: [c++-concepts] Casey at Carter dot net
` (4 preceding siblings ...)
2015-07-30 5:32 ` jason at gcc dot gnu.org
@ 2015-07-30 5:49 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2015-07-30 5:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67021
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Thu Jul 30 05:48:40 2015
New Revision: 226383
URL: https://gcc.gnu.org/viewcvs?rev=226383&root=gcc&view=rev
Log:
DR 1558
PR c++/67021
* pt.c (tsubst_decl) [TYPE_DECL]: Clear TYPE_DEPENDENT_P_VALID.
Added:
branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp0x/alias-decl-52.C
Modified:
branches/gcc-5-branch/gcc/cp/ChangeLog
branches/gcc-5-branch/gcc/cp/pt.c
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-07-30 5:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-26 19:10 [Bug c++/67021] New: [c++-concepts] Casey at Carter dot net
2015-07-28 23:09 ` [Bug c++/67021] [c++-concepts] ICE in finish_member_declaration Casey at Carter dot net
2015-07-30 5:12 ` jason at gcc dot gnu.org
2015-07-30 5:29 ` jason at gcc dot gnu.org
2015-07-30 5:31 ` jason at gcc dot gnu.org
2015-07-30 5:32 ` jason at gcc dot gnu.org
2015-07-30 5:49 ` 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).