[PATCH tree-inline] Do not say "called from here" with UNKNOWN_LOCATION
authorManuel López-Ibáñez <manu@gcc.gnu.org>
Tue, 22 Sep 2015 09:14:04 +0000 (09:14 +0000)
committerManuel López-Ibáñez <manu@gcc.gnu.org>
Tue, 22 Sep 2015 09:14:04 +0000 (09:14 +0000)
commit9915b1c916b1e6aa0fb7aa738dcc217f5f69b8ef
tree7df1c9f98b7f095c49e9697bdb59518dd553790d
parent50b4b446bb3894b6b8a830554009bd9cbdb8009a
[PATCH tree-inline] Do not say "called from here" with UNKNOWN_LOCATION

In https://sourceware.org/ml/libc-alpha/2014-12/msg00300.html, we give a
"called from here" note without actually having a location, which looks
strange. I haven't been able to generate such a testcase. If this happens,
try to at least point to the current function being called. If that location is
also unknown, skip the extra note.

gcc/ChangeLog:

2015-09-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>

* tree-inline.c (expand_call_inline): Use inform for extra note.
Do not give a note with UNKNOWN_LOCATION.
Replace input_location with gimple_location (stmt).
Use true/false instead of TRUE/FALSE.

gcc/testsuite/ChangeLog:

2015-09-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>

* gcc.target/i386/inline_error.c (int bar): Use dg-message for note.
* gcc.target/i386/pr57756.c (static __inline int caller): Likewise.
* gcc.target/i386/pr59789.c (f1): Likewise.
* gcc.target/i386/intrinsics_5.c (__m128i foo): Likewise.
* gcc.target/i386/intrinsics_6.c: Likewise.
* gcc.dg/winline-5.c (int t): Likewise.
* gcc.dg/winline-9.c (t): Likewise.
* gcc.dg/always_inline2.c (q): Likewise.
* gcc.dg/winline-2.c (inline int t): Likewise.
* gcc.dg/winline-6.c: Likewise.
* gcc.dg/winline-10.c (void g): Likewise.
* gcc.dg/pr49243.c (void parse): Likewise.
* gcc.dg/always_inline3.c (q2): Likewise.
* gcc.dg/winline-3.c: Likewise.
* gcc.dg/winline-7.c (inline void *t): Likewise.

From-SVN: r227997
18 files changed:
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/always_inline2.c
gcc/testsuite/gcc.dg/always_inline3.c
gcc/testsuite/gcc.dg/pr49243.c
gcc/testsuite/gcc.dg/winline-10.c
gcc/testsuite/gcc.dg/winline-2.c
gcc/testsuite/gcc.dg/winline-3.c
gcc/testsuite/gcc.dg/winline-5.c
gcc/testsuite/gcc.dg/winline-6.c
gcc/testsuite/gcc.dg/winline-7.c
gcc/testsuite/gcc.dg/winline-9.c
gcc/testsuite/gcc.target/i386/inline_error.c
gcc/testsuite/gcc.target/i386/intrinsics_5.c
gcc/testsuite/gcc.target/i386/intrinsics_6.c
gcc/testsuite/gcc.target/i386/pr57756.c
gcc/testsuite/gcc.target/i386/pr59789.c
gcc/tree-inline.c