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 middle-end/25443] -fpic/-fPIC failure in gcc.dg/tree-ssa/loop-3.c



------- Comment #4 from dalej at apple dot com  2007-01-12 20:13 -------
With pic, the load of the global's address is pulled outside the loop, so the
"base" is a register rather than the global.  This causes ivopts to represent
index*step all in the index field rather than as two separate fields, so the
dump looks like
  MEM[base: &arr_base, index: (int *) iter * 4B] = D.1877;
instead of
  MEM[symbol: arr_base, index: (int *) iter, step: 4B] = D.1877;
so the test fails, but the generated code is correct and optimal.  I suggest
adding -fno-pic to the test, does that look OK?


-- 


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


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