This is the mail archive of the gcc-patches@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]

Re: [PATCH,c++] convert cp_parser.unparsed_function_queues &co. to VECs


On Wed, Jun 30, 2010 at 02:33:20PM -0400, Jason Merrill wrote:
> On 06/28/2010 08:27 AM, Nathan Froyd wrote:
>> Ping.  Where does this patch stand?  Should I:
>>
>> - Commit the original patch?
>>
>> - Hold off while you consider what might be wrong with your suggestion?
>>    and/or
>>
>> - Debug your suggestion myself in hopes of figuring out what's wrong?
>
> The last, if you would.  Is DECL_FRIEND_CONTEXT not getting set for f?

Apparently not:

(gdb) break parser.c:19635
Breakpoint 1 at 0x5620b6: file ../../gcc-tree/gcc/cp/parser.c, line
19635.
(gdb) run
Starting program: /home/froydnj/src/gcc-build/gcc/cc1plus -fpreprocessed
defarg8.ii -quiet -dumpbase defarg8.C -mtune=generic -march=x86-64 -ansi
-auxbase defarg8 -pedantic-errors -ansi -version -o defarg8.s
GNU C++ (GCC) version 4.6.0 20100630 (experimental)
(x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20100630 (experimental), GMP
        version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (GCC) version 4.6.0 20100630 (experimental)
(x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20100630 (experimental), GMP
        version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 5ae6b5a9d000c38dae216c68720503f3

Breakpoint 1, cp_parser_save_default_args (decl=0x7ffff7567b00,
parser=<value optimized out>) at ../../gcc-tree/gcc/cp/parser.c:19626
19626         cp_parser_save_default_args (cp_parser* parser, tree decl)
(gdb) list
19631        probe;
19632               probe = TREE_CHAIN (probe))
19633                   if (TREE_PURPOSE (probe))
19634                         {
19635                           TREE_PURPOSE (parser->unparsed_functions_queues)
19636             = tree_cons (current_class_type, decl,
19637                                TREE_PURPOSE (parser->unparsed_functions_queues));
19638           break;
19639                 }
19640                 }
(gdb) call debug_tree (decl)
 <function_decl 0x7ffff7567b00 f
    type <function_type 0x7ffff756b3f0
        type <void_type 0x7ffff7e99e70 void VOID
            align 8 symtab 0 alias set -1 canonical type 0x7ffff7e99e70
            pointer_to_this <pointer_type 0x7ffff7e99f18>>
        QI
        size <integer_cst 0x7ffff7e814b0 constant 8>
        unit size <integer_cst 0x7ffff7e814d8 constant 1>
        align 8 symtab 0 alias set -1 canonical type 0x7ffff7eb7e70
        arg-types <tree_list 0x7ffff7558938
            purpose <default_arg 0x7ffff75588e8> value <integer_type
            0x7ffff7e99498 int>
            chain <tree_list 0x7ffff7eab348 value <void_type
            0x7ffff7e99e70 void>>>>
    public external QI file gcc.git/gcc/testsuite/g++.dg/parse/defarg8.C
    line 8 col 15 align 8
    arguments <parm_decl 0x7ffff7e8a990 D.1388
        type <integer_type 0x7ffff7e99498 int public SI
            size <integer_cst 0x7ffff7e816e0 constant 32>
            unit size <integer_cst 0x7ffff7e813e8 constant 4>
            align 32 symtab 0 alias set -1 canonical type 0x7ffff7e99498
            precision 32 min <integer_cst 0x7ffff7e81668 -2147483648>
            max <integer_cst 0x7ffff7e81690 2147483647>
            pointer_to_this <pointer_type 0x7ffff7eac540>>
        SI file gcc.git/gcc/testsuite/g++.dg/parse/defarg8.C line 8 col
        23 size <integer_cst 0x7ffff7e816e0 32> unit size <integer_cst
        0x7ffff7e813e8 4>
        align 32 context <function_decl 0x7ffff7567b00 f>
        arg-type <integer_type 0x7ffff7e99498 int>>
    full-name "void f(int = <unparsed>)"
    chain <type_decl 0x7ffff756d000 S>>
(gdb) p scope_chain->class_type
$3 = (tree) 0x7ffff756b2a0
(gdb) call debug_tree (scope_chain->class_type)
 <record_type 0x7ffff756b2a0 S type_5 type_6 VOID
    align 8 symtab 0 alias set -1 canonical type 0x7ffff756b2a0
    fields <var_decl 0x7ffff7ea51e0 i
        type <integer_type 0x7ffff7e99498 int public SI
            size <integer_cst 0x7ffff7e816e0 constant 32>
            unit size <integer_cst 0x7ffff7e813e8 constant 4>
            align 32 symtab 0 alias set -1 canonical type 0x7ffff7e99498
            precision 32 min <integer_cst 0x7ffff7e81668 -2147483648>
            max <integer_cst 0x7ffff7e81690 2147483647>
            pointer_to_this <pointer_type 0x7ffff7eac540>>
        public static external decl_3 decl_5 decl_6 SI file
        gcc.git/gcc/testsuite/g++.dg/parse/defarg8.C line 6 col 14 size
        <integer_cst 0x7ffff7e816e0 32> unit size <integer_cst
        0x7ffff7e813e8 4>
        align 32 context <record_type 0x7ffff756b2a0 S>
       
        chain <type_decl 0x7ffff756d0b8 S type <record_type
        0x7ffff756b348 S>
            nonlocal decl_4 VOID file
        gcc.git/gcc/testsuite/g++.dg/parse/defarg8.C line 5 col 10
            align 1 context <record_type 0x7ffff756b2a0 S> result
        <record_type 0x7ffff756b2a0 S>
           >>
    full-name "struct S"
    n_parents=0 use_template=0 interface-unknown
    chain <type_decl 0x7ffff756d000 S>>
(gdb) p decl->decl_minimal.context
$4 = (tree) 0x0

-Nathan


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