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 tree-optimization/29877] out of SSA (TER) extends variable life of variable beyond original declared



------- Comment #2 from amacleod at redhat dot com  2006-11-17 19:28 -------
A .i file would have been handy. IN any case thats easily worked around.

The issue here isn't that the lifetoime of something is being extended since
the tree optimizers already made __res function scope.  The problem is that it
is defined to be a specific register:

register long long unsigned int __res __asm__ (*r2);

and when its copied to 
t_10 = __res

that is OK as well.  t_10 is then used a single time a few stmts away, and this
triggers TER to substitute __res at t_10's use location.

The simplest and obvious fix I think would be to disable expansion of an
expression if the base variable is an __asm__ like that.  So it would leave the
copy of __res to t_10 and disallow t_10 to be subsituted.

I think this will resolve the problem, and I will look at it shortly.


-- 

amacleod at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |amacleod at redhat dot com
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-11-17 19:28:11
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29877


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