http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46461
Summary: [4.6 Regression] ICE: invalid argument to gimple call
at -O with __builtin_memset()
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: [email protected]
ReportedBy: [email protected]
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
----- testcase.c -----
void
foo (char *c)
{
c[7] = 0xff;
__builtin_memset (c + 8, 0xff, 8);
}
----------------------
Compiler output:
$ gcc -O testcase.c
testcase.c: In function 'foo':
testcase.c:6:1: error: invalid argument to gimple call
&MEM[(char *)c_1(D) + 7B]
Strangely, no regular ICE message i s given.
With -foptimize-sibling-calls, there is the message:
$ gcc -O -foptimize-sibling-calls testcase.c
testcase.c: In function 'foo':
testcase.c:6:1: error: invalid argument to gimple call
&MEM[(char *)c_1(D) + 7B]
testcase.c:6:1: internal compiler error: in refs_may_alias_p_1, at
tree-ssa-alias.c:989
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.
Tested revisions:
r166604 - crash
r166509 - crash
r163636 - OK
4.5 r166509 - OK