public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48522] New: decltype((object)) with templated classes crashes g++ 4.5.1.
@ 2011-04-08 21:33 david at rgmadvisors dot com
2011-04-08 22:27 ` [Bug c++/48522] " redi at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: david at rgmadvisors dot com @ 2011-04-08 21:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48522
Summary: decltype((object)) with templated classes crashes g++
4.5.1.
Product: gcc
Version: 4.5.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: david@rgmadvisors.com
Created attachment 23933
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23933
Preprocessed broken_decltype.cpp
Hello All,
The following innocent-looking code crashes the compiler:
template <typename T>
struct Handle
{
Handle(T& t);
};
template<class T>
struct Class {
struct Struct {} data;
void f();
void g();
};
template<class T>
void Class<T>::f() {
Handle< decltype((data)) > handle(data);
}
template<class T>
void Class<T>::g() {
Handle< decltype((data)) > handle(data);
}
The command line and compiler output were:
g++ -std=g++0x broken_decltype.cpp (see attachment for detailed flags)
broken_decltype.cpp: In member function ‘void Class<T>::g()’:
broken_decltype.cpp:21:30: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate
This fails on multiple distributions including Linux 2.6.35.6-45.fc14.x86_64,
GNU C++ (GCC) version 4.5.1 20100924 (Red Hat 4.5.1-4) (x86_64-redhat-linux)
compiled by GNU C version 4.5.1 20100924 (Red Hat 4.5.1-4), GMP version 4.3.1,
MPFR version 2.4.2, MPC version 0.8.1
Cheers!
David.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/48522] decltype((object)) with templated classes crashes g++ 4.5.1.
2011-04-08 21:33 [Bug c++/48522] New: decltype((object)) with templated classes crashes g++ 4.5.1 david at rgmadvisors dot com
@ 2011-04-08 22:27 ` redi at gcc dot gnu.org
2011-05-09 23:26 ` [Bug c++/48522] [C++0x] " paolo.carlini at oracle dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2011-04-08 22:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48522
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Known to work| |4.6.0
Severity|major |normal
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-04-08 22:27:28 UTC ---
seems to be fixed in 4.6
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/48522] [C++0x] decltype((object)) with templated classes crashes g++ 4.5.1.
2011-04-08 21:33 [Bug c++/48522] New: decltype((object)) with templated classes crashes g++ 4.5.1 david at rgmadvisors dot com
2011-04-08 22:27 ` [Bug c++/48522] " redi at gcc dot gnu.org
@ 2011-05-09 23:26 ` paolo.carlini at oracle dot com
2011-05-09 23:31 ` paolo at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-05-09 23:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48522
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011.05.09 23:22:32
Known to work| |4.7.0
AssignedTo|unassigned at gcc dot |paolo.carlini at oracle dot
|gnu.org |com
Ever Confirmed|0 |1
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-05-09 23:22:32 UTC ---
Indeed. I'm going to add the testcase to mainline and 4_6-branch and close the
PR.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/48522] [C++0x] decltype((object)) with templated classes crashes g++ 4.5.1.
2011-04-08 21:33 [Bug c++/48522] New: decltype((object)) with templated classes crashes g++ 4.5.1 david at rgmadvisors dot com
2011-04-08 22:27 ` [Bug c++/48522] " redi at gcc dot gnu.org
2011-05-09 23:26 ` [Bug c++/48522] [C++0x] " paolo.carlini at oracle dot com
@ 2011-05-09 23:31 ` paolo at gcc dot gnu.org
2011-05-09 23:40 ` paolo.carlini at oracle dot com
2011-05-09 23:46 ` paolo at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: paolo at gcc dot gnu.org @ 2011-05-09 23:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48522
--- Comment #4 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-05-09 23:24:23 UTC ---
Author: paolo
Date: Mon May 9 23:24:21 2011
New Revision: 173599
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173599
Log:
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48522
* g++.dg/cpp0x/pr48522.C: New.
Added:
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/pr48522.C
Modified:
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/48522] [C++0x] decltype((object)) with templated classes crashes g++ 4.5.1.
2011-04-08 21:33 [Bug c++/48522] New: decltype((object)) with templated classes crashes g++ 4.5.1 david at rgmadvisors dot com
` (2 preceding siblings ...)
2011-05-09 23:31 ` paolo at gcc dot gnu.org
@ 2011-05-09 23:40 ` paolo.carlini at oracle dot com
2011-05-09 23:46 ` paolo at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-05-09 23:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48522
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.6.0
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-05-09 23:27:23 UTC ---
Done.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/48522] [C++0x] decltype((object)) with templated classes crashes g++ 4.5.1.
2011-04-08 21:33 [Bug c++/48522] New: decltype((object)) with templated classes crashes g++ 4.5.1 david at rgmadvisors dot com
` (3 preceding siblings ...)
2011-05-09 23:40 ` paolo.carlini at oracle dot com
@ 2011-05-09 23:46 ` paolo at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: paolo at gcc dot gnu.org @ 2011-05-09 23:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48522
--- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-05-09 23:24:04 UTC ---
Author: paolo
Date: Mon May 9 23:24:01 2011
New Revision: 173598
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173598
Log:
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48522
* g++.dg/cpp0x/pr48522.C: New.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/pr48522.C
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-05-09 23:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-08 21:33 [Bug c++/48522] New: decltype((object)) with templated classes crashes g++ 4.5.1 david at rgmadvisors dot com
2011-04-08 22:27 ` [Bug c++/48522] " redi at gcc dot gnu.org
2011-05-09 23:26 ` [Bug c++/48522] [C++0x] " paolo.carlini at oracle dot com
2011-05-09 23:31 ` paolo at gcc dot gnu.org
2011-05-09 23:40 ` paolo.carlini at oracle dot com
2011-05-09 23:46 ` paolo 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).