public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60223] New: [c++11] ICE with C++11-style default template parameter
@ 2014-02-16 17:07 reichelt at gcc dot gnu.org
2014-02-16 21:04 ` [Bug c++/60223] " glisse at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-16 17:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60223
Bug ID: 60223
Summary: [c++11] ICE with C++11-style default template
parameter
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
The following valid code snippet (compiled with "-std=c++11") triggers
an ICE since GCC 4.6.0:
==========================================
template<typename T, T = T{}> struct A {};
template<typename T> void foo(A<T>) {}
void bar()
{
foo(A<char>());
}
==========================================
bug.cc: In substitution of 'template<class T> void foo(A<T>) [with T =
<missing>]':
bug.cc:7:16: required from here
bug.cc:7:16: internal compiler error: in unify, at cp/pt.c:17895
foo(A<char>());
^
0x635440 unify
../../gcc/gcc/cp/pt.c:17895
0x634bf6 unify
../../gcc/gcc/cp/pt.c:17717
0x5525ad try_class_unification
../../gcc/gcc/cp/pt.c:16736
0x634775 unify
../../gcc/gcc/cp/pt.c:17753
0x6374e7 unify_one_argument
../../gcc/gcc/cp/pt.c:16161
0x639944 type_unification_real
../../gcc/gcc/cp/pt.c:16233
0x64265a fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool)
../../gcc/gcc/cp/pt.c:15671
0x5addd1 add_template_candidate_real
../../gcc/gcc/cp/call.c:2973
0x5a9a7c add_template_candidate
../../gcc/gcc/cp/call.c:3070
0x5a9a7c add_candidates
../../gcc/gcc/cp/call.c:5131
0x5afee8 perform_overload_resolution
../../gcc/gcc/cp/call.c:3866
0x5b2bca build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
../../gcc/gcc/cp/call.c:3943
0x72e404 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
../../gcc/gcc/cp/semantics.c:2348
0x6b2571 cp_parser_postfix_expression
../../gcc/gcc/cp/parser.c:6164
0x6b5116 cp_parser_unary_expression
../../gcc/gcc/cp/parser.c:7170
0x6b5e3f cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:7874
0x6b6331 cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:8112
0x6b86e4 cp_parser_expression
../../gcc/gcc/cp/parser.c:8274
0x6b8f1c cp_parser_expression
../../gcc/gcc/cp/parser.c:8313
0x6b8f1c cp_parser_expression_statement
../../gcc/gcc/cp/parser.c:9622
Please submit a full bug report, [etc.]
Before GCC 4.6.0 the code was wrongly rejected.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/60223] [c++11] ICE with C++11-style default template parameter
2014-02-16 17:07 [Bug c++/60223] New: [c++11] ICE with C++11-style default template parameter reichelt at gcc dot gnu.org
@ 2014-02-16 21:04 ` glisse at gcc dot gnu.org
2014-02-18 12:18 ` mpolacek at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-02-16 21:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60223
Marc Glisse <glisse at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-02-16
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/60223] [c++11] ICE with C++11-style default template parameter
2014-02-16 17:07 [Bug c++/60223] New: [c++11] ICE with C++11-style default template parameter reichelt at gcc dot gnu.org
2014-02-16 21:04 ` [Bug c++/60223] " glisse at gcc dot gnu.org
@ 2014-02-18 12:18 ` mpolacek at gcc dot gnu.org
2014-03-18 16:37 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-02-18 12:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60223
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r180707.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/60223] [c++11] ICE with C++11-style default template parameter
2014-02-16 17:07 [Bug c++/60223] New: [c++11] ICE with C++11-style default template parameter reichelt at gcc dot gnu.org
2014-02-16 21:04 ` [Bug c++/60223] " glisse at gcc dot gnu.org
2014-02-18 12:18 ` mpolacek at gcc dot gnu.org
@ 2014-03-18 16:37 ` paolo.carlini at oracle dot com
2014-03-18 16:42 ` mpolacek at gcc dot gnu.org
2021-12-04 6:30 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-03-18 16:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60223
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Marek, are you sure about r180707 ?!? It's supposed to be only about command
line options names... Please confirm and in case CC Jason.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/60223] [c++11] ICE with C++11-style default template parameter
2014-02-16 17:07 [Bug c++/60223] New: [c++11] ICE with C++11-style default template parameter reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2014-03-18 16:37 ` paolo.carlini at oracle dot com
@ 2014-03-18 16:42 ` mpolacek at gcc dot gnu.org
2021-12-04 6:30 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-03-18 16:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60223
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Ah, no, that's bogus, with -std=c++0x it ICEs even before that revision.
Re-bisecting...
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/60223] [c++11] ICE with C++11-style default template parameter
2014-02-16 17:07 [Bug c++/60223] New: [c++11] ICE with C++11-style default template parameter reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2014-03-18 16:42 ` mpolacek at gcc dot gnu.org
@ 2021-12-04 6:30 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-04 6:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60223
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |9.2
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-12-04 6:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-16 17:07 [Bug c++/60223] New: [c++11] ICE with C++11-style default template parameter reichelt at gcc dot gnu.org
2014-02-16 21:04 ` [Bug c++/60223] " glisse at gcc dot gnu.org
2014-02-18 12:18 ` mpolacek at gcc dot gnu.org
2014-03-18 16:37 ` paolo.carlini at oracle dot com
2014-03-18 16:42 ` mpolacek at gcc dot gnu.org
2021-12-04 6:30 ` pinskia 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).