http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47213
Summary: ICE: SIGSEGV in determine_visibility (decl2.c:2076) with -fvisibility-ms-compat Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz Created attachment 22925 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22925 reduced testcase Compiler output: $ gcc -fvisibility-ms-compat pr47213.C ==1382== Invalid read of size 2 ==1382== at 0x5B2EAF: determine_visibility (decl2.c:2076) ==1382== by 0x534F5B: cp_finish_decl (decl.c:6067) ==1382== by 0x677DD9: pushdecl_top_level_1 (name-lookup.c:3649) ==1382== by 0x677E24: pushdecl_top_level_and_finish (name-lookup.c:3677) ==1382== by 0x5F1282: get_tinfo_decl (rtti.c:441) ==1382== by 0x5F14C5: get_tinfo_ptr (rtti.c:458) ==1382== by 0x5F19E2: get_typeid (rtti.c:493) ==1382== by 0x56106A: tsubst_copy_and_build (pt.c:13215) ==1382== by 0x554C18: tsubst_expr (pt.c:12379) ==1382== by 0x5559A8: tsubst_expr (pt.c:11955) ==1382== by 0x554CC8: tsubst_expr (pt.c:12120) ==1382== by 0x581C41: instantiate_decl (pt.c:17379) ==1382== by 0x589053: instantiate_pending_templates (pt.c:17476) ==1382== by 0x5B7321: cp_write_global_declarations (decl2.c:3679) ==1382== by 0xA245D5: toplev_main (toplev.c:591) ==1382== by 0x6369BBC: (below main) (in /lib64/libc-2.11.2.so) ==1382== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==1382== pr47213.C: In instantiation of 'void bar() [with T = int()]': pr47213.C:12:19: instantiated from here pr47213.C:6:3: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Tested revisions: r168552 - crash 4.3.5, 4.4.5, 4.5.2 - crash 4.2.4 - doesn't know -fvisibility-ms-compat