public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51826] New: internal compiler error: in convert_nontype_argument, at cp/pt.c:5408
@ 2012-01-11 19:03 just.serejko at gmail dot com
2012-01-12 9:17 ` [Bug c++/51826] [4.6 Regression] " rguenth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: just.serejko at gmail dot com @ 2012-01-11 19:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51826
Bug #: 51826
Summary: internal compiler error: in convert_nontype_argument,
at cp/pt.c:5408
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: just.serejko@gmail.com
The following code
template<int n>
struct bug {
static const int value = 0;
};
int main(int argc, char **argv) {
int x = bug<(int)"123">::value;
return 0;
}
gives me this on 4.6.1 (MinGW):
template_mess.cpp: In function 'int main(int, char**)':
template_mess.cpp:8:24: internal compiler error: in convert_nontype_argument,
at cp/pt.c:5408
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
or more verbosely:
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.6.1/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.6.1/configure
--enable-languages=c,c++,fortran,objc,obj-c++ --disable-sjlj-exceptions
--with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry
--enable-libstdcxx-debug --enable-version-specific-runtime-libs --build=mingw32
--prefix=/mingw
Thread model: win32
gcc version 4.6.1 (GCC)
COLLECT_GCC_OPTIONS='-o' 'template_mess.exe' '-v' '-save-temps'
'-shared-libgcc' '-mtune=i386' '-march=i386'
c:/mingw/bin/../libexec/gcc/mingw32/4.6.1/cc1plus.exe -E -quiet -v -iprefix
c:\mingw\bin\../lib/gcc/mingw32/4.6.1/ template_mess.cpp -mtune=i386
-march=i386 -fpch-preprocess -o template_mess.ii
ignoring nonexistent directory
"c:\mingw\bin\../lib/gcc/mingw32/4.6.1/../../../../mingw32/include"
ignoring duplicate directory
"c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.6.1/include/c++"
ignoring duplicate directory
"c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.6.1/include/c++/mingw32"
ignoring duplicate directory
"c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.6.1/include/c++/backward"
ignoring duplicate directory
"c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.6.1/include"
ignoring nonexistent directory "/mingw/include"
ignoring duplicate directory "c:/mingw/lib/gcc/../../include"
ignoring duplicate directory
"c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.6.1/include-fixed"
ignoring nonexistent directory
"c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.6.1/../../../../mingw32/include"
ignoring nonexistent directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
c:\mingw\bin\../lib/gcc/mingw32/4.6.1/include/c++
c:\mingw\bin\../lib/gcc/mingw32/4.6.1/include/c++/mingw32
c:\mingw\bin\../lib/gcc/mingw32/4.6.1/include/c++/backward
c:\mingw\bin\../lib/gcc/mingw32/4.6.1/include
c:\mingw\bin\../lib/gcc/mingw32/4.6.1/../../../../include
c:\mingw\bin\../lib/gcc/mingw32/4.6.1/include-fixed
End of search list.
COLLECT_GCC_OPTIONS='-o' 'template_mess.exe' '-v' '-save-temps'
'-shared-libgcc' '-mtune=i386' '-march=i386'
c:/mingw/bin/../libexec/gcc/mingw32/4.6.1/cc1plus.exe -fpreprocessed
template_mess.ii -quiet -dumpbase template_mess.cpp -mtune=i386 -march=i386
-auxbase template_mess -version -o template_mess.s
GNU C++ (GCC) version 4.6.1 (mingw32)
compiled by GNU C version 4.6.1, GMP version 5.0.1, MPFR version 2.4.1, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (GCC) version 4.6.1 (mingw32)
compiled by GNU C version 4.6.1, GMP version 5.0.1, MPFR version 2.4.1, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 8e56a7b4b7f3db333ff95dd4b2d788a4
template_mess.cpp: In function 'int main(int, char**)':
template_mess.cpp:8:24: internal compiler error: in convert_nontype_argument,
at cp/pt.c:5408
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/51826] [4.6 Regression] internal compiler error: in convert_nontype_argument, at cp/pt.c:5408
2012-01-11 19:03 [Bug c++/51826] New: internal compiler error: in convert_nontype_argument, at cp/pt.c:5408 just.serejko at gmail dot com
@ 2012-01-12 9:17 ` rguenth at gcc dot gnu.org
2012-03-01 14:58 ` jakub at gcc dot gnu.org
2012-08-25 18:37 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-12 9:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51826
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Known to work| |4.5.3, 4.7.0
Keywords| |ice-on-invalid-code
Last reconfirmed| |2012-01-12
Ever Confirmed|0 |1
Summary|internal compiler error: in |[4.6 Regression] internal
|convert_nontype_argument, |compiler error: in
|at cp/pt.c:5408 |convert_nontype_argument,
| |at cp/pt.c:5408
Target Milestone|--- |4.6.3
Known to fail| |4.6.2
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-12 09:17:30 UTC ---
Confirmed.
> g++ -S t.C
t.C: In function 'int main(int, char**)':
t.C:8:26: error: cast from 'const char*' to 'int' loses precision
[-fpermissive]
t.C:8:31: error: '(int)((long int)"123")' is not a constant expression
t.C:8:31: note: in template argument for type 'int'
> g++ -S t.C -m32
t.C: In function 'int main(int, char**)':
t.C:8:31: internal compiler error: in convert_nontype_argument, at cp/pt.c:5408
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
On trunk:
> g++ -S t.C -m32 -B /abuild/rguenther/trunk-g/gcc
t.C: In function 'int main(int, char**)':
t.C:8:31: error: conversion from pointer type 'const char (*)[4]' to arithmetic
type 'int' in a constant-expression
t.C:8:31: note: in template argument for type 'int'
so it's invalid source, fixed on trunk. 4.5 says
g++ -S t.C -m32
t.C: In function 'int main(int, char**)':
t.C:8:31: error: '(int)"123"' is not a valid template argument for type 'int'
because it is a non-constant expression
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/51826] [4.6 Regression] internal compiler error: in convert_nontype_argument, at cp/pt.c:5408
2012-01-11 19:03 [Bug c++/51826] New: internal compiler error: in convert_nontype_argument, at cp/pt.c:5408 just.serejko at gmail dot com
2012-01-12 9:17 ` [Bug c++/51826] [4.6 Regression] " rguenth at gcc dot gnu.org
@ 2012-03-01 14:58 ` jakub at gcc dot gnu.org
2012-08-25 18:37 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-01 14:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51826
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.6.3 |4.6.4
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-01 14:38:33 UTC ---
GCC 4.6.3 is being released.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/51826] [4.6 Regression] internal compiler error: in convert_nontype_argument, at cp/pt.c:5408
2012-01-11 19:03 [Bug c++/51826] New: internal compiler error: in convert_nontype_argument, at cp/pt.c:5408 just.serejko at gmail dot com
2012-01-12 9:17 ` [Bug c++/51826] [4.6 Regression] " rguenth at gcc dot gnu.org
2012-03-01 14:58 ` jakub at gcc dot gnu.org
@ 2012-08-25 18:37 ` paolo.carlini at oracle dot com
2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-08-25 18:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51826
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-08-25 18:37:08 UTC ---
At this point WONTFIX in 4_6-branch.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-08-25 18:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-11 19:03 [Bug c++/51826] New: internal compiler error: in convert_nontype_argument, at cp/pt.c:5408 just.serejko at gmail dot com
2012-01-12 9:17 ` [Bug c++/51826] [4.6 Regression] " rguenth at gcc dot gnu.org
2012-03-01 14:58 ` jakub at gcc dot gnu.org
2012-08-25 18:37 ` 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).