[EMAIL PROTECTED]:~/bug$ g++ -v -save-temps test.cpp Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux Thread model: posix gcc version 3.3.5 (Debian 1:3.3.5-1) /usr/lib/gcc-lib/i486-linux/3.3.5/cc1plus -E -D__GNUG__=3 -quiet -v -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=5 -D_GNU_SOURCE test.cpp test.ii ignoring nonexistent directory "/usr/i486-linux/include" #include "..." search starts here: #include <...> search starts here: /usr/include/c++/3.3 /usr/include/c++/3.3/i486-linux /usr/include/c++/3.3/backward /usr/local/include /usr/lib/gcc-lib/i486-linux/3.3.5/include /usr/include End of search list. /usr/lib/gcc-lib/i486-linux/3.3.5/cc1plus -fpreprocessed test.ii -quiet -dumpbase test.cpp -auxbase test -version -o test.s GNU C++ version 3.3.5 (Debian 1:3.3.5-1) (i486-linux) compiled by GNU C version 3.3.5 (Debian 1:3.3.5-1). GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64120 test.cpp: In member function `void X::foo()': test.cpp:8: internal compiler error: in decay_conversion, at cp/typeck.c:1619 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. For Debian GNU/Linux specific bug reporting instructions, see <URL:file:///usr/share/doc/gcc-3.3/README.Bugs>. -------- Preprocessed source file: # 1 "test.cpp" # 1 "<built-in>" # 1 "<command line>" # 1 "test.cpp" class X { public: int method(int arg) { return arg;} void foo() { bool b = true; int (X::*pmethod)(int) = b ? X::method : X::method; } }; -------- Description: This code is invalid - the valid code uses ampersands: int (X::*pmethod)(int n) = b ? &X::method : &X::method; The ICE appeared when I decided to use the ?: operator.
-- Summary: ICE in decay_conversion, at cp/typeck.c:1619 (pointer to member function) Product: gcc Version: unknown Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: zkoza at ift dot uni dot wroc dot pl CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18021