From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2136) id 467E1385802E; Sat, 29 May 2021 05:45:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 467E1385802E MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Aldy Hernandez To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-1118] Fix i686 bootstrap by temporarily disabling exporting of global ranges. X-Act-Checkin: gcc X-Git-Author: Aldy Hernandez X-Git-Refname: refs/heads/master X-Git-Oldrev: 48166757dcf46d92cf1795dd7333dda7030179c8 X-Git-Newrev: 2364b584552208ce715fa4fd44c510b7e5210d1e Message-Id: <20210529054532.467E1385802E@sourceware.org> Date: Sat, 29 May 2021 05:45:32 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 May 2021 05:45:32 -0000 https://gcc.gnu.org/g:2364b584552208ce715fa4fd44c510b7e5210d1e commit r12-1118-g2364b584552208ce715fa4fd44c510b7e5210d1e Author: Aldy Hernandez Date: Fri May 28 22:17:51 2021 +0200 Fix i686 bootstrap by temporarily disabling exporting of global ranges. The patch converting evrp to the get_range_query(fun) API broke i686 bootstrap (commit 57bf37515). The problem seems to be in a subsequent pass that has more up-to-date global ranges. I won't be able to look at this until next week, so I am reverting the problematic bit of the patch-- the exporting of global ranges once evrp finishes. The use of the new API remains. Reverting the behavior shouldn't be a problem as we never used to export global ranges from ranger. This was new behavior in the patchset. Tested on x86-64 Linux with a bootstrap and regtest, and on x86-32 with only a bootstrap and the configure flags from the PR: --enable-clocale=gnu --with-system-zlib --with-demangler-in-ld --with-fpmath=sse --enable-languages=c,c++ --enable-cet i686-linux --enable-bootstrap --with-fpmath=sse --disable-libcc1 --disable-libcilkrts --disable-libsanitizer gcc/ChangeLog: PR tree-optimization/100787 * gimple-ssa-evrp.c: Disable exporting of global ranges. gcc/testsuite/ChangeLog: * gcc.dg/Wstringop-overflow-55.c: * gcc.dg/pr80776-1.c: Diff: --- gcc/gimple-ssa-evrp.c | 6 ++++-- gcc/testsuite/gcc.dg/Wstringop-overflow-55.c | 8 ++++---- gcc/testsuite/gcc.dg/pr80776-1.c | 4 +++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/gcc/gimple-ssa-evrp.c b/gcc/gimple-ssa-evrp.c index 118d10365a0..f1eea206afd 100644 --- a/gcc/gimple-ssa-evrp.c +++ b/gcc/gimple-ssa-evrp.c @@ -127,7 +127,8 @@ public: if (dump_file && (dump_flags & TDF_DETAILS)) m_ranger->dump (dump_file); - m_ranger->export_global_ranges (); + // FIXME: Do not export ranges until PR100787 is fixed. + //m_ranger->export_global_ranges (); disable_ranger (cfun); } @@ -193,7 +194,8 @@ public: if (dump_file && (dump_flags & TDF_DETAILS)) m_ranger->dump (dump_file); - m_ranger->export_global_ranges (); + // FIXME: Do not export ranges until PR100787 is fixed. + //m_ranger->export_global_ranges (); disable_ranger (cfun); } diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-55.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-55.c index c3c2dbe06dd..5f83af7c57f 100644 --- a/gcc/testsuite/gcc.dg/Wstringop-overflow-55.c +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-55.c @@ -66,7 +66,7 @@ void warn_ptrdiff_anti_range_add (ptrdiff_t i) { i |= 1; - char ca5[5]; // { dg-message "at offset \\\[1, 5]" "pr?????" } + char ca5[5]; // { dg-message "at offset \\\[1, 5]" "pr?????" { xfail *-*-* } } char *p0 = ca5; // offset char *p1 = p0 + i; // 1-5 char *p2 = p1 + i; // 2-5 @@ -74,7 +74,7 @@ void warn_ptrdiff_anti_range_add (ptrdiff_t i) char *p4 = p3 + i; // 4-5 char *p5 = p4 + i; // 5 - memset (p5, 0, 5); // { dg-warning "writing 5 bytes into a region of size" "pr?????" } + memset (p5, 0, 5); // { dg-warning "writing 5 bytes into a region of size 0" "pr?????" { xfail *-*-* } } sink (p0, p1, p2, p3, p4, p5); } @@ -83,7 +83,7 @@ void warn_int_anti_range (int i) { i |= 1; - char ca5[5]; // { dg-message "at offset \\\[1, 5]" "pr?????" } + char ca5[5]; // { dg-message "at offset \\\[1, 5]" "pr?????" { xfail *-*-* } } char *p0 = ca5; // offset char *p1 = p0 + i; // 1-5 char *p2 = p1 + i; // 2-5 @@ -91,7 +91,7 @@ void warn_int_anti_range (int i) char *p4 = p3 + i; // 4-5 char *p5 = p4 + i; // 5 - memset (p5, 0, 5); // { dg-warning "writing 5 bytes into a region of size" "pr?????" } + memset (p5, 0, 5); // { dg-warning "writing 5 bytes into a region of size 0" "pr?????" { xfail *-*-* } } sink (p0, p1, p2, p3, p4, p5); } diff --git a/gcc/testsuite/gcc.dg/pr80776-1.c b/gcc/testsuite/gcc.dg/pr80776-1.c index f3a120b6744..af41c0c2ffa 100644 --- a/gcc/testsuite/gcc.dg/pr80776-1.c +++ b/gcc/testsuite/gcc.dg/pr80776-1.c @@ -17,5 +17,7 @@ Foo (void) __builtin_unreachable (); if (! (0 <= i && i <= 999999)) __builtin_unreachable (); - sprintf (number, "%d", i); /* { dg-bogus "writing" "" } */ + /* The correctness bits for [E]VRP cannot handle chained conditionals + when deciding to ignore a unreachable branch for setting SSA range info. */ + sprintf (number, "%d", i); /* { dg-bogus "writing" "" { xfail *-*-* } } */ }