aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-08-15 12:44:58 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-08-15 12:44:58 +0000
commit466e6e8dfcc7f66fdf5d6eca401b091b75cf0b89 (patch)
treeb00506838839f1e1b58587eb2959500b23de769e /gcc/gcc.c
parent204b99cd9c55825cee211ce186b861454a7a4c50 (diff)
downloadgcc-466e6e8dfcc7f66fdf5d6eca401b091b75cf0b89.zip
gcc-466e6e8dfcc7f66fdf5d6eca401b091b75cf0b89.tar.gz
gcc-466e6e8dfcc7f66fdf5d6eca401b091b75cf0b89.tar.bz2
gcc.c (execute): Emit friendlier message if inferior is killed by an external cause.
* gcc.c (execute): Emit friendlier message if inferior is killed by an external cause. From-SVN: r251104
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 987eff5..96152de 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -3151,9 +3151,27 @@ execute (void)
}
else
#endif
- internal_error_no_backtrace ("%s (program %s)",
- strsignal (WTERMSIG (status)),
- commands[i].prog);
+ switch (WTERMSIG (status))
+ {
+ case SIGINT:
+ case SIGQUIT:
+ case SIGKILL:
+ case SIGTERM:
+ /* The user (or environment) did something to the
+ inferior. Making this an ICE confuses the user
+ into thinking there's a compiler bug. Much more
+ likely is the user or OOM killer nuked it. */
+ fatal_error (input_location,
+ "%s signal terminated program %s",
+ strsignal (WTERMSIG (status)),
+ commands[i].prog);
+ break;
+ default:
+ /* The inferior failed to catch the signal. */
+ internal_error_no_backtrace ("%s (program %s)",
+ strsignal (WTERMSIG (status)),
+ commands[i].prog);
+ }
}
else if (WIFEXITED (status)
&& WEXITSTATUS (status) >= MIN_FATAL_STATUS)