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/17046] An unused array is not optimized away.


------- Additional Comments From kazu at cs dot umass dot edu  2004-08-16 07:31 -------
Yes.  In fact, the following piece of code does *not*
generate the array in the assembly output.

static const int banana[] = { 0, 1, 2, 3 };

int
foo (void)
{
  return banana[2] * 0;
}

Note that the fix for this bug is important so that we can cleanly
fix PR 14841 because uses of "static const arrays" may disappear
during tree optimization.


-- 


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


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