[Bug c++/30567] -fPIC -O3 optimizer bug (32-bit target only)
rwgk at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Mon Feb 26 02:26:00 GMT 2007
------- Comment #12 from rwgk at yahoo dot com 2007-02-26 02:26 -------
Daniel Berlin wrote:
> This change actually made us more conservative with points-to, it certainly
> won't cause *more* things to be optimized away.
Was the change supposed to fix a certain problem?
If not I suggest the two lines should be backed out since they clearly cause
a regression on the 4.2 branch.
My suggestion is motivated by another experiment I did with the latest
SVN (revision 122315):
Procedure:
configure; make bootstrap; make; make install
followed by
1. running all our unit tests (1700 seconds of CPU time Xeon 2.8GHz)
2. trying the reproducer with g++ -fPIC -O3 dbg.cpp; ./a.out
Fedora 5, x86_64:
With SVN "as is" and with the two lines in question backed out
1. all our unit tests are fine
2. ./a.out prints "1" (OK)
Fedora 6, i686:
With SVN "as is"
1. all our unit tests are fine
2. ./a.out prints "0" (failure)
With the two lines in question backed out
1. all our unit tests are fine
2. ./a.out prints "1" (OK)
Here is my local patch to back out the two lines introduced in
SVN revision 119791:
Index: gcc/tree-ssa-structalias.c
===================================================================
--- gcc/tree-ssa-structalias.c (revision 122315)
+++ gcc/tree-ssa-structalias.c (working copy)
@@ -3303,8 +3303,8 @@
{
rhsoffset = TREE_INT_CST_LOW (op1) * BITS_PER_UNIT;
}
- else
- return false;
+/*else
+ return false; */
for (i = 0; VEC_iterate (ce_s, lhsc, i, c); i++)
for (j = 0; VEC_iterate (ce_s, temp, j, c2); j++)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30567
More information about the Gcc-bugs
mailing list