[Bug tree-optimization/50287] New: FAIL: gcc.c-torture/execute/builtins/vsnprintf-chk.c compilation, -O2 -flto
kkojima at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Sep 4 00:22:00 GMT 2011
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.
More information about the Gcc-bugs
mailing list