http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59470
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
For the inline asm, consider e.g.:
int a, b;
int
foo (void)
{
int c;
asm ("" : "=r" (c) : "rm" (a), "rm" (b) : "memory");
return c;
}
where r205709 regresses expansion (not even combiner can fix it up, LRA cures
it though), and:
int a, b, d[1024];
int
main ()
{
asm ("movl $6, (%2); movl $1, %0" : "=r" (d[a]) : "rm" (b), "r" (&a) :
"memory");
if (d[0] != 1 || d[6] != 0)
__builtin_abort ();
return 0;
}
(which was miscompiled before PR58956, shall we add it into the testsuite?).
While at it, for trunk, I wonder if:
if (is_gimple_call (stmt)
&& !((fndecl = gimple_call_fndecl (stmt))
&& DECL_BUILT_IN (fndecl)))
cur_call_cnt++;
shouldn't also not increment for gimple_call_internal_p calls, they are
builtins always.