public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/46316] New: [4.6 regression] incorrect loop optimization
@ 2010-11-05 16:41 ebotcazou at gcc dot gnu.org
  2010-11-05 18:12 ` [Bug tree-optimization/46316] " hjl.tools at gmail dot com
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2010-11-05 16:41 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6 regression] incorrect loop optimization
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ebotcazou@gcc.gnu.org


The Ada runtime (a-calend.adb) is miscompiled at -O2 on x86 at revision 166350.
An infinite loop is generated by the compiler in the UTC_Time_Offset function.

The reduced C testcase is just:

extern void abort (void);

long long __attribute__((noinline,noclone))
foo (long long t)
{
  while (t > -4)
    t -= 2;

  return t;
}

int main(void)
{
  if (foo (0) != -4)
    abort ();
  return 0;
}

eric@atlantis:~/build/gcc/native32> gcc/xgcc -Bgcc -o t t.c -O2
eric@atlantis:~/build/gcc/native32> ./t
^C
eric@atlantis:~/build/gcc/native32>


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2010-11-09  7:59 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-05 16:41 [Bug tree-optimization/46316] New: [4.6 regression] incorrect loop optimization ebotcazou at gcc dot gnu.org
2010-11-05 18:12 ` [Bug tree-optimization/46316] " hjl.tools at gmail dot com
2010-11-05 18:16 ` hjl.tools at gmail dot com
2010-11-05 18:42 ` ebotcazou at gcc dot gnu.org
2010-11-05 18:53 ` hjl.tools at gmail dot com
2010-11-05 20:30 ` hjl.tools at gmail dot com
2010-11-06 10:05 ` ebotcazou at gcc dot gnu.org
2010-11-06 17:35 ` rguenth at gcc dot gnu.org
2010-11-07 21:12 ` xinliangli at gmail dot com
2010-11-07 21:32 ` ebotcazou at gcc dot gnu.org
2010-11-07 23:22 ` xinliangli at gmail dot com
2010-11-08  0:08 ` xinliangli at gmail dot com
2010-11-08  0:53 ` ebotcazou at gcc dot gnu.org
2010-11-08  7:03 ` jakub at gcc dot gnu.org
2010-11-08  7:13 ` xinliangli at gmail dot com
2010-11-08  7:34 ` jakub at gcc dot gnu.org
2010-11-08  7:38 ` xinliangli at gmail dot com
2010-11-08  8:18 ` xinliangli at gmail dot com
2010-11-09  7:01 ` ebotcazou at gcc dot gnu.org
2010-11-09  7:23 ` xinliangli at gmail dot com
2010-11-09  7:59 ` ebotcazou at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).