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 optimization/14627] [tree-ssa] extra assignment inserted


------- Additional Comments From steven at gcc dot gnu dot org  2004-03-23 16:07 -------
This way it's a bit smaller: 
 
int foo (int *a, int b) 
{ 
  int i; 
  int one_valid = 0; 
  for (i = 0; i < 10; i++) 
    { 
      if (*a && b) 
        goto done; 
      else 
        if (!one_valid && *a) 
          one_valid = 1; 
    } 
 
done: 
  return one_valid; 
} 
 
When you replace "int *a" with just "int a", the extra assignment isn't there. 
 
 

-- 


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


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