public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix GIMPLE FE with calls and startwith
@ 2019-02-27 13:57 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2019-02-27 13:57 UTC (permalink / raw)
  To: gcc-patches


Turns out the cgraph code isn't happy if cgraph edge (re-)building
is skipped.

Tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

2019-02-27  Richard Biener  <rguenther@suse.de>

	* passes.c (should_skip_pass_p): Do not skip cgraph-edge
	building.

	* gcc.dg/gimplefe-36.c: New testcase.

Index: gcc/passes.c
===================================================================
--- gcc/passes.c	(revision 269247)
+++ gcc/passes.c	(working copy)
@@ -2380,6 +2380,10 @@ should_skip_pass_p (opt_pass *pass)
       && pass->properties_provided != 0)
     return false;
 
+  /* We need to (re-)build cgraph edges as needed.  */
+  if (strstr (pass->name, "build_cgraph_edges") != NULL)
+    return false;
+
   /* Don't skip df init; later RTL passes need it.  */
   if (strstr (pass->name, "dfinit") != NULL)
     return false;
Index: gcc/testsuite/gcc.dg/gimplefe-36.c
===================================================================
--- gcc/testsuite/gcc.dg/gimplefe-36.c	(nonexistent)
+++ gcc/testsuite/gcc.dg/gimplefe-36.c	(working copy)
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fgimple" } */
+
+int foo (void);
+
+void __GIMPLE (startwith("fre1"))
+d ()
+{
+  int _1;
+
+bb_2:
+  _1 = foo ();
+  return;
+}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-02-27 13:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-27 13:57 [PATCH] Fix GIMPLE FE with calls and startwith Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).