This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/46675] [4.6 Regression] profiledbootstrap failed
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 27 Nov 2010 22:06:40 +0000
- Subject: [Bug tree-optimization/46675] [4.6 Regression] profiledbootstrap failed
- Auto-submitted: auto-generated
- References: <bug-46675-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46675
--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> 2010-11-27 22:06:27 UTC ---
(In reply to comment #9)
>
> Testcase:
>
> volatile int j;
> int __attribute__((noinline))
> foo(int n)
> {
> int i = 0, npairs;
> npairs = n - (- __INT_MAX__ - 1);
> if (npairs > 0)
> {
> do
> {
> ++j;
> i = i + 1;
> }
> while (i < npairs);
> }
> return 0;
> }
> extern void abort (void);
> int main()
> {
> j = 0;
> foo (- __INT_MAX__ - 1 + 5);
> if (j != 5)
> abort ();
> return 0;
> }
>
> is optimized to an endless loop by the first VRP pass.
It is caused by revision 163724:
http://gcc.gnu.org/ml/gcc-cvs/2010-09/msg00015.html