ruby-changes:66474
From: Nobuyoshi <ko1@a...>
Date: Mon, 14 Jun 2021 14:12:25 +0900 (JST)
Subject: [ruby-changes:66474] f0f9e77b65 (master): Suppress gcc11 clobbered warning
https://git.ruby-lang.org/ruby.git/commit/?id=f0f9e77b65 From f0f9e77b65990001bd2acb42e1c6b673f6324425 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Mon, 14 Jun 2021 13:49:10 +0900 Subject: Suppress gcc11 clobbered warning --- load.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/load.c b/load.c index d6616fc..b4c73e1 100644 --- a/load.c +++ b/load.c @@ -1047,10 +1047,12 @@ require_internal(rb_execution_context_t *ec, VALUE fname, int exception) https://github.com/ruby/ruby/blob/trunk/load.c#L1047 if ((state = EC_EXEC_TAG()) == TAG_NONE) { long handle; int found; + volatile VALUE found_path; RUBY_DTRACE_HOOK(FIND_REQUIRE_ENTRY, RSTRING_PTR(fname)); - found = search_required(path, &path, rb_feature_p); + found = search_required(path, &found_path, rb_feature_p); RUBY_DTRACE_HOOK(FIND_REQUIRE_RETURN, RSTRING_PTR(fname)); + path = found_path; if (found) { if (!path || !(ftptr = load_lock(RSTRING_PTR(path)))) { -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/