public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66564] New: ICE on explicit instantiation of nested template class
@ 2015-06-17 9:28 nurupo.ga.ga.ga at gmail dot com
2015-08-04 14:37 ` [Bug c++/66564] " paolo.carlini at oracle dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: nurupo.ga.ga.ga at gmail dot com @ 2015-06-17 9:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66564
Bug ID: 66564
Summary: ICE on explicit instantiation of nested template class
Product: gcc
Version: 5.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: nurupo.ga.ga.ga at gmail dot com
Target Milestone: ---
The following code generates an ice:
//Begin Sample Code
template<class T1, class T2>
class Outer{
template<class S1, class S2> class Inner;
};
template<> template<class T1, class T2> class Outer<T1, T2>::Inner<T1,T2>{};
template class Outer<int,int>::Inner<int,int>;
//End Sample Code
error message:
test.cpp:6:62: internal compiler error: in retrieve_specialization, at
cp/pt.c:1059
template<> template<class T1, class T2> class Outer<T1, T2>::Inner<T1,T2>{};
^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
command line:
gcc -v -save-temps test.cpp
output:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=d:/program\ files\
(x86)/dev-cpp/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/5.1.1/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: /home/cauchy/vcs/svn/gcc/branches/gcc-5-branch/configure
--prefix=/home/cauchy/native/gcc-5-win64
--with-sysroot=/home/cauchy/native/gcc-5-win64 --build=x86_64-unknown-linux-gnu
--host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-gcov-tool
--disable-multilib --disable-nls --disable-win32-registry
--enable-checking=release --enable-languages=c,c++,fortran
--enable-fully-dynamic-string --with-arch=core2 --with-tune=generic
Thread model: win32
gcc version 5.1.1 (GCC)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-mtune=generic' '-march=core2'
d:/program files
(x86)/dev-cpp/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/5.1.1/cc1plus.exe
-E -quiet -v -iprefix d:\program files
(x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/5.1.1/ -U_REENTRANT
test.cpp -mtune=generic -march=core2 -fpch-preprocess -o test.ii
ignoring duplicate directory "d:/program files
(x86)/dev-cpp/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/5.1.1/../../../../include/c++/5.1.1"
ignoring duplicate directory "d:/program files
(x86)/dev-cpp/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/5.1.1/../../../../include/c++/5.1.1/x86_64-w64-mingw32"
ignoring duplicate directory "d:/program files
(x86)/dev-cpp/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/5.1.1/../../../../include/c++/5.1.1/backward"
ignoring duplicate directory "d:/program files
(x86)/dev-cpp/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/5.1.1/include"
ignoring nonexistent directory
"/home/cauchy/native/gcc-5-win64/home/cauchy/native/gcc-5-win64/lib/gcc/x86_64-w64-mingw32/5.1.1/../../../../include"
ignoring duplicate directory "d:/program files
(x86)/dev-cpp/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/5.1.1/include-fixed"
ignoring duplicate directory "d:/program files
(x86)/dev-cpp/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/5.1.1/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "/home/cauchy/native/gcc-5-win64/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
d:\program files
(x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/5.1.1/../../../../include/c++/5.1.1
d:\program files
(x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/5.1.1/../../../../include/c++/5.1.1/x86_64-w64-mingw32
d:\program files
(x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/5.1.1/../../../../include/c++/5.1.1/backward
d:\program files
(x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/5.1.1/include
d:\program files
(x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/5.1.1/include-fixed
d:\program files
(x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/5.1.1/../../../../x86_64-w64-mingw32/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-mtune=generic' '-march=core2'
d:/program files
(x86)/dev-cpp/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/5.1.1/cc1plus.exe
-fpreprocessed test.ii -quiet -dumpbase test.cpp -mtune=generic -march=core2
-auxbase test -version -o test.s
GNU C++ (GCC) version 5.1.1 (x86_64-w64-mingw32)
compiled by GNU C version 5.1.1, GMP version 5.1.3, MPFR version
3.1.2-p11, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (GCC) version 5.1.1 (x86_64-w64-mingw32)
compiled by GNU C version 5.1.1, GMP version 5.1.3, MPFR version
3.1.2-p11, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: b5faee4d84f4cec59dcc3ea208cd79d6
test.cpp:6:62: internal compiler error: in retrieve_specialization, at
cp/pt.c:1059
template<> template<class T1, class T2> class Outer<T1, T2>::Inner<T1,T2>{};
^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
test.ii:
# 1 "test.cpp"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "test.cpp"
template<class T1, class T2>
class Outer{
template<class S1, class S2> class Inner;
};
template<> template<class T1, class T2> class Outer<T1, T2>::Inner<T1,T2>{};
template class Outer<int,int>::Inner<int,int>;
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/66564] ICE on explicit instantiation of nested template class
2015-06-17 9:28 [Bug c++/66564] New: ICE on explicit instantiation of nested template class nurupo.ga.ga.ga at gmail dot com
@ 2015-08-04 14:37 ` paolo.carlini at oracle dot com
2021-12-12 5:07 ` pinskia at gcc dot gnu.org
2021-12-12 5:08 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-08-04 14:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66564
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-08-04
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/66564] ICE on explicit instantiation of nested template class
2015-06-17 9:28 [Bug c++/66564] New: ICE on explicit instantiation of nested template class nurupo.ga.ga.ga at gmail dot com
2015-08-04 14:37 ` [Bug c++/66564] " paolo.carlini at oracle dot com
@ 2021-12-12 5:07 ` pinskia at gcc dot gnu.org
2021-12-12 5:08 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-12 5:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66564
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |matthewjbarichello at gmail dot co
| |m
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 103667 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/66564] ICE on explicit instantiation of nested template class
2015-06-17 9:28 [Bug c++/66564] New: ICE on explicit instantiation of nested template class nurupo.ga.ga.ga at gmail dot com
2015-08-04 14:37 ` [Bug c++/66564] " paolo.carlini at oracle dot com
2021-12-12 5:07 ` pinskia at gcc dot gnu.org
@ 2021-12-12 5:08 ` pinskia at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-12 5:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66564
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase:
template<typename Args>
struct A {
template<typename>
struct B {};
};
template<>
template<typename Args>
struct A<Args>::B<Args> {};
int main() {
A<int>::B<int> b;
}
Without the definition of b in main, we accept the invalid code.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-12-12 5:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-17 9:28 [Bug c++/66564] New: ICE on explicit instantiation of nested template class nurupo.ga.ga.ga at gmail dot com
2015-08-04 14:37 ` [Bug c++/66564] " paolo.carlini at oracle dot com
2021-12-12 5:07 ` pinskia at gcc dot gnu.org
2021-12-12 5:08 ` pinskia 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).