This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/47317] New: [4.6 Regression] ICE in fixed_type_or_null.


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: unassigned@gcc.gnu.org
        ReportedBy: pluto@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
(...)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]