From patchwork Tue Sep 15 15:02:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schulze Frielinghaus X-Patchwork-Id: 1364458 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=ATP4n7r+; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrRMQ2hcQz9sTM for ; Wed, 16 Sep 2020 01:04:01 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 460263972430; Tue, 15 Sep 2020 15:03:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 460263972430 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1600182238; bh=tufymIFwYCdl+E25B8Kcye14TsfigNGpAveQFiPf+pA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ATP4n7r+xSwqnrWGXIX2r1XVEFJRrpfeKZsfos9i9ehE2qCj06VoG4LWxwXKf6bSF fTl64JMY0qw66As+uCPf7h+ozeGi19fiWRbYPYBFJjLIiUk/5JwjReSdN0S6eHgaKa 0C5fRb4QGLVVkdv+yea2Cbk9tgz1g0COCkJ6W5w0= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 7565F3861027 for ; Tue, 15 Sep 2020 15:03:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7565F3861027 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08FF2KkG073271 for ; Tue, 15 Sep 2020 11:03:54 -0400 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 33jxx92by3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 15 Sep 2020 11:03:54 -0400 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 08FEuq9d007196 for ; Tue, 15 Sep 2020 15:03:52 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma05fra.de.ibm.com with ESMTP id 33gny81wyg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 15 Sep 2020 15:03:52 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 08FF3ma010617204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Sep 2020 15:03:48 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 254004C052; Tue, 15 Sep 2020 15:03:49 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 027984C04E; Tue, 15 Sep 2020 15:03:49 +0000 (GMT) Received: from m35lp38.lnxne.boe (unknown [9.152.108.100]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 15 Sep 2020 15:03:48 +0000 (GMT) To: krebbel@linux.ibm.com, gcc-patches@gcc.gnu.org Subject: [PATCH] S/390: Do not turn maybe-uninitialized warnings into errors Date: Tue, 15 Sep 2020 17:02:17 +0200 Message-Id: <20200915150216.1079662-1-stefansf@linux.ibm.com> X-Mailer: git-send-email 2.25.3 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-09-15_11:2020-09-15, 2020-09-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 phishscore=0 bulkscore=0 mlxscore=0 mlxlogscore=999 priorityscore=1501 adultscore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009150122 X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Stefan Schulze Frielinghaus via Gcc-patches From: Stefan Schulze Frielinghaus Reply-To: Stefan Schulze Frielinghaus Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Over the last couple of months quite a few warnings about uninitialized variables were raised while building GCC. A reason why these warnings show up on S/390 only is due to the aggressive inlining settings here. Some of these warnings (2c832ffedf0, b776bdca932, 2786c0221b6, 1657178f59b) could be fixed or in case of a false positive silenced by initializing the corresponding variable. Since the latter reoccurs and while bootstrapping such warnings are turned into errors bootstrapping fails on S/390 consistently. Therefore, for the moment do not turn those warnings into errors. config/ChangeLog: * warnings.m4: Do not turn maybe-uninitialized warnings into errors on S/390. fixincludes/ChangeLog: * configure: Regenerate. gcc/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libcpp/ChangeLog: * configure: Regenerate. libdecnumber/ChangeLog: * configure: Regenerate. --- config/warnings.m4 | 20 ++++++++++++++------ fixincludes/configure | 8 +++++++- gcc/configure | 12 +++++++++--- libcc1/configure | 8 +++++++- libcpp/configure | 8 +++++++- libdecnumber/configure | 8 +++++++- 6 files changed, 51 insertions(+), 13 deletions(-) diff --git a/config/warnings.m4 b/config/warnings.m4 index ce007f9b73e..d977bfb20af 100644 --- a/config/warnings.m4 +++ b/config/warnings.m4 @@ -101,8 +101,10 @@ AC_ARG_ENABLE(werror-always, AS_HELP_STRING([--enable-werror-always], [enable -Werror despite compiler version]), [], [enable_werror_always=no]) -AS_IF([test $enable_werror_always = yes], - [acx_Var="$acx_Var${acx_Var:+ }-Werror"]) +AS_IF([test $enable_werror_always = yes], [dnl + acx_Var="$acx_Var${acx_Var:+ }-Werror" + AS_CASE([$host], [s390*-*-*], + [acx_Var="$acx_Var -Wno-error=maybe-uninitialized"])]) m4_if($1, [manual],, [AS_VAR_PUSHDEF([acx_GCCvers], [acx_cv_prog_cc_gcc_$1_or_newer])dnl AC_CACHE_CHECK([whether $CC is GCC >=$1], acx_GCCvers, @@ -116,7 +118,9 @@ AS_IF([test $enable_werror_always = yes], [AS_VAR_SET(acx_GCCvers, yes)], [AS_VAR_SET(acx_GCCvers, no)])]) AS_IF([test AS_VAR_GET(acx_GCCvers) = yes], - [acx_Var="$acx_Var${acx_Var:+ }-Werror"]) + [acx_Var="$acx_Var${acx_Var:+ }-Werror" + AS_CASE([$host], [s390*-*-*], + [acx_Var="$acx_Var -Wno-error=maybe-uninitialized"])]) AS_VAR_POPDEF([acx_GCCvers])]) m4_popdef([acx_Var])dnl AC_LANG_POP(C) @@ -205,8 +209,10 @@ AC_ARG_ENABLE(werror-always, AS_HELP_STRING([--enable-werror-always], [enable -Werror despite compiler version]), [], [enable_werror_always=no]) -AS_IF([test $enable_werror_always = yes], - [acx_Var="$acx_Var${acx_Var:+ }-Werror"]) +AS_IF([test $enable_werror_always = yes], [dnl + acx_Var="$acx_Var${acx_Var:+ }-Werror" + AS_CASE([$host], [s390*-*-*], + [strict_warn="$strict_warn -Wno-error=maybe-uninitialized"])]) m4_if($1, [manual],, [AS_VAR_PUSHDEF([acx_GXXvers], [acx_cv_prog_cxx_gxx_$1_or_newer])dnl AC_CACHE_CHECK([whether $CXX is G++ >=$1], acx_GXXvers, @@ -220,7 +226,9 @@ AS_IF([test $enable_werror_always = yes], [AS_VAR_SET(acx_GXXvers, yes)], [AS_VAR_SET(acx_GXXvers, no)])]) AS_IF([test AS_VAR_GET(acx_GXXvers) = yes], - [acx_Var="$acx_Var${acx_Var:+ }-Werror"]) + [acx_Var="$acx_Var${acx_Var:+ }-Werror" + AS_CASE([$host], [s390*-*-*], + [acx_Var="$acx_Var -Wno-error=maybe-uninitialized"])]) AS_VAR_POPDEF([acx_GXXvers])]) m4_popdef([acx_Var])dnl AC_LANG_POP(C++) diff --git a/fixincludes/configure b/fixincludes/configure index 6e2d67b655b..e0d679cc18e 100755 --- a/fixincludes/configure +++ b/fixincludes/configure @@ -4753,7 +4753,13 @@ else fi if test $enable_werror_always = yes; then : - WERROR="$WERROR${WERROR:+ }-Werror" + WERROR="$WERROR${WERROR:+ }-Werror" + case $host in #( + s390*-*-*) : + WERROR="$WERROR -Wno-error=maybe-uninitialized" ;; #( + *) : + ;; +esac fi ac_ext=c diff --git a/gcc/configure b/gcc/configure index 0a09777dd42..ea03581537a 100755 --- a/gcc/configure +++ b/gcc/configure @@ -7064,7 +7064,13 @@ else fi if test $enable_werror_always = yes; then : - strict_warn="$strict_warn${strict_warn:+ }-Werror" + strict_warn="$strict_warn${strict_warn:+ }-Werror" + case $host in #( + s390*-*-*) : + strict_warn="$strict_warn -Wno-error=maybe-uninitialized" ;; #( + *) : + ;; +esac fi ac_ext=cpp @@ -19013,7 +19019,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19016 "configure" +#line 19022 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19119,7 +19125,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19122 "configure" +#line 19128 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libcc1/configure b/libcc1/configure index 3610219ba65..e95274d0d46 100755 --- a/libcc1/configure +++ b/libcc1/configure @@ -14835,7 +14835,13 @@ else fi if test $enable_werror_always = yes; then : - WERROR="$WERROR${WERROR:+ }-Werror" + WERROR="$WERROR${WERROR:+ }-Werror" + case $host in #( + s390*-*-*) : + WERROR="$WERROR -Wno-error=maybe-uninitialized" ;; #( + *) : + ;; +esac fi ac_ext=c diff --git a/libcpp/configure b/libcpp/configure index 7e28606f605..db378c363ee 100755 --- a/libcpp/configure +++ b/libcpp/configure @@ -5142,7 +5142,13 @@ else fi if test $enable_werror_always = yes; then : - WERROR="$WERROR${WERROR:+ }-Werror" + WERROR="$WERROR${WERROR:+ }-Werror" + case $host in #( + s390*-*-*) : + WERROR="$WERROR -Wno-error=maybe-uninitialized" ;; #( + *) : + ;; +esac fi ac_ext=c diff --git a/libdecnumber/configure b/libdecnumber/configure index 6b62f8ba665..7035aef58dd 100755 --- a/libdecnumber/configure +++ b/libdecnumber/configure @@ -3661,7 +3661,13 @@ else fi if test $enable_werror_always = yes; then : - WERROR="$WERROR${WERROR:+ }-Werror" + WERROR="$WERROR${WERROR:+ }-Werror" + case $host in #( + s390*-*-*) : + WERROR="$WERROR -Wno-error=maybe-uninitialized" ;; #( + *) : + ;; +esac fi ac_ext=c