From: Nathan Froyd <froydnj@codesourcery.com>
To: Jason Merrill <jason@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH,c++] convert cp_parser.unparsed_function_queues &co. to VECs
Date: Wed, 30 Jun 2010 20:40:00 -0000 [thread overview]
Message-ID: <20100630191019.GW22606@codesourcery.com> (raw)
In-Reply-To: <4C2B8DF0.8070800@redhat.com>
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
next prev parent reply other threads:[~2010-06-30 19:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-07 18:14 Nathan Froyd
2010-06-08 15:31 ` Mark Mitchell
2010-06-08 15:38 ` Nathan Froyd
2010-06-08 15:57 ` Jason Merrill
2010-06-08 16:14 ` Jason Merrill
2010-06-08 21:44 ` Nathan Froyd
2010-06-16 7:07 ` Nathan Froyd
2010-06-16 15:01 ` Jason Merrill
2010-06-16 15:48 ` Nathan Froyd
2010-06-28 12:48 ` Nathan Froyd
2010-06-30 19:08 ` Jason Merrill
2010-06-30 20:40 ` Nathan Froyd [this message]
2010-06-30 20:56 ` Jason Merrill
2010-06-30 21:01 ` Nathan Froyd
2010-06-30 21:32 ` Jason Merrill
2010-07-01 5:09 ` Mark Mitchell
2010-07-01 14:24 ` Jason Merrill
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100630191019.GW22606@codesourcery.com \
--to=froydnj@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).