Started by user snail Running as SYSTEM [EnvInject] - Loading node environment variables. Building remotely on docker-jenkins-agent in workspace /home/jenkins/agent/workspace/gcc-patch [WS-CLEANUP] Deleting project workspace... [WS-CLEANUP] Deferred wipeout is used... [WS-CLEANUP] Done The recommended git tool is: NONE using credential 0adb5fc7-caa2-429d-97d2-c7fa2fa1d884 Cloning the remote Git repository Using shallow clone with depth 1 Avoid fetching tags Cloning repository git@github.com:wangliu-iscas/gcc-patch.git/ > git init /home/jenkins/agent/workspace/gcc-patch # timeout=10 Fetching upstream changes from git@github.com:wangliu-iscas/gcc-patch.git/ > git --version # timeout=10 > git --version # 'git version 2.37.2' using GIT_SSH to set credentials patchwork github wangliu-iscas git ssh key Verifying host key using known hosts file, will automatically accept unseen keys > git fetch --no-tags --force --progress --depth=1 -- git@github.com:wangliu-iscas/gcc-patch.git/ +refs/heads/*:refs/remotes/origin/* # timeout=10 > git config remote.origin.url git@github.com:wangliu-iscas/gcc-patch.git/ # timeout=10 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 Avoid second fetch > git rev-parse refs/remotes/origin/master^{commit} # timeout=10 Checking out Revision 8efc38347a7444dde3fb173f0f2c59a60b7db53d (refs/remotes/origin/master) > git config core.sparsecheckout # timeout=10 > git checkout -f 8efc38347a7444dde3fb173f0f2c59a60b7db53d # timeout=10 Commit message: "Implement range-op entry for __builtin_copysign." > git rev-list --no-walk 8efc38347a7444dde3fb173f0f2c59a60b7db53d # timeout=10 [EnvInject] - Mask passwords that will be passed as build parameters. [EnvInject] - Executing scripts and injecting environment variables after the SCM step. [EnvInject] - Injecting as environment variables the properties content GITHUB_REPO=https://github.com/wangliu-iscas/ PATCHWORK_URL=https://patchwork.plctlab.org [EnvInject] - Variables injected successfully. [gcc-patch] $ /usr/bin/env bash /tmp/jenkins12493228557298496399.sh + git config pull.rebase false + git fetch origin master From github.com:wangliu-iscas/gcc-patch * branch master -> FETCH_HEAD + git checkout master Switched to a new branch 'master' branch 'master' set up to track 'origin/master'. + git pull origin master From github.com:wangliu-iscas/gcc-patch * branch master -> FETCH_HEAD Already up to date. + git fetch origin upstream-master From github.com:wangliu-iscas/gcc-patch * branch upstream-master -> FETCH_HEAD + git checkout upstream-master Switched to a new branch 'upstream-master' branch 'upstream-master' set up to track 'origin/upstream-master'. + git remote add upstream https://github.com/gcc-mirror/gcc.git + git pull upstream master From https://github.com/gcc-mirror/gcc * branch master -> FETCH_HEAD * [new branch] master -> upstream/master Already up to date. + git push -u origin upstream-master Everything up-to-date branch 'upstream-master' set up to track 'origin/upstream-master'. + git checkout master Switched to branch 'master' Your branch is up to date with 'origin/master'. + git merge upstream-master Already up to date. + git push -u origin master Everything up-to-date branch 'master' set up to track 'origin/master'. + branchname=series1958-patch2714 ++ git branch -a ++ grep 'series1958-patch2714$' + checkbranch= + checkbranchresult=null + '[' null = series1958-patch2714 ']' + git checkout -b series1958-patch2714 Switched to a new branch 'series1958-patch2714' ++ curl https://patchwork.plctlab.org/api/1.2/series/1958/ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 1386 100 1386 0 0 44709 0 --:--:-- --:--:-- --:--:-- 44709 + series_response='{"id":1958,"url":"https://patchwork.plctlab.org/api/1.2/series/1958/","web_url":"https://patchwork.plctlab.org/project/gcc-patch/list/?series=1958","project":{"id":1,"url":"https://patchwork.plctlab.org/api/1.2/projects/1/","name":"gcc-patch","link_name":"gcc-patch","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":"https://gcc.gnu.org/mailman/listinfo/gcc-patches","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"name":"[committed] libstdc++: Simplify print_raw function for debug assertions","date":"2022-10-14T14:36:02","submitter":{"id":67,"url":"https://patchwork.plctlab.org/api/1.2/people/67/","name":"Jonathan Wakely","email":"jwakely@redhat.com"},"version":1,"total":1,"received_total":1,"received_all":true,"mbox":"https://patchwork.plctlab.org/series/1958/mbox/","cover_letter":null,"patches":[{"id":2714,"url":"https://patchwork.plctlab.org/api/1.2/patches/2714/","web_url":"https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/","msgid":"<20221014143602.2512815-1-jwakely@redhat.com>","list_archive_url":null,"date":"2022-10-14T14:36:02","name":"[committed] libstdc++: Simplify print_raw function for debug assertions","mbox":"https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/"}]}' ++ jq '.patches[] | (.id|tostring) + "," + .mbox' ++ echo '{"id":1958,"url":"https://patchwork.plctlab.org/api/1.2/series/1958/","web_url":"https://patchwork.plctlab.org/project/gcc-patch/list/?series=1958","project":{"id":1,"url":"https://patchwork.plctlab.org/api/1.2/projects/1/","name":"gcc-patch","link_name":"gcc-patch","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":"https://gcc.gnu.org/mailman/listinfo/gcc-patches","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"name":"[committed] libstdc++: Simplify print_raw function for debug assertions","date":"2022-10-14T14:36:02","submitter":{"id":67,"url":"https://patchwork.plctlab.org/api/1.2/people/67/","name":"Jonathan Wakely","email":"jwakely@redhat.com"},"version":1,"total":1,"received_total":1,"received_all":true,"mbox":"https://patchwork.plctlab.org/series/1958/mbox/","cover_letter":null,"patches":[{"id":2714,"url":"https://patchwork.plctlab.org/api/1.2/patches/2714/","web_url":"https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/","msgid":"<20221014143602.2512815-1-jwakely@redhat.com>","list_archive_url":null,"date":"2022-10-14T14:36:02","name":"[committed] libstdc++: Simplify print_raw function for debug assertions","mbox":"https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/"}]}' + patchid_patchurl='"2714,https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/"' + echo '"2714,https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/"' + IFS=, + read -r series_patch_id series_patch_url ++ echo '"2714' ++ sed 's/"//g' + series_patch_id=2714 ++ echo 'https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/"' ++ sed 's/"//g' + series_patch_url=https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/ ++ git rev-parse HEAD + commitid_before=8efc38347a7444dde3fb173f0f2c59a60b7db53d + eval '+++ declare -p bout bret declare -- bout="Applying: libstdc++: Simplify print_raw function for debug assertions Using index info to reconstruct a base tree... M libstdc++-v3/src/c++11/debug.cc Falling back to patching base and 3-way merge... No changes -- Patch already applied." declare -- bret="0" ++ berr='\''++++ git_am https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/ ++++ patch_url=https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/ ++++ curl https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/ ++++ git am -3 --empty=drop % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 9538 100 9538 0 0 211k 0 --:--:-- --:--:-- --:--:-- 211k +++ bout='\''\'\'''\''Applying: libstdc++: Simplify print_raw function for debug assertions Using index info to reconstruct a base tree... M libstdc++-v3/src/c++11/debug.cc Falling back to patching base and 3-way merge... No changes -- Patch already applied.'\''\'\'''\'' +++ bret=0'\'' ++ declare -p berr declare -- berr="++++ git_am https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/ ++++ patch_url=https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/ ++++ curl https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/ ++++ git am -3 --empty=drop % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 9538 100 9538 0 0 211k 0 --:--:-- --:--:-- --:--:-- 211k +++ bout='\''Applying: libstdc++: Simplify print_raw function for debug assertions Using index info to reconstruct a base tree... M libstdc++-v3/src/c++11/debug.cc Falling back to patching base and 3-way merge... No changes -- Patch already applied.'\'' +++ bret=0"' ++ +++ declare -p bout bret /tmp/jenkins12493228557298496399.sh: line 85: +++: command not found ++ declare -- 'bout=Applying: libstdc++: Simplify print_raw function for debug assertions Using index info to reconstruct a base tree... M libstdc++-v3/src/c++11/debug.cc Falling back to patching base and 3-way merge... No changes -- Patch already applied.' ++ declare -- bret=0 ++ ++ 'berr=++++ git_am https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/ ++++ patch_url=https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/ ++++ curl https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/ ++++ git am -3 --empty=drop % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 9538 100 9538 0 0 211k 0 --:--:-- --:--:-- --:--:-- 211k +++ bout='\''Applying: libstdc++: Simplify print_raw function for debug assertions Using index info to reconstruct a base tree... M libstdc++-v3/src/c++11/debug.cc Falling back to patching base and 3-way merge... No changes -- Patch already applied.'\'' +++ bret=0' /tmp/jenkins12493228557298496399.sh: line 104: ++: command not found ++ ++ declare -p berr /tmp/jenkins12493228557298496399.sh: line 105: ++: command not found ++ declare -- 'berr=++++ git_am https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/ ++++ patch_url=https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/ ++++ curl https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/ ++++ git am -3 --empty=drop % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 9538 100 9538 0 0 211k 0 --:--:-- --:--:-- --:--:-- 211k +++ bout='\''Applying: libstdc++: Simplify print_raw function for debug assertions Using index info to reconstruct a base tree... M libstdc++-v3/src/c++11/debug.cc Falling back to patching base and 3-way merge... No changes -- Patch already applied.'\'' +++ bret=0' ++ git rev-parse HEAD + commitid_after=8efc38347a7444dde3fb173f0f2c59a60b7db53d + '[' 0 = 0 ']' + '[' 8efc38347a7444dde3fb173f0f2c59a60b7db53d = 8efc38347a7444dde3fb173f0f2c59a60b7db53d ']' + submit_check warning 'Repeat Merge' https://patchwork.plctlab.org/jenkins/job/gcc-patch/1302/consoleText 'Git am fail log' + check_state=warning + patch_state='Repeat Merge' + repo_url=https://patchwork.plctlab.org/jenkins/job/gcc-patch/1302/consoleText + DESCRIPTION='Git am fail log' + curl -X POST -H 'Authorization: Token [*******]' -F state=warning -F target_url=https://patchwork.plctlab.org/jenkins/job/gcc-patch/1302/consoleText -F context=gcc-patch-check -F 'description=Git am fail log' https://patchwork.plctlab.org/api/patches/2714/checks/ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 962 100 422 100 540 11105 14210 --:--:-- --:--:-- --:--:-- 25315 {"id":979,"url":"https://patchwork.plctlab.org/api/patches/2714/checks/979/","user":{"id":1,"url":"https://patchwork.plctlab.org/api/users/1/","username":"snail","first_name":"","last_name":"","email":"wangliu@iscas.ac.cn"},"date":"2022-10-14T17:20:41.739961","state":"warning","target_url":"https://patchwork.plctlab.org/jenkins/job/gcc-patch/1302/consoleText","context":"gcc-patch-check","description":"Git am fail log"}+ curl -X PATCH -H 'Authorization: Token [*******]' -F 'state=Repeat Merge' https://patchwork.plctlab.org/api/1.2/patches/2714/ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0{"id":2714,"url":"https://patchwork.plctlab.org/api/1.2/patches/2714/","web_url":"https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/","project":{"id":1,"url":"https://patchwork.plctlab.org/api/1.2/projects/1/","name":"gcc-patch","link_name":"gcc-patch","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":"https://gcc.gnu.org/mailman/listinfo/gcc-patches","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20221014143602.2512815-1-jwakely@redhat.com>","list_archive_url":null,"date":"2022-10-14T14:36:02","name":"[committed] libstdc++: Simplify print_raw function for debug assertions","commit_ref":null,"pull_url":null,"state":"repeat-merge","archived":false,"hash":"828929bc8a98566922c1ca251f79d24fe39164ef","submitter":{"id":67,"url":"https://patchwork.plctlab.org/api/1.2/people/67/","name":"Jonathan Wakely","email":"jwakely@redhat.com"},"delegate":null,"mbox":"https://patchwork.plctlab.org/project/gcc-patch/patch/20221014143602.2512815-1-jwakely@redhat.com/mbox/","series":[{"id":1958,"url":"https://patchwork.plctlab.org/api/1.2/series/1958/","web_url":"https://patchwork.plctlab.org/project/gcc-patch/list/?series=1958","date":"2022-10-14T14:36:02","name":"[committed] libstdc++: Simplify print_raw function for debug assertions","version":1,"mbox":"https://patchwork.plctlab.org/series/1958/mbox/"}],"comments":"https://patchwork.plctlab.org/api/patches/2714/comments/","check":"warning","checks":"https://patchwork.plctlab.org/api/patches/2714/checks/","tags":{},"headers":{"Return-Path":"","Delivered-To":["ouuuleilei@gmail.com","gcc-patches@gcc.gnu.org"],"Received":["by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp216601wrs;\n Fri, 14 Oct 2022 07:37:08 -0700 (PDT)","from sourceware.org (server2.sourceware.org.\n [2620:52:3:1:0:246e:9693:128c])\n by mx.google.com with ESMTPS id\n wv2-20020a170907080200b0078dc3cb8b48si2740696ejb.625.2022.10.14.07.37.08\n for \n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 14 Oct 2022 07:37:08 -0700 (PDT)","from server2.sourceware.org (localhost [IPv6:::1])\n\tby sourceware.org (Postfix) with ESMTP id 93B803850208\n\tfor ; Fri, 14 Oct 2022 14:36:57 +0000 (GMT)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by sourceware.org (Postfix) with ESMTPS id EC8B038582B7\n for ; Fri, 14 Oct 2022 14:36:06 +0000 (GMT)","from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-385-IIeC7QgBMWmmw0sg8SU8Rg-1; Fri, 14 Oct 2022 10:36:03 -0400","from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com\n [10.11.54.7])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 27DC5811E75;\n Fri, 14 Oct 2022 14:36:03 +0000 (UTC)","from localhost (unknown [10.33.36.64])\n by smtp.corp.redhat.com (Postfix) with ESMTP id E47F9140215B;\n Fri, 14 Oct 2022 14:36:02 +0000 (UTC)"],"X-Google-Smtp-Source":"\n AMsMyM7vV5bm26Imqziep6JVaUpG/iXYZI6YbhmrcJzfFHgJXYyfY6JAPNtt4xGlJXYG9AzA94d1","X-Received":"by 2002:a17:907:8688:b0:78b:eaa5:8a9d with SMTP id\n qa8-20020a170907868800b0078beaa58a9dmr3896321ejc.509.1665758228421;\n Fri, 14 Oct 2022 07:37:08 -0700 (PDT)","ARC-Seal":"i=1; a=rsa-sha256; t=1665758228; cv=none;\n d=google.com; s=arc-20160816;\n b=DneohG23taXh+W9klEna/330sryZTseiT3sTtQvwHnl4y2sfxN1kIu2cvbynVfkzLY\n Dzf/o1Bwo6M8z3js5+XGYWWVMEGNpRb0hxGlBDBxC1AuhBbHuat4upEbSRfYc7l4SVUg\n 7doltUHs4kCC33M4pkxN/gn1ItrVJrmEimPkazqiAY7XP83BrShdiVrEerT/VwX6zVON\n I0o/fm/mpfjtEVLgLmTvFdRLrt1S1G3YM0KS6VG2fLX+sFF8yb1MIR7DKbfl2VwT7lcf\n yw5rlIJc5wWJoGFH7Vjwzgi9F7PzGg/TvXPUlTcmwRpYjcp 71 11429 71 8028 100 152 118k 2303 --:--:-- --:--:-- --:--:-- 119kVINQgYKLUa1CPrRZgUVQq\n UKyQ==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n s=arc-20160816;\n h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post\n :list-archive:list-unsubscribe:list-id:precedence\n :content-transfer-encoding:mime-version:message-id:date:subject:to\n :dmarc-filter:delivered-to:dkim-signature:dkim-filter;\n bh=rp2wNvQHOoCwrSTLtQb72IFG82FBs5TJVTZYI811M0A=;\n b=hSBgOTkUuXIebWSqrRbOmeubahoFW+NFajJSCN9hP9la29ut21cF/WRlxT7LwAr/0J\n 1cDcSJTkiNC2iWlVQm1gpWBK0HTFBfRTzzeBC6+0d1SMolDAw8kVplnVsl1qzRETD8hM\n N+u/l8tvDJwB/gEn6VUzOAEDZkvuRvtsk+xKyNIVxa4ZxkNX2IXk27UkkX1FndvS1W8k\n wzqpTYitNxuWSWjsRYQW1cetqv5h1DRb4QmZMXC+b+D9jU0+vxyvhRuztz5WqjSkl1RO\n wFCPgFwjrCDFQq4Hpv05YVF3vXSDUfFk8ZsrxbBs/DkBjjO1qoyldqQv049oDKjQc9DU\n buQQ==","ARC-Authentication-Results":"i=1; mx.google.com;\n dkim=pass header.i=@gcc.gnu.org header.s=default header.b=NUrVnugj;\n spf=pass (google.com: domain of\n gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates\n 2620:52:3:1:0:246e:9693:128c as permitted sender)\n smtp.mailfrom=\"gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org\";\n dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org","Received-SPF":"pass (google.com: domain of\n gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates\n 2620:52:3:1:0:246e:9693:128c as permitted sender)\n client-ip=2620:52:3:1:0:246e:9693:128c;","Authentication-Results":"mx.google.com;\n dkim=pass header.i=@gcc.gnu.org header.s=default header.b=NUrVnugj;\n spf=pass (google.com: domain of\n gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates\n 2620:52:3:1:0:246e:9693:128c as permitted sender)\n smtp.mailfrom=\"gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org\";\n dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org","DKIM-Filter":"OpenDKIM Filter v2.11.0 sourceware.org 93B803850208","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org;\n\ts=default; t=1665758217;\n\tbh=rp2wNvQHOoCwrSTLtQb72IFG82FBs5TJVTZYI811M0A=;\n\th=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\t List-Help:List-Subscribe:From:Reply-To:From;\n\tb=NUrVnugjZhynXz48OYkgWVxfHGNmvb2RjDQ9l/7HnSTVtTy7b7EuP/fQ9i7qdh8fd\n\t DL1tIWT9oo4w172tqJNOFEvZbU7ZGSDsyiepBJ/tBTJB/IqCbFjcKWj9Js964Jz4Ab\n\t +0wsKnTM6Zd+dWJiHxP2+DW2XmvB3i1P6OIEr7mE=","X-Original-To":"gcc-patches@gcc.gnu.org","DMARC-Filter":"OpenDMARC Filter v1.4.1 sourceware.org EC8B038582B7","X-MC-Unique":"IIeC7QgBMWmmw0sg8SU8Rg-1","To":"libstdc++@gcc.gnu.org,\n\tgcc-patches@gcc.gnu.org","Subject":"[committed] libstdc++: Simplify print_raw function for debug\n assertions","Date":"Fri, 14 Oct 2022 15:36:02 +0100","Message-Id":"<20221014143602.2512815-1-jwakely@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.1 on 10.11.54.7","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","Content-Transfer-Encoding":"8bit","X-Spam-Status":"No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH,\n DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0,\n RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE,\n TXREP autolearn=unavailable autolearn_force=no version=3.4.6","X-Spam-Checker-Version":"SpamAssassin 3.4.6 (2021-04-09) on\n 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":",\n ","List-Archive":"","List-Post":"","List-Help":"","List-Subscribe":",\n ","From":"Jonathan Wakely via Gcc-patches ","Reply-To":"Jonathan Wakely ","Errors-To":"gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org","Sender":"\"Gcc-patches\" ","X-getmail-retrieved-from-mailbox":"=?utf-8?q?INBOX?=","X-GMAIL-THRID":"=?utf-8?q?1746674099692916506?=","X-GMAIL-MSGID":"=?utf-8?q?1746674099692916506?="},"content":"Tested powerpc64le-linux. Pushed to trunk.\n\n-- >8 --\n\nReplace two uses of print_raw where it's clearer to just use fprintf\ndirectly. Then the only remaining use of print_raw is as the print_func\nargument of pretty_print. When called by pretty_print the count is\neither a positive integer or -1, so we can simplify print_raw itself.\n\nRemove the default argument, because it's never used. Remove the check\nfor nbc == 0, which never happens (but would be harmless if it did).\nReplace the conditional expression with a single call to fprintf, using\nINT_MAX as the maximum length.\n\nlibstdc++-v3/ChangeLog:\n\n\t* src/c++11/debug.cc (print_raw): Simplify.\n\t(print_word): Print indentation by calling fprintf directly.\n\t(_Error_formatter::_M_error): Print unindented string by calling\n\tfprintf directly.\n---\n libstdc++-v3/src/c++11/debug.cc | 21 ++++++++-------------\n 1 file changed, 8 insertions(+), 13 deletions(-)","diff":"diff --git a/libstdc++-v3/src/c++11/debug.cc b/libstdc++-v3/src/c++11/debug.cc\nindex abc4124c01e..f2b25fbefce 100644\n--- a/libstdc++-v3/src/c++11/debug.cc\n+++ b/libstdc++-v3/src/c++11/debug.cc\n@@ -37,6 +37,7 @@\n #include \t// for std::abort\n #include \t// for std::isspace.\n #include \t// for std::strstr.\n+#include \t// for INT_MAX\n \n #include \t// for std::min.\n \n@@ -609,14 +610,11 @@ namespace\n { print_word(ctx, word, Length - 1); }\n \n void\n- print_raw(PrintContext& ctx, const char* str, ptrdiff_t nbc = -1)\n+ print_raw(PrintContext& ctx, const char* str, ptrdiff_t nbc)\n {\n- if (nbc != 0)\n- {\n-\tctx._M_column += (nbc > 0)\n-\t ? fprintf(stderr, \"%.*s\", (int)nbc, str)\n-\t : fprintf(stderr, \"%s\", str);\n- }\n+ if (nbc == -1)\n+ nbc = INT_MAX;\n+ ctx._M_column += fprintf(stderr, \"%.*s\", (int)nbc, str);\n }\n \n void\n@@ -645,12 +643,9 @@ namespace\n \t|| (ctx._M_column + visual_length < ctx._M_max_length)\n \t|| (visual_length >= ctx._M_max_length && ctx._M_column == 1))\n {\n-\t// If this isn't the first line, indent\n+\t// If this isn't the first line, indent.\n \tif (ctx._M_column == 1 && !ctx._M_first_line)\n-\t {\n-\t const char spacing[PrintContext::_S_indent + 1] = \" \";\n-\t print_raw(ctx, spacing, PrintContext::_S_indent);\n-\t }\n+\t ctx._M_column += fprintf(stderr, \"%*c\", PrintContext::_S_indent, ' ');\n \n \tint written = fprintf(stderr, \"%.*s\", (int)length, word);\n \n@@ -1166,7 +1161,7 @@ namespace __gnu_debug\n PrintContext ctx;\n if (_M_file)\n {\n-\tprint_raw(ctx, _M_file);\n+\tctx._M_column += fprintf(stderr, \"%s\", _M_file);\n \tprint_literal(ctx, \":\");\n \tgo_to_next_line = true;\n }\n","prefixes":["committed"]}+ exit 1 Build step 'Execute shell' marked build as failure Finished: FAILURE