re PR ipa/64730 (g++.dg/ipa/pr64049-1.C ICE: SEGV when printing NULL)
authorJakub Jelinek <jakub@redhat.com>
Mon, 26 Jan 2015 21:33:11 +0000 (22:33 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 26 Jan 2015 21:33:11 +0000 (22:33 +0100)
PR ipa/64730
* ipa-inline.c (inline_small_functions): Print "unknown" even
if edge->call_stmt is non-NULL, but has builtins or unknown
location.

From-SVN: r220139

gcc/ChangeLog
gcc/ipa-inline.c
gcc/testsuite/ChangeLog

index f10bfb729a97f95442211bf35c57057ebe53a304..8cf5d5b104a1684a9254f1d2cba9138a4061467f 100644 (file)
@@ -1,5 +1,10 @@
 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
 
+       PR ipa/64730
+       * ipa-inline.c (inline_small_functions): Print "unknown" even
+       if edge->call_stmt is non-NULL, but has builtins or unknown
+       location.
+
        PR middle-end/64421
        * omp-low.c (simd_clone_mangle): If DECL_ASSEMBLER_NAME starts
        with asterisk, skip the first character.
index aa93928b7028583f314265ed74f7a3f9c04e3037..f91a6a53b44010f006698af08bea8730a0c8aa5c 100644 (file)
@@ -1822,6 +1822,9 @@ inline_small_functions (void)
                   " Estimated badness is %f, frequency %.2f.\n",
                   edge->caller->name (), edge->caller->order,
                   edge->call_stmt
+                  && (LOCATION_LOCUS (gimple_location ((const_gimple)
+                                                       edge->call_stmt))
+                      > BUILTINS_LOCATION)
                   ? gimple_filename ((const_gimple) edge->call_stmt)
                   : "unknown",
                   edge->call_stmt
index 26d82acbf2e76595d9480f2078be01750fea68e4..f81676e35d10c394151301549c8983d0bbc6178c 100644 (file)
@@ -3,8 +3,6 @@
        PR c/64778
        * gcc.dg/pr64778.c: New test.
 
-2015-01-26  Jakub Jelinek  <jakub@redhat.com>
-
        PR middle-end/64421
        * gcc.dg/vect/pr64421.c: New test.