[Bug c++/33990] bug in lookup of member template conversion operator for pointer to member functions
--- Comment #3 from ylalym at gmail dot com 2009-10-04 15:33 --- (In reply to comment #0) There is a makeshift. File a.cpp #include const class nullptr_t { public: template operator T*() const { return 0; } template operator T C::*() const { return 0; } // void (C::*pmf)() = nullptr;// Ok // if (nullptr == pmf) {} // Ok template bool operator == (C (T::*p)()) const { return p == 0; } private: void operator&() const; // const int n = 0; // if (nullptr == n) {} // Error bool operator == (long) const; } nullptr = {}; struct C { void func(); }; int main(void) { void (C::*pmf)() = nullptr; if (nullptr == pmf) {printf("Ok\n");} // If there are sentences - send // if (pmf == nullptr) {printf("Ok\n");} // Error } > g++ a.cpp > ./a.out Ok > -- ylalym at gmail dot com changed: What|Removed |Added CC| |ylalym at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33990
[Bug c++/51722] New: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722 Bug #: 51722 Summary: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: yla...@gmail.com cd src/ && /usr/bin/qmake /data/yura/eclipse1/workspace/gxbook-src-0.0.1/src/src.pro CONFIG+=debug QMAKE_CC=gcc-4.7 QMAKE_CXX=g++-4.7 QMAKE_LINK=g++-4.7 QMAKE_CFLAGS_DEBUG=-g3\ -gdwarf-4\ -fvar-tracking-assignments QMAKE_CXXFLAGS_DEBUG=-g3\ -gdwarf-4\ -fvar-tracking-assignments -o Makefile cd src/ && /usr/bin/gmake -f Makefile gmake[1]: Entering directory `/data/yura/eclipse1/workspace/gxbook-src-0.0.1/build/debug/src' g++-4.7 -m64 -pipe -std=c++0x -g3 -gdwarf-4 -fvar-tracking-assignments -D_REENTRANT -Wall -W -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I../../../src -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I../../../src -I. -x c++-header -c ../../../src/headers.h -o gxbook.gch/c++ g++-4.7 -c -include gxbook -m64 -pipe -std=c++0x -g3 -gdwarf-4 -fvar-tracking-assignments -D_REENTRANT -Wall -W -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I../../../src -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I../../../src -I. -o main.o ../../../src/main.cpp *** glibc detected *** /usr/local/lib/gcc/x86_64-suse-linux/4.7.0/cc1plus: free(): invalid pointer: 0x0014e420 *** === Backtrace: = /lib64/libc.so.6(+0x74c06)[0x7f1af7d75c06] /usr/local/lib/gcc/x86_64-suse-linux/4.7.0/cc1plus[0x5effd4] /usr/local/lib/gcc/x86_64-suse-linux/4.7.0/cc1plus[0x79a977] /lib64/libc.so.6(__libc_start_main+0xed)[0x7f1af7d2223d] /usr/local/lib/gcc/x86_64-suse-linux/4.7.0/cc1plus[0x41a051] === Memory map: 0040-00fd8000 r-xp 08:02 103794313 /usr/local/lib/gcc/x86_64-suse-linux/4.7.0/cc1plus 011d7000-011d8000 r--p 00bd7000 08:02 103794313 /usr/local/lib/gcc/x86_64-suse-linux/4.7.0/cc1plus 011d8000-011e3000 rw-p 00bd8000 08:02 103794313 /usr/local/lib/gcc/x86_64-suse-linux/4.7.0/cc1plus 011e3000-014b6000 rw-p 00:00 0 [heap] 10-1002bf5000 rw-p 00085000 08:11 572044 /data/yura/eclipse1/workspace/gxbook-src-0.0.1/build/debug/src/gxbook.gch/c++ 7f1af6be1000-7f1af77e1000 rw-p 00:00 0 7f1af77e1000-7f1af77f6000 r-xp 08:02 37392436 /lib64/libgcc_s.so.1 7f1af77f6000-7f1af79f5000 ---p 00015000 08:02 37392436 /lib64/libgcc_s.so.1 7f1af79f5000-7f1af79f6000 r--p 00014000 08:02 37392436 /lib64/libgcc_s.so.1 7f1af79f6000-7f1af79f7000 rw-p 00015000 08:02 37392436 /lib64/libgcc_s.so.1 7f1af79f7000-7f1af7ae3000 r-xp 08:02 181198 /usr/lib64/libstdc++.so.6.0.16 7f1af7ae3000-7f1af7ce2000 ---p 000ec000 08:02 181198 /usr/lib64/libstdc++.so.6.0.16 7f1af7ce2000-7f1af7cea000 r--p 000eb000 08:02 181198 /usr/lib64/libstdc++.so.6.0.16 7f1af7cea000-7f1af7cec000 rw-p 000f3000 08:02 181198 /usr/lib64/libstdc++.so.6.0.16 7f1af7cec000-7f1af7d01000 rw-p 00:00 0 7f1af7d01000-7f1af7e86000 r-xp 08:02 33554966 /lib64/libc-2.14.1.so 7f1af7e86000-7f1af8086000 ---p 00185000 08:02 33554966 /lib64/libc-2.14.1.so 7f1af8086000-7f1af808a000 r--p 00185000 08:02 33554966 /lib64/libc-2.14.1.so 7f1af808a000-7f1af808b000 rw-p 00189000 08:02 33554966 /lib64/libc-2.14.1.so 7f1af808b000-7f1af809 rw-p 00:00 0 7f1af809-7f1af80e6000 r-xp 08:02 33554935 /lib64/libm-2.14.1.so 7f1af80e6000-7f1af82e5000 ---p 00056000 08:02 33554935 /lib64/libm-2.14.1.so 7f1af82e5000-7f1af82e6000 r--p 00055000 08:02 33554935 /lib64/libm-2.14.1.so 7f1af82e6000-7f1af82e7000 rw-p 00056000 08:02 33554935 /lib64/libm-2.14.1.so 7f1af82e7000-7f1af835b000 r-xp 08:02 181227 /usr/lib64/libgmp.so.10.0.2 7f1af835b000-7f1af855a000 ---p 00074000 08:02 181227 /usr/lib64/libgmp.so.10.0.2 7f1af855a000-7f1af855b000 r--p 00073000 08:02 181227 /usr/lib64/libgmp.so.10.0.2 7f1af855b000-7f1af8564000 rw-p 00074000 08:02 181227 /usr/lib64/libgmp.so.10.0.2 7f1af8564000-7f1af85b9000 r-xp 08:02 5072 /usr/lib64/libmpfr.so.4.0.1 7f1af85b9000-7f1af87b8000 ---p 00055000 08:02 5072 /usr/lib64/libmpfr.so.4.0.1 7f1af87b8000-7f1af87ba000 r--p 00054000 08:02 5072 /usr/lib64/libmpfr.so.4.0.1 7f1af87ba000-7f1af87bb000 rw-p 00056000 08:02 5072 /usr/lib64/libmpfr.so.4.0.1 7f1af87bb000-7f1af87ce000 r-xp 08:02 5110 /usr/lib64/libmpc.so.2.0.0 7f1af87ce000-7f1af89cd000 ---p 00013000 08:02 5110 /usr/lib64/libmpc.so.2.0.0 7f1af89cd000-7f1af89ce000 r--p 00012000 08:02 5110 /usr/lib64/libmpc.so.2.0.0 7f1af89ce000-7f1af89cf000 rw-p 00013000 08:02 5110 /usr/lib64/libmpc.so.2.0.0 7f1af89cf000-7f1af89d2000 r-xp 08:02 5115 /usr/lib64/libgmpxx.so.4.2.2 7f1af89
[Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722 --- Comment #3 from Yuriy Lalym 2012-01-02 15:06:30 UTC --- Without PCH errors aren't present. > all preprocessed headers to build the PCH #include It is enough one header for error origin.
[Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722 --- Comment #4 from Yuriy Lalym 2012-01-02 15:16:03 UTC --- main.cpp --- #include int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); return a.exec(); } --- pch.h --- #include g++-4.7 -m64 -pipe -g3 -gdwarf-4 -fvar-tracking-assignments -Wall -W -D_REENTRANT -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include -I. -x c++-header -c pch.h -o untitled5.gch/c++ g++-4.7 -c -include untitled5 -m64 -pipe -g3 -gdwarf-4 -fvar-tracking-assignments -Wall -W -D_REENTRANT -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include -I. -o main.o main.cpp *** glibc detected *** /usr/local/lib/gcc/x86_64-suse-linux/4.7.0/cc1plus: double free or corruption (out): 0x0010c180 ***
[Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722 --- Comment #5 from Yuriy Lalym 2012-01-02 18:50:23 UTC --- gcc-4.7 -v Using built-in specs. COLLECT_GCC=gcc-4.7 COLLECT_LTO_WRAPPER=/usr/local/lib/gcc/x86_64-suse-linux/4.7.0/lto-wrapper Target: x86_64-suse-linux Configured with: ../configure --prefix=/usr/local --libdir=/usr/local/lib64 --libexecdir=/usr/local/lib64 --enable-languages=c,c++ --enable-checking=release --with-gxx-include-dir=/usr/local/include/c++/4.7 --enable-ssp --disable-libssp --disable-plugin --with-pkgversion='SUSE Linux' --disable-libgcj --with-slibdir=/lib64 --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.7 --enable-linux-futex --without-system-libunwind --with-tune=core2 --build=x86_64-suse-linux : (reconfigured) ../configure --prefix=/usr/local --libdir=/usr/local/lib64 --libexecdir=/usr/local/lib64 --enable-languages=c,c++ --enable-checking=release --with-gxx-include-dir=/usr/local/include/c++/4.7 --enable-ssp --disable-libssp --disable-plugin --with-pkgversion='SUSE Linux' --disable-libgcj --with-slibdir=/lib64 --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.7 --enable-linux-futex --without-system-libunwind --with-tune=core2 --build=x86_64-suse-linux Thread model: posix gcc version 4.7.0 20120102 (experimental) (SUSE Linux)
[Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722 --- Comment #6 from Yuriy Lalym 2012-01-02 18:57:40 UTC --- Created attachment 26220 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26220 For example in Comment 4
[Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722 --- Comment #8 from Yuriy Lalym 2012-01-03 06:05:23 UTC --- Created attachment 26224 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26224 new example main.cpp int main() { return 0; } pch.h #include >> -g2 g++-4.7 -m64 -pipe -g2 -gdwarf-4 -fvar-tracking-assignments -Wall -W -D_REENTRANT -x c++-header -c pch.h -o untitled5.gch/c++ g++-4.7 -c -include untitled5 -m64 -pipe -g2 -gdwarf-4 -fvar-tracking-assignments -Wall -W -D_REENTRANT -o main.o main.cpp g++-4.7 -m64 -o untitled5 main.o-L/usr/lib64 -lpthread good >> -g3 g++-4.7 -m64 -pipe -g3 -gdwarf-4 -fvar-tracking-assignments -Wall -W -D_REENTRANT -x c++-header -c pch.h -o untitled5.gch/c++ g++-4.7 -c -include untitled5 -m64 -pipe -g3 -gdwarf-4 -fvar-tracking-assignments -Wall -W -D_REENTRANT -o main.o main.cpp *** glibc detected *** /usr/local/lib/gcc/x86_64-suse-linux/4.7.0/cc1plus: munmap_chunk(): invalid pointer: 0x0010ba20 ***
[Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722 --- Comment #9 from Yuriy Lalym 2012-01-03 06:08:14 UTC --- Created attachment 26225 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26225 And pch.ii
[Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722 --- Comment #10 from Yuriy Lalym 2012-01-03 06:17:03 UTC --- Created attachment 26226 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26226 only main with empty pch main.cpp int main() { return 0; } pch.h // Empty
[Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722 --- Comment #11 from Yuriy Lalym 2012-01-03 06:17:49 UTC --- Created attachment 26227 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26227 And pch.ii