[Bug c++/56998] New: [4.8.0] ICE in value_dependent_expression_p, at cp/pt.c:19598
raphael.kubo.da.costa at intel dot com
gcc-bugzilla@gcc.gnu.org
Thu Apr 18 15:06:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56998
Bug #: 56998
Summary: [4.8.0] ICE in value_dependent_expression_p, at
cp/pt.c:19598
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: raphael.kubo.da.costa@intel.com
Building the following program below crashes g++ 4.8.0 here.
--- ice.cc ---
class Secret;
char IsNullLiteralHelper(Secret* p);
char (&IsNullLiteralHelper(...))[2];
struct C
{
int val() { return 42; }
};
template <typename T>
unsigned f()
{
return sizeof(IsNullLiteralHelper(C().val()));
}
--- ice.ii ---
# 1 "ice.cc"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "ice.cc"
class Secret;
char IsNullLiteralHelper(Secret* p);
char (&IsNullLiteralHelper(...))[2];
struct C
{
int val() { return 42; }
};
template <typename T>
unsigned f()
{
return sizeof(IsNullLiteralHelper(C().val()));
}
--- Compiler output ---
Using built-in specs.
COLLECT_GCC=/usr/bin/g++
Target: x86_64-unknown-linux-gnu
Configured with: /build/src/gcc-4.8-20130411/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--enable-gnu-unique-object --enable-linker-build-id --enable-cloog-backend=isl
--disable-cloog-version-check --enable-lto --enable-gold --enable-ld=default
--enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu
--disable-install-libiberty --disable-multilib --disable-libssp
--disable-werror --enable-checking=release
Thread model: posix
gcc version 4.8.0 20130411 (prerelease) (GCC)
COLLECT_GCC_OPTIONS='-v' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus -quiet -v -D_GNU_SOURCE
ice.cc -quiet -dumpbase ice.cc -mtune=generic -march=x86-64 -auxbase ice
-version -o /tmp/cchdGFwc.s
GNU C++ (GCC) version 4.8.0 20130411 (prerelease) (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.8.0 20130411 (prerelease), GMP version
5.1.1, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/x86_64-unknown-linux-gnu
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/backward
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include
/usr/local/include
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include-fixed
/usr/include
End of search list.
GNU C++ (GCC) version 4.8.0 20130411 (prerelease) (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.8.0 20130411 (prerelease), GMP version
5.1.1, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 6f2c8a0d923b5a4be7dedefadd250ed4
ice.cc: In function ‘unsigned int f()’:
ice.cc:13:48: internal compiler error: in value_dependent_expression_p, at
cp/pt.c:19598
return sizeof(IsNullLiteralHelper(C().val()));
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
More information about the Gcc-bugs
mailing list