public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54264] New: internal compiler error on sample program from the C++ standard
@ 2012-08-14 21:37 meng at g dot clemson.edu
2012-08-14 21:44 ` [Bug c++/54264] " meng at g dot clemson.edu
2012-08-15 9:00 ` rguenth at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: meng at g dot clemson.edu @ 2012-08-14 21:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54264
Bug #: 54264
Summary: internal compiler error on sample program from the C++
standard
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: meng@g.clemson.edu
g++-4.7.0 gave me "Internal compiler error" for the program below, which is
slightly adapted from the C++11 standard 7.1.6.2/5 sample program.
template <typename> struct A { ~A () = delete; };
template <typename T> auto h () -> A<T>;
template <typename T> auto i (T) -> T;
template <typename T> auto f (T) -> decltype(i(h<T>()));
int main ()
{
f(0);
return 0;
}
The standard requires an error for the declaration of f because A::~A is
implicitly used and it is deleted. g++-4.7.0 captures the error but then
stopped working.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/54264] internal compiler error on sample program from the C++ standard
2012-08-14 21:37 [Bug c++/54264] New: internal compiler error on sample program from the C++ standard meng at g dot clemson.edu
@ 2012-08-14 21:44 ` meng at g dot clemson.edu
2012-08-15 9:00 ` rguenth at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: meng at g dot clemson.edu @ 2012-08-14 21:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54264
--- Comment #1 from meng at g dot clemson.edu 2012-08-14 21:44:31 UTC ---
here is my command line:
~/gcc/4.7.0/bin/c++ -std=c++11 -Wall -O3 t1.cc
and its output:
t1.cc: In substitution of ‘template<class T> decltype (i(h<T>())) f(T) [with T
= int]’:
t1.cc:8:5: required from here
t1.cc:4:28: error: use of deleted function ‘A< <template-parameter-1-1> >::~A()
[with <template-parameter-1-1> = int]’
t1.cc:1:32: error: declared here
t1.cc:4:28: error: use of deleted function ‘A< <template-parameter-1-1> >::~A()
[with <template-parameter-1-1> = int]’
t1.cc:1:32: error: declared here
t1.cc:4:28: error: use of deleted function ‘A< <template-parameter-1-1> >::~A()
[with <template-parameter-1-1> = int]’
t1.cc:1:32: error: declared here
t1.cc:4:28: error: use of deleted function ‘A< <template-parameter-1-1> >::~A()
[with <template-parameter-1-1> = int]’
t1.cc:1:32: error: declared here
t1.cc: In function ‘int main()’:
t1.cc:8:5: error: use of deleted function ‘A< <template-parameter-1-1> >::~A()
[with <template-parameter-1-1> = int]’
t1.cc:1:32: error: declared here
‘
Internal compiler error: Error reporting routines re-entered.
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
here is my compiler version info:
~/gcc/4.7.0/bin/c++ -v
Reading specs from /home/meng/gcc/4.7.0/lib/gcc/i686-pc-linux-gnu/4.7.0/specs
COLLECT_GCC=/home/meng/gcc/4.7.0/bin/c++
COLLECT_LTO_WRAPPER=/home/meng/gcc/4.7.0/libexec/gcc/i686-pc-linux-gnu/4.7.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ./configure --prefix=/home/meng/gcc/4.7.0/
--enable-languages=c,c++
Thread model: posix
gcc version 4.7.0 (GCC)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/54264] internal compiler error on sample program from the C++ standard
2012-08-14 21:37 [Bug c++/54264] New: internal compiler error on sample program from the C++ standard meng at g dot clemson.edu
2012-08-14 21:44 ` [Bug c++/54264] " meng at g dot clemson.edu
@ 2012-08-15 9:00 ` rguenth at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-08-15 9:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54264
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |error-recovery,
| |ice-on-invalid-code
Status|UNCONFIRMED |RESOLVED
Known to work| |4.8.0
Resolution| |FIXED
Known to fail| |4.5.4, 4.6.4, 4.7.1
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-08-15 09:00:06 UTC ---
Confirmed. Works on trunk, not a regression -> FIXED.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-08-15 9:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-14 21:37 [Bug c++/54264] New: internal compiler error on sample program from the C++ standard meng at g dot clemson.edu
2012-08-14 21:44 ` [Bug c++/54264] " meng at g dot clemson.edu
2012-08-15 9:00 ` rguenth 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).