public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58810] New: [4.7/4.8/4.9 Regression] ICE with invalid function typedef
@ 2013-10-19 22:53 reichelt at gcc dot gnu.org
2013-10-21 8:26 ` [Bug c++/58810] " rguenth at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-10-19 22:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58810
Bug ID: 58810
Summary: [4.7/4.8/4.9 Regression] ICE with invalid function
typedef
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 triggers an ICE since GCC 4.6.0:
==========================
typedef int F() const;
F f;
struct A
{
friend F f;
};
==========================
bug.cc:3:3: error: qualified function types cannot be used to declare free
functions
F f;
^
bug.cc:7:12: error: non-member function 'int f()' cannot have cv-qualifier
friend F f;
^
bug.cc:7:12: internal compiler error: in merge_types, at cp/typeck.c:835
0x6801d2 merge_types(tree_node*, tree_node*)
../../gcc/gcc/cp/typeck.c:835
0x57956f duplicate_decls(tree_node*, tree_node*, bool)
../../gcc/gcc/cp/decl.c:1888
0x71aab0 pushdecl_maybe_friend_1
../../gcc/gcc/cp/name-lookup.c:788
0x71aab0 pushdecl_maybe_friend(tree_node*, bool)
../../gcc/gcc/cp/name-lookup.c:1264
0x71d8b7 pushdecl_with_scope_1
../../gcc/gcc/cp/name-lookup.c:2251
0x71d97d pushdecl_with_scope(tree_node*, cp_binding_level*, bool)
../../gcc/gcc/cp/name-lookup.c:2265
0x71da2f pushdecl_namespace_level(tree_node*, bool)
../../gcc/gcc/cp/name-lookup.c:3826
0x69ddd7 do_friend(tree_node*, tree_node*, tree_node*, tree_node*,
overload_flags, bool)
../../gcc/gcc/cp/friend.c:574
0x58821d grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
../../gcc/gcc/cp/decl.c:10626
0x620bdc grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*,
bool, tree_node*, tree_node*)
../../gcc/gcc/cp/decl2.c:832
0x664812 cp_parser_member_declaration
../../gcc/gcc/cp/parser.c:20186
0x644247 cp_parser_member_specification_opt
../../gcc/gcc/cp/parser.c:19733
0x644247 cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:18977
0x644247 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:19204
0x644247 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:14151
0x65d19f cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:11396
0x663cd9 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:10986
0x6477e0 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10935
0x66e9fe cp_parser_declaration
../../gcc/gcc/cp/parser.c:10832
0x66d71a cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:10718
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58810] [4.7/4.8/4.9 Regression] ICE with invalid function typedef
2013-10-19 22:53 [Bug c++/58810] New: [4.7/4.8/4.9 Regression] ICE with invalid function typedef reichelt at gcc dot gnu.org
@ 2013-10-21 8:26 ` rguenth at gcc dot gnu.org
2013-10-21 17:38 ` paolo.carlini at oracle dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-10-21 8:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58810
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
Target Milestone|--- |4.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58810] [4.7/4.8/4.9 Regression] ICE with invalid function typedef
2013-10-19 22:53 [Bug c++/58810] New: [4.7/4.8/4.9 Regression] ICE with invalid function typedef reichelt at gcc dot gnu.org
2013-10-21 8:26 ` [Bug c++/58810] " rguenth at gcc dot gnu.org
@ 2013-10-21 17:38 ` paolo.carlini at oracle dot com
2013-10-23 0:17 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-21 17:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58810
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2013-10-21
Assignee|unassigned at gcc dot gnu.org |paolo.carlini at oracle dot com
Ever confirmed|0 |1
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58810] [4.7/4.8/4.9 Regression] ICE with invalid function typedef
2013-10-19 22:53 [Bug c++/58810] New: [4.7/4.8/4.9 Regression] ICE with invalid function typedef reichelt at gcc dot gnu.org
2013-10-21 8:26 ` [Bug c++/58810] " rguenth at gcc dot gnu.org
2013-10-21 17:38 ` paolo.carlini at oracle dot com
@ 2013-10-23 0:17 ` paolo.carlini at oracle dot com
2013-11-25 16:10 ` paolo at gcc dot gnu.org
2013-11-25 16:12 ` [Bug c++/58810] [4.7/4.8 " paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-23 0:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58810
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Pending patches (two options) here:
http://gcc.gnu.org/ml/gcc-patches/2013-10/msg01737.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58810] [4.7/4.8/4.9 Regression] ICE with invalid function typedef
2013-10-19 22:53 [Bug c++/58810] New: [4.7/4.8/4.9 Regression] ICE with invalid function typedef reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2013-10-23 0:17 ` paolo.carlini at oracle dot com
@ 2013-11-25 16:10 ` paolo at gcc dot gnu.org
2013-11-25 16:12 ` [Bug c++/58810] [4.7/4.8 " paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo at gcc dot gnu.org @ 2013-11-25 16:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58810
--- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Mon Nov 25 16:10:29 2013
New Revision: 205356
URL: http://gcc.gnu.org/viewcvs?rev=205356&root=gcc&view=rev
Log:
/cp
2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58810
* decl.c (grokdeclarator): Don't handle qualified free functions here,
leave the diagnostic to grokfndecl.
/testsuite
2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58810
* g++.dg/other/cv_func3.C: New.
* g++.dg/other/cv_func.C: Adjust.
* g++.dg/parse/fn-typedef2.C: Likewise.
Added:
trunk/gcc/testsuite/g++.dg/other/cv_func3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/other/cv_func.C
trunk/gcc/testsuite/g++.dg/parse/fn-typedef2.C
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58810] [4.7/4.8 Regression] ICE with invalid function typedef
2013-10-19 22:53 [Bug c++/58810] New: [4.7/4.8/4.9 Regression] ICE with invalid function typedef reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2013-11-25 16:10 ` paolo at gcc dot gnu.org
@ 2013-11-25 16:12 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-11-25 16:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58810
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|4.7.4 |4.9.0
Summary|[4.7/4.8/4.9 Regression] |[4.7/4.8 Regression] ICE
|ICE with invalid function |with invalid function
|typedef |typedef
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed for 4.9.0.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-11-25 16:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-19 22:53 [Bug c++/58810] New: [4.7/4.8/4.9 Regression] ICE with invalid function typedef reichelt at gcc dot gnu.org
2013-10-21 8:26 ` [Bug c++/58810] " rguenth at gcc dot gnu.org
2013-10-21 17:38 ` paolo.carlini at oracle dot com
2013-10-23 0:17 ` paolo.carlini at oracle dot com
2013-11-25 16:10 ` paolo at gcc dot gnu.org
2013-11-25 16:12 ` [Bug c++/58810] [4.7/4.8 " 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).