public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/47068] New: [C++0x] internal compiler error on decltype(~ expression)
@ 2010-12-27 16:20 spillner at acm dot org
2010-12-27 16:26 ` [Bug c++/47068] " paolo.carlini at oracle dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: spillner at acm dot org @ 2010-12-27 16:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47068
Summary: [C++0x] internal compiler error on decltype(~
expression)
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: spillner@acm.org
The declaration
template <class T> struct broken {
int member;
typedef decltype(~ member) gcc_crashes_here;
};
generates the error message "internal compiler error: in lookup_member, at
cp/search.c:1200, Please submit a full bug report" when compiled with g++ 4.4.3
(with -std=c++0x, naturally.)
Similar code compiles without errors or warnings if any of the following
transformations are applied:
- A literal expression (e.g. "~ 0L") is substituted for "~ member"
- The operators !, &, -, +, or * (when member is changed to a pointer type)
are used instead of ~
- The struct is not templated
- The typedef is declared in a free function (even a templated free
function) rather than a class or struct
- decltype is replaced by typeof and the code is compiled without -std=c++0x
Unfortunately I'm traveling at the moment and can't easily test on other gcc
versions.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/47068] [C++0x] internal compiler error on decltype(~ expression)
2010-12-27 16:20 [Bug c++/47068] New: [C++0x] internal compiler error on decltype(~ expression) spillner at acm dot org
2010-12-27 16:26 ` [Bug c++/47068] " paolo.carlini at oracle dot com
@ 2010-12-27 16:26 ` paolo.carlini at oracle dot com
2010-12-28 15:34 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2010-12-27 16:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47068
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2010-12-27 16:26:04 UTC ---
I can reproduce it with current mainline.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/47068] [C++0x] internal compiler error on decltype(~ expression)
2010-12-27 16:20 [Bug c++/47068] New: [C++0x] internal compiler error on decltype(~ expression) spillner at acm dot org
@ 2010-12-27 16:26 ` paolo.carlini at oracle dot com
2010-12-27 16:26 ` paolo.carlini at oracle dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2010-12-27 16:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47068
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.12.27 16:26:36
CC| |jason at gcc dot gnu.org
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/47068] [C++0x] internal compiler error on decltype(~ expression)
2010-12-27 16:20 [Bug c++/47068] New: [C++0x] internal compiler error on decltype(~ expression) spillner at acm dot org
2010-12-27 16:26 ` [Bug c++/47068] " paolo.carlini at oracle dot com
2010-12-27 16:26 ` paolo.carlini at oracle dot com
@ 2010-12-28 15:34 ` jason at gcc dot gnu.org
2010-12-29 2:18 ` jason at gcc dot gnu.org
2011-01-01 0:15 ` jason at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2010-12-28 15:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47068
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2010-12-28 15:34:44 UTC ---
Looking.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/47068] [C++0x] internal compiler error on decltype(~ expression)
2010-12-27 16:20 [Bug c++/47068] New: [C++0x] internal compiler error on decltype(~ expression) spillner at acm dot org
` (2 preceding siblings ...)
2010-12-28 15:34 ` jason at gcc dot gnu.org
@ 2010-12-29 2:18 ` jason at gcc dot gnu.org
2011-01-01 0:15 ` jason at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2010-12-29 2:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47068
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2010-12-29 02:17:51 UTC ---
Author: jason
Date: Wed Dec 29 02:17:47 2010
New Revision: 168309
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168309
Log:
PR c++/47068
* semantics.c (finish_id_expression): Don't note non-names
as being used in the class.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/decltype24.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/47068] [C++0x] internal compiler error on decltype(~ expression)
2010-12-27 16:20 [Bug c++/47068] New: [C++0x] internal compiler error on decltype(~ expression) spillner at acm dot org
` (3 preceding siblings ...)
2010-12-29 2:18 ` jason at gcc dot gnu.org
@ 2011-01-01 0:15 ` jason at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2011-01-01 0:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47068
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> 2011-01-01 00:15:01 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-01-01 0:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-27 16:20 [Bug c++/47068] New: [C++0x] internal compiler error on decltype(~ expression) spillner at acm dot org
2010-12-27 16:26 ` [Bug c++/47068] " paolo.carlini at oracle dot com
2010-12-27 16:26 ` paolo.carlini at oracle dot com
2010-12-28 15:34 ` jason at gcc dot gnu.org
2010-12-29 2:18 ` jason at gcc dot gnu.org
2011-01-01 0:15 ` 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).