Re: Local variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes. It is working when I am not in ssa mode (in ompexp) but there is
again a problem with function call that I have declared and inserted
in the code and the error is the following when my pass is before ompexp:

RDOT/2(-1) @0x7fd2fbe38840 availability:not_available reachable body
 called by: main/0 (1.00 per call) main/0 (1.00 per call) main/0
(1.00 per call) main/0 (1.00 per call)
 calls:
 References:
 Refering this function:
hello.c:21:1: internal compiler error: failed to reclaim unneeded function
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

The same thing is working when I put my pass before optimized pass.
The definition of this function is in other file which will be linked
at link time and is defined external there. For the moment, I passed
constant integer (just to resolve the issue). So let suppose I want to
modify a variable at "optimized" pass i,e when ssa is over, how can I
modify a variable?

Regards

Abdul

On Tue, Jun 28, 2011 at 6:57 PM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
> Abdul Wahid Memon <engrwahidmemon@xxxxxxxxx> writes:
>
>> I have another question related to this. Lets suppose we have declared
>> a local integer variable and we assigned some integer to it using
>> gimple_build_assign statement (providing an ssa name). And after this,
>> I want to modify the value of same variable. Should I create an other
>> assignment statement or is there any other way to it?
>>
>> I have already tested it with creating an other assignment statement
>> by providing the same ssa name but it gives me an error:
>> hello.c:3:5: error: SSA_NAME_DEF_STMT is wrong
>> Expected definition statement:
>> b_4 = 1234;
>>
>> Actual definition statement:
>> b_4 = 5555;
>> hello.c:3:5: internal compiler error: verify_ssa failed
>> Please submit a full bug report,
>> with preprocessed source if appropriate.
>> See <http://gcc.gnu.org/bugs.html> for instructions.
>
> Your pass is evidently while the tree is in SSA mode.  In SSA mode every
> variable is only assigned to once (see
> http://en.wikipedia.org/wiki/Static_single_assignment_form).  So you
> can't modify a local variable.
>
> If you don't want to deal with SSA mode you should ensure that your pass
> runs before pass_build_ssa.
>
> Ian
>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux