Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2194771/?format=api
{ "id": 2194771, "url": "http://patchwork.ozlabs.org/api/patches/2194771/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260209204132.1397967-1-jwakely@redhat.com/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api", "name": "GNU Compiler Collection", "link_name": "gcc", "list_id": "gcc-patches.gcc.gnu.org", "list_email": "gcc-patches@gcc.gnu.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260209204132.1397967-1-jwakely@redhat.com>", "list_archive_url": null, "date": "2026-02-09T15:54:20", "name": "[1/3] libstdc++: Improve tests for std::regex_traits::lookup_classname [PR124015]", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "212f6782eceed4de6039ebde81cefe73b91d11d4", "submitter": { "id": 48004, "url": "http://patchwork.ozlabs.org/api/people/48004/?format=api", "name": "Jonathan Wakely", "email": "jwakely@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260209204132.1397967-1-jwakely@redhat.com/mbox/", "series": [ { "id": 491567, "url": "http://patchwork.ozlabs.org/api/series/491567/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=491567", "date": "2026-02-09T15:54:21", "name": "[1/3] libstdc++: Improve tests for std::regex_traits::lookup_classname [PR124015]", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/491567/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2194771/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2194771/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=aetfoGaM;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=aetfoGaM", "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com", "sourceware.org; spf=pass smtp.mailfrom=redhat.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.129.124" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4f8xWw30dXz1xwG\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Feb 2026 07:44:44 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 44D084CF304A\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 9 Feb 2026 20:44:37 +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 ESMTP id CB1594CF3048\n for <gcc-patches@gcc.gnu.org>; Mon, 9 Feb 2026 20:41:39 +0000 (GMT)", "from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-177-sIDUArUYOa6hAYItLgVpmg-1; Mon,\n 09 Feb 2026 15:41:36 -0500", "from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 267971956096; Mon, 9 Feb 2026 20:41:35 +0000 (UTC)", "from zen.kayari.org (unknown [10.45.226.222])\n by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id DD6B61800464; Mon, 9 Feb 2026 20:41:33 +0000 (UTC)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 44D084CF304A", "OpenDKIM Filter v2.11.0 sourceware.org CB1594CF3048" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org CB1594CF3048", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org CB1594CF3048", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770669699; cv=none;\n b=pEiSLavnGkZDYg952BIfflMrLrPw7GZdvEq7QSJJ8UmNXtjHNqBjDfdom6rG1K+iJs7ml+VxsQS5zbT5U8vX5WOb7a21cvkQtI8yTgBxt/fofk8I4YJRtMToYW2LsQlhfVz01ZeLYzVUPIELfaeLgLKjw/fZbBet6fBooIb1umo=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1770669699; c=relaxed/simple;\n bh=jXXo0KGrVd9PiAnO9FY7lb7/nvMMbSn6R5g5+ff6pAw=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=KWhiSgbrqnsCCcGGvcAkVKxMnmytoBrjxl8bTgp5kRjJUu7KNzh6hR2Zr599YUJ6kqfAPhOOnKakPGWXxss5kszitY7aEn5pYj96SGAZGfVP//J7wfjdYutW1X711UEgAhoRzXTDWYrc60FOmYmugft0Shho1neXyKRQjcaZqHw=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1770669699;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=CNHafeC3GSH2wRzbe5TVLDe0XvkQXuZeU9eX4AX55XY=;\n b=aetfoGaMUbqIrc4GqYJv7lYwH+BY1b/ya1OhRvnl39vKz54IWolIeElxFzF2R4/YInKtmu\n 34m8aO47Hxyt2VNs9gaMRr23YDy8ENeneNhCu93I2Vz/GmggA5d6TnvQ/NtWAJVj/SpDoL\n WAdf6GZWxyo8AW+ZYOLa51gwqmEt+qo=", "X-MC-Unique": "sIDUArUYOa6hAYItLgVpmg-1", "X-Mimecast-MFC-AGG-ID": "sIDUArUYOa6hAYItLgVpmg_1770669695", "From": "Jonathan Wakely <jwakely@redhat.com>", "To": "gcc-patches@gcc.gnu.org,\n\tlibstdc++@gcc.gnu.org", "Subject": "[PATCH 1/3] libstdc++: Improve tests for\n std::regex_traits::lookup_classname [PR124015]", "Date": "Mon, 9 Feb 2026 15:54:20 +0000", "Message-ID": "<20260209204132.1397967-1-jwakely@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.111", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "8Q7qfDWYxKOGRjkSd8N4H1WeQn2wXryrJppP-QjsLxo_1770669695", "X-Mimecast-Originator": "redhat.com", "Content-Type": "text/plain", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "gcc-patches@gcc.gnu.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Gcc-patches mailing list <gcc-patches.gcc.gnu.org>", "List-Unsubscribe": "<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>", "List-Archive": "<https://gcc.gnu.org/pipermail/gcc-patches/>", "List-Post": "<mailto:gcc-patches@gcc.gnu.org>", "List-Help": "<mailto:gcc-patches-request@gcc.gnu.org?subject=help>", "List-Subscribe": "<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>", "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org" }, "content": "libstdc++-v3/ChangeLog:\n\n\tPR libstdc++/124015\n\t* testsuite/28_regex/traits/char/lookup_classname.cc: Check for\n\tcorrect result for unrecognized classname. Check that lookup is\n\tcase insensitive. Check that all required classnames are\n\trecognized. Check that icase flag only affects \"lower\" and\n\t\"upper\".\n---\n\nI'm proposing this first patch before the bugfix in patch 2/3 because I\nwant to see that it causes a new failure in the arm-eabi post-commit CI.\nThat should then be fixed by patch 2/3 in the series.\n\nThis and patch 2/3 are suitable for backport to release branches.\n\nTested x86_64-linux.\n\n .../28_regex/traits/char/lookup_classname.cc | 66 +++++++++++++++++++\n 1 file changed, 66 insertions(+)", "diff": "diff --git a/libstdc++-v3/testsuite/28_regex/traits/char/lookup_classname.cc b/libstdc++-v3/testsuite/28_regex/traits/char/lookup_classname.cc\nindex 0f277bce532c..2e5c1c711818 100644\n--- a/libstdc++-v3/testsuite/28_regex/traits/char/lookup_classname.cc\n+++ b/libstdc++-v3/testsuite/28_regex/traits/char/lookup_classname.cc\n@@ -28,6 +28,7 @@\n #include <regex>\n #include <forward_list>\n #include <string.h>\n+#include <ctype.h>\n #include <testsuite_hooks.h>\n \n void\n@@ -67,10 +68,75 @@ test03()\n VERIFY(traits.isctype('C', traits.lookup_classname(s.begin(), s.end(), true)));\n }\n \n+void\n+test04()\n+{\n+ // Transform \"string\" into \"StRiNg\"\n+ auto mix_case = [](std::string s) {\n+ int i = 0;\n+ for (auto& ch : s)\n+ if (++i % 2)\n+\tch = toupper(ch);\n+ return s;\n+ };\n+\n+ typedef char CharT;\n+ typedef std::regex_traits<CharT> traits;\n+ traits t;\n+\n+ auto lookup = [&t](const std::string& s, bool icase) {\n+ return t.lookup_classname(s.begin(), s.end(), icase);\n+ };\n+\n+ VERIFY( lookup(\"\", false) == 0 );\n+ VERIFY( lookup(\":::not a valid classname:::\", false) == 0 );\n+ VERIFY( lookup(\":::not a valid classname:::\", true) == 0 );\n+ VERIFY( lookup(\"alnu\", false) == 0 );\n+ VERIFY( lookup(\"alnumb\", false) == 0 );\n+ VERIFY( lookup(\"x\", false) == 0 );\n+ VERIFY( lookup(\"di\", false) == 0 );\n+ VERIFY( lookup(\"digi\", false) == 0 );\n+ VERIFY( lookup(\"digix\", false) == 0 );\n+ VERIFY( lookup(std::string{\"d\\0i\", 3}, false) == 0 );\n+ VERIFY( lookup(std::string{\"digit\\0\", 6}, false) == 0 );\n+ VERIFY( lookup(std::string{\"digit\\0bad\", 9}, false) == 0 );\n+\n+ for (std::string cls : { \"alnum\", \"alpha\", \"blank\", \"cntrl\", \"digit\",\n+\t\t\t \"graph\", \"lower\", \"print\", \"punct\", \"space\",\n+\t\t\t \"upper\", \"xdigit\", \"d\", \"s\", \"w\" })\n+ {\n+ traits::char_class_type val = lookup(cls, false);\n+ // val should be non-zero:\n+ VERIFY( val != 0 );\n+ // val is independent of the case of the name,\n+ // i.e. \"alpha\" and \"ALPHA\" and \"AlPhA\" give same result:\n+ VERIFY( lookup(mix_case(cls), false) == val );\n+\n+ // Repeat same checks for icase=true.\n+ traits::char_class_type ival = lookup(cls, true);\n+ VERIFY( ival != 0 );\n+ VERIFY( lookup(mix_case(cls), true) == ival );\n+\n+ if (cls == \"lower\" || cls == \"upper\") // icase=true should affect value\n+\t{\n+\t VERIFY( ival != val );\n+\t VERIFY( ival == lookup(\"alpha\", false) );\n+\t}\n+ else\n+\tVERIFY( ival == val );\n+\n+ if (cls == \"d\")\n+\tVERIFY( val == lookup(\"digit\", false) );\n+ else if (cls == \"s\")\n+\tVERIFY( val == lookup(\"space\", false) );\n+ }\n+}\n+\n int main()\n {\n \ttest01();\n \ttest02();\n \ttest03();\n+\ttest04();\n \treturn 0;\n }\n", "prefixes": [ "1/3" ] }