http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47317
Summary: [4.6 Regression] ICE in fixed_type_or_null. Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: pl...@agmk.net Created attachment 22986 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22986 testcase. $ cgdb g++46 /* args: HesCoreConnectionUtils.ii -c -std=gnu++0x */ 5785│ static tree 5786│ fixed_type_or_null (tree instance, int *nonnull, int *cdtorp) 5787│ { 5788│ #define RECUR(T) fixed_type_or_null((T), nonnull, cdtorp) 5789│ 5790│ switch (TREE_CODE (instance)) 5791│ { 5792│ case INDIRECT_REF: 5793├> if (POINTER_TYPE_P (TREE_TYPE (instance))) 5794│ return NULL_TREE; 5795│ else 5796│ return RECUR (TREE_OPERAND (instance, 0)); 5797│ 5798│ case CALL_EXPR: 5799│ /* This is a call to a constructor, hence it's never zero. */ 5800│ if (TREE_HAS_CONSTRUCTOR (instance)) 5801│ { 5802│ if (nonnull) 5803│ *nonnull = 1; 5804│ return TREE_TYPE (instance); 5805│ } 5806│ return NULL_TREE; 5807│ 5808│ case SAVE_EXPR: 5809│ /* This is a call to a constructor, hence it's never zero. */ 5810│ if (TREE_HAS_CONSTRUCTOR (instance)) (gdb) set args HesCoreConnectionUtils.ii -c -std=gnu++0x (gdb) set follow-fork-mode child (gdb) r Starting program: /opt/gcc46/bin/g++46 HesCoreConnectionUtils.ii -c -std=gnu++0x [New process 3487] process 3487 is executing new program: /opt/gcc46/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/cc1plus Program received signal SIGSEGV, Segmentation fault. [Switching to process 3487] 0x000000000054aa3c in fixed_type_or_null (instance=<value optimized out>, nonnull=0x0, cdtorp=0x7fffffffcefc) at /home/users/pluto/src/gcc/gcc.git/gcc/cp/class.c:5793 (gdb) bt #0 0x000000000054aa3c in fixed_type_or_null (instance=<value optimized out>, nonnull=0x0, cdtorp=0x7fffffffcefc) at /home/users/pluto/src/gcc/gcc.git/gcc/cp/class.c:5793 #1 0x000000000054ae2c in fixed_type_or_null (instance=<value optimized out>, nonnull=0x0, cdtorp=0x7fffffffcefc) at /home/users/pluto/src/gcc/gcc.git/gcc/cp/class.c:5912 #2 0x000000000055319b in resolves_to_fixed_type_p (instance=<value optimized out>, nonnull=<value optimized out>) at /home/users/pluto/src/gcc/gcc.git/gcc/cp/class.c:5945 #3 0x00000000004c057c in build_new_method_call (instance=0x7ffff41c7ab0, fns=0x7ffff521cd00, args=<value optimized out>, conversion_path=<value optimized out>, flags=3, fn_p=0x0, complain=1) at /home/users/pluto/src/gcc/gcc.git/gcc/cp/c all.c:6910 #4 0x0000000000516a10 in tsubst_copy_and_build (t=<value optimized out>, args=<value optimized out>, complain=<value optimized out>, in_decl=<value optimized out>, function_p=<value optimized out>, integral_constant_expression_p=<value optimized out>) at /home/users/pluto/src/gcc/gcc.git/gcc/cp/pt.c:12915 #5 0x0000000000519125 in fold_non_dependent_expr_sfinae (expr=0x7ffff2f22200, complain=<value optimized out>) at /home/users/pluto/src/gcc/gcc.git/gcc/cp/pt.c:5173 #6 0x00000000004b434f in null_ptr_cst_p (t=<value optimized out>) at /home/users/pluto/src/gcc/gcc.git/gcc/cp/call.c:518 #7 0x00000000005012ab in build_non_dependent_expr (expr=0x7ffff2f22200) at /home/users/pluto/src/gcc/gcc.git/gcc/cp/pt.c:18724 #8 0x00000000005ad2ce in build_x_binary_op (code=EQ_EXPR, arg1=0x7ffff2f22200, arg1_code=ERROR_MARK, arg2=0x7ffff24a1a18, arg2_code=ERROR_MARK, overloaded_p=<value optimized out>, complain=3) at /home/users/pluto/src/gcc/gcc.git/gcc/cp/ typeck.c:3501 #9 0x0000000000591a62 in cp_parser_binary_expression (parser=0x7ffff55a9688, cast_p=<value optimized out>, no_toplevel_fold_p=false, prec=PREC_LOGICAL_AND_EXPRESSION, pidk=<value optimized out>) at /home/users/pluto/src/gcc/gcc.git/gcc/ cp/parser.c:6934 #10 0x0000000000591de3 in cp_parser_assignment_expression (parser=0x7ffff55a9688, cast_p=false, pidk=0x0) at /home/users/pluto/src/gcc/gcc.git/gcc/cp/parser.c:7039 #11 0x000000000059210c in cp_parser_expression (parser=0x7ffff55a9688, cast_p=<value optimized out>, pidk=0x0) at /home/users/pluto/src/gcc/gcc.git/gcc/cp/parser.c:7184 #12 0x000000000059e61f in cp_parser_condition (parser=0x7ffff55a9688) at /home/users/pluto/src/gcc/gcc.git/gcc/cp/parser.c:8696 (...)