public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/50287] New: FAIL: gcc.c-torture/execute/builtins/vsnprintf-chk.c compilation, -O2 -flto
@ 2011-09-04  0:22 kkojima at gcc dot gnu.org
  2011-09-04  8:58 ` [Bug tree-optimization/50287] [4.7 Regression] " rguenth at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: kkojima at gcc dot gnu.org @ 2011-09-04  0:22 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50287
           Summary: FAIL: gcc.c-torture/execute/builtins/vsnprintf-chk.c
                    compilation, -O2 -flto
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: kkojima@gcc.gnu.org
            Target: arm-eabi sh*-*-*


Several gcc.c-torture/execute/builtins/*-chk.c tests fail for ARM and SH
with -O2 -flto:

gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c: In function
'__vsnprintf_chk':
gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c:398:1: error: number of
operands and imm-links don't agree in statement
# .MEM_57 = VDEF <.MEM_22>
ap = ap_18(D);
gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c:398:1: internal compiler
error: verify_ssa failed

A reduced testcase for arm-eabi:

static char buf[4096];

int __attribute__((format(printf,4,0)))
foo (char *str, unsigned int len, unsigned int size, const char *fmt,
     __builtin_va_list ap);

int
foo (char *str, unsigned int len,  unsigned int size, const char *fmt,
     __builtin_va_list ap)
{
  if (!size)
    return 0;

  if (size < len)
    bar (str, buf, size + 1);
  else
    bar (str, buf, len - 1);

  return 0;
}

It has started to fail after revision 178386.  It seems that
the fix for PR49886 reveals this issue.
-fno-partial-inlining makes the ICE go away.


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

end of thread, other threads:[~2011-09-09  9:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-04  0:22 [Bug tree-optimization/50287] New: FAIL: gcc.c-torture/execute/builtins/vsnprintf-chk.c compilation, -O2 -flto kkojima at gcc dot gnu.org
2011-09-04  8:58 ` [Bug tree-optimization/50287] [4.7 Regression] " rguenth at gcc dot gnu.org
2011-09-06 11:21 ` rsandifo at gcc dot gnu.org
2011-09-06 12:55 ` ramana at gcc dot gnu.org
2011-09-06 18:24 ` jamborm at gcc dot gnu.org
2011-09-06 18:29 ` jamborm at gcc dot gnu.org
2011-09-06 18:31 ` jamborm at gcc dot gnu.org
2011-09-07  0:35 ` kkojima at gcc dot gnu.org
2011-09-08  9:21 ` rguenth at gcc dot gnu.org
2011-09-08 13:15 ` jamborm at gcc dot gnu.org
2011-09-09  9:59 ` jamborm 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).