public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60054] New: [c++1y] ICE with auto* cast
@ 2014-02-04 7:29 reichelt at gcc dot gnu.org
2014-03-18 20:30 ` [Bug c++/60054] " reichelt 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-04 7:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60054
Bug ID: 60054
Summary: [c++1y] ICE with auto* cast
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: reichelt at gcc dot gnu.org
The following invalid code snippet (compiled with "-std=c++1y") triggers an
ICE on trunk:
==================================
template<typename T> T foo(T);
void bar()
{
foo((auto*)0);
}
==================================
cc1plus: internal compiler error: Segmentation fault
0xba9c8f crash_signal
../../gcc/gcc/toplev.c:337
0x8812b4 tree_check
../../gcc/gcc/tree.h:2918
0x8812b4 decl_assembler_name_hash
../../gcc/gcc/symtab.c:98
0x88171f insert_to_assembler_name_hash
../../gcc/gcc/symtab.c:209
0x881871 symtab_initialize_asm_name_hash
../../gcc/gcc/symtab.c:432
0x88ff22 analyze_functions
../../gcc/gcc/cgraphunit.c:1124
0x891425 finalize_compilation_unit()
../../gcc/gcc/cgraphunit.c:2320
0x68c4ae cp_write_global_declarations()
../../gcc/gcc/cp/decl2.c:4449
Please submit a full bug report, [etc.]
With a slightly modified example I get a different stack trace:
===========================================
template<typename T> decltype(T{}) foo(T);
void bar()
{
foo((auto*)0);
}
===========================================
bug.cc: In function 'void bar()':
bug.cc:5:15: internal compiler error: in cxx_incomplete_type_diagnostic, at
cp/typeck2.c:553
foo((auto*)0);
^
0x651b3f cxx_incomplete_type_diagnostic(tree_node const*, tree_node const*,
diagnostic_t)
../../gcc/gcc/cp/typeck2.c:553
0x6de719 complete_type_or_maybe_complain(tree_node*, tree_node*, int)
../../gcc/gcc/cp/typeck.c:153
0x6de7a9 require_complete_type_sfinae
../../gcc/gcc/cp/typeck.c:90
0x5a6389 build_cxx_call(tree_node*, int, tree_node**, int)
../../gcc/gcc/cp/call.c:7301
0x5b8a1d build_over_call
../../gcc/gcc/cp/call.c:7225
0x5ba3a1 build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
../../gcc/gcc/cp/call.c:3967
0x730ec4 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
../../gcc/gcc/cp/semantics.c:2348
0x6b4dc1 cp_parser_postfix_expression
../../gcc/gcc/cp/parser.c:6164
0x6b7966 cp_parser_unary_expression
../../gcc/gcc/cp/parser.c:7170
0x6b868f cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:7874
0x6b8b81 cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:8112
0x6baf64 cp_parser_expression
../../gcc/gcc/cp/parser.c:8274
0x6bb79c cp_parser_expression
../../gcc/gcc/cp/parser.c:8313
0x6bb79c cp_parser_expression_statement
../../gcc/gcc/cp/parser.c:9622
0x6b0c38 cp_parser_statement
../../gcc/gcc/cp/parser.c:9473
0x6b1a09 cp_parser_statement_seq_opt
../../gcc/gcc/cp/parser.c:9745
0x6b1b76 cp_parser_compound_statement
../../gcc/gcc/cp/parser.c:9699
0x6c5d5b cp_parser_function_body
../../gcc/gcc/cp/parser.c:18641
0x6c5d5b cp_parser_ctor_initializer_opt_and_function_body
../../gcc/gcc/cp/parser.c:18677
0x6ca0a2 cp_parser_function_definition_after_declarator
../../gcc/gcc/cp/parser.c:22792
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/60054] [c++1y] ICE with auto* cast
2014-02-04 7:29 [Bug c++/60054] New: [c++1y] ICE with auto* cast reichelt at gcc dot gnu.org
@ 2014-03-18 20:30 ` reichelt at gcc dot gnu.org
2014-03-19 7:26 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-03-18 20:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60054
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #1 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
The testcases don't fail anymore since 2014-03-08.
Jason, I suspect that this is due to your changes on the day before.
Do you want to add these testcases to the testsuite?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/60054] [c++1y] ICE with auto* cast
2014-02-04 7:29 [Bug c++/60054] New: [c++1y] ICE with auto* cast reichelt at gcc dot gnu.org
2014-03-18 20:30 ` [Bug c++/60054] " reichelt at gcc dot gnu.org
@ 2014-03-19 7:26 ` jakub at gcc dot gnu.org
2014-05-12 9:03 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-19 7:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60054
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Both testcases fixed by r208415.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/60054] [c++1y] ICE with auto* cast
2014-02-04 7:29 [Bug c++/60054] New: [c++1y] ICE with auto* cast reichelt at gcc dot gnu.org
2014-03-18 20:30 ` [Bug c++/60054] " reichelt at gcc dot gnu.org
2014-03-19 7:26 ` jakub at gcc dot gnu.org
@ 2014-05-12 9:03 ` paolo.carlini at oracle dot com
2014-05-12 9:18 ` paolo at gcc dot gnu.org
2014-05-12 9:19 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-05-12 9:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60054
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.9.0
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
I'm adding a testcase and closing the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/60054] [c++1y] ICE with auto* cast
2014-02-04 7:29 [Bug c++/60054] New: [c++1y] ICE with auto* cast reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2014-05-12 9:03 ` paolo.carlini at oracle dot com
@ 2014-05-12 9:18 ` paolo at gcc dot gnu.org
2014-05-12 9:19 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo at gcc dot gnu.org @ 2014-05-12 9:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60054
--- Comment #4 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Mon May 12 09:17:46 2014
New Revision: 210323
URL: http://gcc.gnu.org/viewcvs?rev=210323&root=gcc&view=rev
Log:
2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60054
* g++.dg/cpp1y/pr60054.C: New.
Added:
trunk/gcc/testsuite/g++.dg/cpp1y/pr60054.C
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/60054] [c++1y] ICE with auto* cast
2014-02-04 7:29 [Bug c++/60054] New: [c++1y] ICE with auto* cast reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2014-05-12 9:18 ` paolo at gcc dot gnu.org
@ 2014-05-12 9:19 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-05-12 9:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60054
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Done.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-05-12 9:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-04 7:29 [Bug c++/60054] New: [c++1y] ICE with auto* cast reichelt at gcc dot gnu.org
2014-03-18 20:30 ` [Bug c++/60054] " reichelt at gcc dot gnu.org
2014-03-19 7:26 ` jakub at gcc dot gnu.org
2014-05-12 9:03 ` paolo.carlini at oracle dot com
2014-05-12 9:18 ` paolo at gcc dot gnu.org
2014-05-12 9:19 ` paolo.carlini at oracle dot com
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).