[Bug ipa/91062] gcc.dg/ipa/ipa-pta-1.c dump contains garbage when gcc was configured with --enable-checking=all

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jul 3 07:27:00 GMT 2019


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2019-07-03
                 CC|                            |hubicka at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, so the issue is that IPA PTA is a simple IPA pass and does


  /* Build the constraints.  */
  FOR_EACH_DEFINED_FUNCTION (node)
    {             
      varinfo_t vi;
      /* Nodes without a body are not interesting.  Especially do not
         visit clones at this point for now - we get duplicate decls
         there for inline clones at least.  */
      if (!node->has_gimple_body_p () || node->global.inlined_to)
        continue;
      node->get_body ();
^^^

and get_body () ends up doing

#0  ggc_collect () at /space/rguenther/src/svn/trunk2/gcc/ggc-page.c:2174
#1  0x0000000001032dbd in execute_one_ipa_transform_pass (
    node=<cgraph_node * 0x7ffff687c708 "main"/3>, ipa_pass=0x31c8c50)
    at /space/rguenther/src/svn/trunk2/gcc/passes.c:2232
#2  0x0000000001032e34 in execute_all_ipa_transforms ()
    at /space/rguenther/src/svn/trunk2/gcc/passes.c:2250
#3  0x0000000000ae023f in cgraph_node::get_body (
    this=<cgraph_node * const 0x7ffff687c708 "main"/3>)
    at /space/rguenther/src/svn/trunk2/gcc/cgraph.c:3621
#4  0x00000000014b7162 in ipa_pta_execute ()
    at /space/rguenther/src/svn/trunk2/gcc/tree-ssa-structalias.c:8077

thus it collects while a pass is running...  omp-simd-clone.c seems to be
the only other pass using ::get_body (also a simple IPA pass).

We can pass down a flag from get_body to not call ggc_collect which I
believe is the way to go?


More information about the Gcc-bugs mailing list