Please, do not refer to off-site test cases; your example code needs to be attached directly to the ticket.
Reply To keith
Please, do not refer to off-site test cases; your example code needs to be attached directly to the ticket.
Sry about that, I added the test case example code.
I added the test case example code.
Thanks. FWIW, my mingw32-g++ (MinGW.org Cross-GCC Build-20200531-1) 9.2.0 cross compiler reports the same ICE, when compiling your example:
$ mingw32-g++ -S -masm=intel foo.cpp during GIMPLE pass: *rebuild_cgraph_edges foo.cpp: In member function 'void test3<T>::depart() [with T = const test1<long unsigned int (__attribute__((stdcall)) *)(void*)>]': foo.cpp:55:1: internal compiler error: Segmentation fault 55 | } | ^ 0xbc5ecf crash_signal ../../src/gcc-9.2.0/gcc/toplev.c:326 0x9f077b obj_type_ref_class(tree_node const*) ../../src/gcc-9.2.0/gcc/ipa-devirt.c:2026 0xe10556 virtual_method_call_p(tree_node const*) ../../src/gcc-9.2.0/gcc/tree.c:13009 0x8489d1 cgraph_node::create_indirect_edge(gcall*, int, profile_count, bool) ../../src/gcc-9.2.0/gcc/cgraph.c:968 0x84dd1a cgraph_edge::rebuild_edges() ../../src/gcc-9.2.0/gcc/cgraphbuild.c:421 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.whereas, with mingw32-g++ (MinGW.org cross-GCC-8.2.0-4) 8.2.0, it seems to compile cleanly.
Unfortunately, I am not a C++ expert, and don't consider myself qualified to pursue this further; your best course of action may be to file a GCC bug, on https://gcc.gnu.org/bugzilla/
Example Code: https://godbolt.org/z/e31raW
The code compiles fine in godbolt with gcc 9.2, but if compiled with mingw there is the following error:
Im using:
Windows 10, 64 bit
GCC Version
Binutils Version MinGW Version Build EnvironmentI hope the Test Case is described good enough.