https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59845
ArshaGCC changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59845
--- Comment #3 from ArshaGCC ---
I further analyzed and found an interesting issue:
The optimizer bug (profile optimizer) occurs when input > 32768. When input is
less than or equal to 32768 (2^15) it always generate the correct optimized
code.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59845
--- Comment #2 from Andrew Pinski ---
>(constant folding problem within loop?)
No it is doing the following:
if (n>=1)
{
i = 1;
while (true)
{
if (n%i == 0)
{
printf("\n%d", i);
i++;
if (n/2 <
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59845
--- Comment #1 from ArshaGCC ---
I found that only when I use very high vales for input the problem persists.
for example when using 123456 as input for profiling it generates incorrect
code but when using 12345 as input the correct code will be g