public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56014] New: [C++1y] Return type deduction for member functions does not work when -g is enabled
@ 2013-01-17 7:19 jogojapan at gmail dot com
2013-01-17 8:48 ` [Bug c++/56014] [C++1y] ICE using return type deduction for member functions with -g enabled redi at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: jogojapan at gmail dot com @ 2013-01-17 7:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56014
Bug #: 56014
Summary: [C++1y] Return type deduction for member functions
does not work when -g is enabled
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jogojapan@gmail.com
Created attachment 29187
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29187
Preprocessed file
GCC version: Snapshot 4.8-20130113 (built from source)
System: Linux diogenes 3.6.11-1.fc17.x86_64
C++1y implements return type deduction for functions (i.e. without trailing
return type). This does not work when the following two conditions are
satisfied:
- The function is a member function (static or non-static)
- *and* the -g option is used
Example:
#include <iostream>
struct Elem
{
static auto test()
{ return 12; }
};
int main()
{
std::cout << Elem::test() << std::endl;
return 0;
}
When compiling this code using `g++ --std=c++1y -g -o test ./test.cpp`, the
following error is displayed:
./test.cpp:3:8: internal compiler error: in gen_type_die_with_usage, at
dwarf2out.c:19477
struct Elem
^
0x813d06 gen_type_die_with_usage
../../gdc/gcc-4.8-20130106/gcc/dwarf2out.c:19477
0x810c25 gen_decl_die
../../gdc/gcc-4.8-20130106/gcc/dwarf2out.c:19971
0x812afc gen_member_die
../../gdc/gcc-4.8-20130106/gcc/dwarf2out.c:19037
0x812afc gen_struct_or_union_type_die
../../gdc/gcc-4.8-20130106/gcc/dwarf2out.c:19110
0x812afc gen_tagged_type_die
../../gdc/gcc-4.8-20130106/gcc/dwarf2out.c:19300
0x813ced gen_type_die_with_usage
../../gdc/gcc-4.8-20130106/gcc/dwarf2out.c:19447
0x810e6a gen_decl_die
../../gdc/gcc-4.8-20130106/gcc/dwarf2out.c:20010
0x9deed2 rest_of_type_compilation(tree_node*, int)
../../gdc/gcc-4.8-20130106/gcc/passes.c:217
0x5c7c0d finish_struct_1(tree_node*)
../../gdc/gcc-4.8-20130106/gcc/cp/class.c:6390
0x5c90cc finish_struct(tree_node*, tree_node*)
../../gdc/gcc-4.8-20130106/gcc/cp/class.c:6555
0x5f71be cp_parser_class_specifier_1
../../gdc/gcc-4.8-20130106/gcc/cp/parser.c:18245
0x5f71be cp_parser_class_specifier
../../gdc/gcc-4.8-20130106/gcc/cp/parser.c:18453
0x5f71be cp_parser_type_specifier
../../gdc/gcc-4.8-20130106/gcc/cp/parser.c:13568
0x60e2cd cp_parser_decl_specifier_seq
../../gdc/gcc-4.8-20130106/gcc/cp/parser.c:10895
0x611ce9 cp_parser_simple_declaration
../../gdc/gcc-4.8-20130106/gcc/cp/parser.c:10494
0x613c60 cp_parser_block_declaration
../../gdc/gcc-4.8-20130106/gcc/cp/parser.c:10443
0x61c84b cp_parser_declaration
../../gdc/gcc-4.8-20130106/gcc/cp/parser.c:10340
0x61b51d cp_parser_declaration_seq_opt
../../gdc/gcc-4.8-20130106/gcc/cp/parser.c:10226
0x61cdc2 cp_parser_translation_unit
../../gdc/gcc-4.8-20130106/gcc/cp/parser.c:3808
0x61cdc2 c_parse_file()
../../gdc/gcc-4.8-20130106/gcc/cp/parser.c:28175
Please submit a full bug report,
The error also occurs when the function is non-static. It does *not* occur,
however, when '-g' isn't used, or when the function is not a member function.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56014] [C++1y] ICE using return type deduction for member functions with -g enabled
2013-01-17 7:19 [Bug c++/56014] New: [C++1y] Return type deduction for member functions does not work when -g is enabled jogojapan at gmail dot com
@ 2013-01-17 8:48 ` redi at gcc dot gnu.org
2013-06-03 8:48 ` jogojapan at gmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2013-01-17 8:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56014
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-01-17
Summary|[C++1y] Return type |[C++1y] ICE using return
|deduction for member |type deduction for member
|functions does not work |functions with -g enabled
|when -g is enabled |
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56014] [C++1y] ICE using return type deduction for member functions with -g enabled
2013-01-17 7:19 [Bug c++/56014] New: [C++1y] Return type deduction for member functions does not work when -g is enabled jogojapan at gmail dot com
2013-01-17 8:48 ` [Bug c++/56014] [C++1y] ICE using return type deduction for member functions with -g enabled redi at gcc dot gnu.org
@ 2013-06-03 8:48 ` jogojapan at gmail dot com
2013-06-03 8:50 ` jogojapan at gmail dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jogojapan at gmail dot com @ 2013-06-03 8:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56014
--- Comment #1 from Johannes Goller <jogojapan at gmail dot com> ---
I've just confirmed that the problem also exists in GCC 4.9 20130602 snapshot.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56014] [C++1y] ICE using return type deduction for member functions with -g enabled
2013-01-17 7:19 [Bug c++/56014] New: [C++1y] Return type deduction for member functions does not work when -g is enabled jogojapan at gmail dot com
2013-01-17 8:48 ` [Bug c++/56014] [C++1y] ICE using return type deduction for member functions with -g enabled redi at gcc dot gnu.org
2013-06-03 8:48 ` jogojapan at gmail dot com
@ 2013-06-03 8:50 ` jogojapan at gmail dot com
2013-07-26 1:16 ` jogojapan at gmail dot com
2013-08-02 17:03 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: jogojapan at gmail dot com @ 2013-06-03 8:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56014
--- Comment #2 from Johannes Goller <jogojapan at gmail dot com> ---
It also exists in 4.8.1.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56014] [C++1y] ICE using return type deduction for member functions with -g enabled
2013-01-17 7:19 [Bug c++/56014] New: [C++1y] Return type deduction for member functions does not work when -g is enabled jogojapan at gmail dot com
` (2 preceding siblings ...)
2013-06-03 8:50 ` jogojapan at gmail dot com
@ 2013-07-26 1:16 ` jogojapan at gmail dot com
2013-08-02 17:03 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: jogojapan at gmail dot com @ 2013-07-26 1:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56014
Johannes Goller <jogojapan at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|4.8.1 |4.9.0
--- Comment #3 from Johannes Goller <jogojapan at gmail dot com> ---
It also exists in a 4.9.0 snapshot from yesterday (20130725, built from the
master branch).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56014] [C++1y] ICE using return type deduction for member functions with -g enabled
2013-01-17 7:19 [Bug c++/56014] New: [C++1y] Return type deduction for member functions does not work when -g is enabled jogojapan at gmail dot com
` (3 preceding siblings ...)
2013-07-26 1:16 ` jogojapan at gmail dot com
@ 2013-08-02 17:03 ` paolo.carlini at oracle dot com
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-08-02 17:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56014
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Dup.
*** This bug has been marked as a duplicate of bug 53756 ***
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-08-02 17:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-17 7:19 [Bug c++/56014] New: [C++1y] Return type deduction for member functions does not work when -g is enabled jogojapan at gmail dot com
2013-01-17 8:48 ` [Bug c++/56014] [C++1y] ICE using return type deduction for member functions with -g enabled redi at gcc dot gnu.org
2013-06-03 8:48 ` jogojapan at gmail dot com
2013-06-03 8:50 ` jogojapan at gmail dot com
2013-07-26 1:16 ` jogojapan at gmail dot com
2013-08-02 17:03 ` 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).