diff --git a/gcc/integrate.c b/gcc/integrate.c index 308b7babd40..a41e9b6df15 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -164,6 +164,10 @@ function_cannot_inline_p (fndecl) if (forced_labels) return "function with label addresses used in initializers cannot inline"; + /* We cannot inline a nested function that jumps to a nonlocal label. */ + if (current_function_has_nonlocal_goto) + return "function with nonlocal goto cannot be inline"; + return 0; }