From: Nathan Sidwell Date: Tue, 15 Aug 2017 12:44:58 +0000 (+0000) Subject: gcc.c (execute): Emit friendlier message if inferior is killed by an external cause. X-Git-Tag: basepoints/gcc-9~5445 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=466e6e8dfcc7f66fdf5d6eca401b091b75cf0b89;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d89943011164..c95dc2830a2d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-08-15 Nathan Sidwell + + * gcc.c (execute): Emit friendlier message if inferior is killed + by an external cause. + 2017-08-15 Richard Biener PR tree-optimization/81790 diff --git a/gcc/gcc.c b/gcc/gcc.c index 987eff55aa63..96152dec8727 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)