This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/25443] -fpic/-fPIC failure in gcc.dg/tree-ssa/loop-3.c
- From: "dalej at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jan 2007 20:13:37 -0000
- Subject: [Bug middle-end/25443] -fpic/-fPIC failure in gcc.dg/tree-ssa/loop-3.c
- References: <bug-25443-578@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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