This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Tree
On Tue, Jul 26, 2011 at 5:43 PM, konica sarker <konica.sarker@gmail.com> wrote:
> On Tue, Jul 26, 2011 at 5:33 PM, Ian Lance Taylor <iant@google.com> wrote:
>> konica sarker <konica.sarker@gmail.com> writes:
>>
>>> <var_decl 0xb776a284 z
>>> ??? type <real_type 0xb7769120 float address-space-1 SF
>>> ??????? size <integer_cst 0xb76972c0 constant 32>
>>> ??????? unit size <integer_cst 0xb7697060 constant 4>
>>> ??????? align 32 symtab 0 alias set -1 canonical type 0xb7769120 precision 32>
>>> ??? used public external common SF defer-output file /tmp/test.c line
>>> 21 col 21 size <integer_cst 0xb76972c0 32> unit size <integer_cst
>>> 0xb7697060 4>
>>> ??? align 32>
>>>
>>>
>>> this is my tree code . I have printed my tree by debug_tree.
>>> can you tell me how can I extract the information address-space-1 from
>>> this code???
>>
>> I'm sorry, I don't understand what you mean. ?I can see the string
>> address-space-1 right there in the output.
>>
>> Do you mean: given this tree, how can you write code which determines
>> the address space? ?Use TYPE_ADDR_SPACE.
>>
>> Ian
>>
>
> Yes. TYPE_ADDR_SPACE () is not detecting the address space of this tree.
>
here is a tree code :
for example output of debug_tree(t1)
<real_type 0xb77a6120 float address-space-1 SF
size <integer_cst 0xb76d42c0 type <integer_type 0xb76e8060
bit_size_type> constant 32>
unit size <integer_cst 0xb76d4060 type <integer_type 0xb76e8000
long unsigned int> constant 4>
align 32 symtab 0 alias set -1 canonical type 0xb77a6120 precision 32>
if I use addr_space_t asl = TYPE_ADDR_SPACE (t1);
I get the address space value in asl.
now, I have another tree code :
debug_tree(t2)
<var_decl 0xb781d284 z
type <real_type 0xb781c120 float address-space-1 SF
size <integer_cst 0xb774a2c0 constant 32>
unit size <integer_cst 0xb774a060 constant 4>
align 32 symtab 0 alias set -1 canonical type 0xb781c120 precision 32>
used public external common SF defer-output file /tmp/test.c line
21 col 21 size <integer_cst 0xb774a2c0 32> unit size <integer_cst
0xb774a060 4>
align 32>
if I use addr_space_t asl = TYPE_ADDR_SPACE (t2);
I am not getting the address space value .
so , what is the difference of this two tree?
how do I get the address space value of the 2nd one?