https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78306

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-11-11
                 CC|                            |hubicka at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
trunk is a little more informative:

> gcc-6 -O2 t.i -fcilkplus -S -fdump-tree-all-details -Winline -B 
> /abuild/rguenther/trunk-g/gcc
In file included from /usr/include/string.h:635:0,
                 from test3.c:2:
test3.c: In function 'sum':
/usr/include/x86_64-linux-gnu/bits/string3.h:78:42: error: inlining failed in
call to always_inline 'memset': caller function contains cilk spawn
test3.c:16:3: note: called from here


static bool
can_inline_edge_p (struct cgraph_edge *e, bool report,
                   bool disregard_limits = false, bool early = false)
{
...
  else if (inline_summaries->get (caller)->contains_cilk_spawn)
    {
      e->inline_failed = CIF_CILK_SPAWN;
      inlinable = false;
    }


for whatever (stupid) reason.  Honza added this code with r221706 (without
a testcase).  Disabling it works fine (for this testcase).

A workaround is to separate the memset part of the function to a separate
function...

Reply via email to