{"id":2221701,"url":"http://patchwork.ozlabs.org/api/patches/2221701/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/adig0tGWlT6MqmKg@tucnak/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/projects/17/?format=json","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":"<adig0tGWlT6MqmKg@tucnak>","list_archive_url":null,"date":"2026-04-10T07:03:46","name":"testsuite: Fix up g++.dg/lto/20091022-2_0.C test [PR124828]","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"8f438095ae5cf2292cc39087374c894288df7ac8","submitter":{"id":671,"url":"http://patchwork.ozlabs.org/api/people/671/?format=json","name":"Jakub Jelinek","email":"jakub@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/adig0tGWlT6MqmKg@tucnak/mbox/","series":[{"id":499410,"url":"http://patchwork.ozlabs.org/api/series/499410/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=499410","date":"2026-04-10T07:03:46","name":"testsuite: Fix up g++.dg/lto/20091022-2_0.C test [PR124828]","version":1,"mbox":"http://patchwork.ozlabs.org/series/499410/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2221701/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2221701/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=OjvqNr8u;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.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=OjvqNr8u","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.133.124"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 4fsSTn2VT5z1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 17:04:26 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id AC3F84BA2E35\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 07:04:24 +0000 (GMT)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by sourceware.org (Postfix) with ESMTP id 9D3864BA2E09\n for <gcc-patches@gcc.gnu.org>; Fri, 10 Apr 2026 07:03:55 +0000 (GMT)","from mx-prod-mc-03.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-606-KhmtkOP_Mmu5TOTY74SBWg-1; Fri,\n 10 Apr 2026 03:03:52 -0400","from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4])\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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 100451956048; Fri, 10 Apr 2026 07:03:51 +0000 (UTC)","from tucnak.zalov.cz (unknown [10.44.33.241])\n by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id 6AFBA3000C16; Fri, 10 Apr 2026 07:03:50 +0000 (UTC)","from tucnak.zalov.cz (localhost [127.0.0.1])\n by tucnak.zalov.cz (8.18.1/8.18.1) with ESMTPS id 63A73lfU3926936\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Fri, 10 Apr 2026 09:03:47 +0200","(from jakub@localhost)\n by tucnak.zalov.cz (8.18.1/8.18.1/Submit) id 63A73l0u3926935;\n Fri, 10 Apr 2026 09:03:47 +0200"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org AC3F84BA2E35","OpenDKIM Filter v2.11.0 sourceware.org 9D3864BA2E09"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 9D3864BA2E09","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 9D3864BA2E09","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775804635; cv=none;\n b=tSXVkbh2Rb+SdbhNVMCyGtugsDkB0bfxyy1+aJiAhYeIX/y2BD4tsbzvWBNwoIB7TgVg4EEpE2jMnSmCUo81Z11gAvBhVfT9RPKFPDzCOyNfP9ydADTjlK2b5rmD18ZiyWR2db1ZKVreVke7AlZpI97ltjBHS9pGsNtphCnBwvA=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775804635; c=relaxed/simple;\n bh=jQQTB9TBA7gSZunYHaTWM3dK6M0fTCiLLoDnI4K66dk=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=sH2/yFK4/ChszpseDq4y13LdQU/sUiZL33+P5aafvaRGTYHDMmu3B32jkf5QEczI7uKK3Phtnu02Ijz8tcNzSI6vEXMQVUNH9gt46qdMGHRnX6tDgH2vKTv7dmizjYP3VeCwTzVA77efAT0oDdt87n1pqwvQHwaRyB4//k5mDb8=","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=1775804635;\n h=from:from:reply-to:reply-to:subject:subject:date:date:\n message-id:message-id:to:to:cc:cc:mime-version:mime-version:\n content-type:content-type; bh=3T9I5+9joHBVHUW7TmepCT0kGeLbJzWqqCSoNqhHj+Y=;\n b=OjvqNr8unk0EZGxyGj4ciSHmXm7jqOEl/fmolz0D3XoB30Vwc/AJ30ZfgdL2g6y3zNanuj\n 9BD802jvZ9HnH6arbJaMeDxkx+Bavgm+O2GyJcIA5AL6s2SM91/Gi5KJNjZT42XUtzhUxk\n DS7BJXIUvwSDRB024yYzV62Nk7D/DZ0=","X-MC-Unique":"KhmtkOP_Mmu5TOTY74SBWg-1","X-Mimecast-MFC-AGG-ID":"KhmtkOP_Mmu5TOTY74SBWg_1775804631","Date":"Fri, 10 Apr 2026 09:03:46 +0200","From":"Jakub Jelinek <jakub@redhat.com>","To":"Richard Biener <rguenther@suse.de>, Jason Merrill <jason@redhat.com>,\n Jonathan Wakely <jwakely@redhat.com>","Cc":"gcc-patches@gcc.gnu.org","Subject":"[PATCH] testsuite: Fix up g++.dg/lto/20091022-2_0.C test [PR124828]","Message-ID":"<adig0tGWlT6MqmKg@tucnak>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.4.1 on 10.30.177.4","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"lFyyHIm_eWP8jYq8lor5QvF1h88z4NAy1RF7CCTtjIM_1775804631","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","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>","Reply-To":"Jakub Jelinek <jakub@redhat.com>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"},"content":"Hi!\n\nFrom what I can see, this test was added for PR41791 where we didn't stream\nin/out the system header flags for LTO.  The test isn't perfect, because\neven when we actually do stream those flags, whether it fails or not depends\non the exact decisions of the inliner whether it decides to inline all\ninline/constexpr functions or not (maybe it would help to use some\n--params to request inlining as few functions as possible).\n\nAnyway, guess at some point we simply started to inline everything that was\nused and so whether the test stopped failing even if it would use\n-Wsystem-headers.  Now, when not using installed gcc testing, we use\nlibstdc++-v3/scripts/testsuite_flags script which uses -I options rather\nthan -isystem, but the headers still had #pragma GCC system_header pragmas.\nExcept that r15-3859 guarded those pragmas with a macro which isn't defined\nby default and needs to be defined only when we want to make sure the\nheaders are treated as system headers.\nAnd later on the recent changes for C++20 stable string exports started\nseeing a constexpr (thus implicitly inline for -Winline purposes) being too\nlarge for default inlining and so the test started to fail again.\n\nThe following patch fixes it by making sure the libstdc++ headers are\ntreated as system headers, so the test tests again what it was supposed to\ntest.\n\nBootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?\n\n2026-04-10  Jakub Jelinek  <jakub@redhat.com>\n\n\tPR lto/124828\n\t* g++.dg/lto/20091022-2_0.C (_GLIBCXX_SYSHDR): Define before including\n\t<string>.\n\n\n\tJakub","diff":"--- gcc/testsuite/g++.dg/lto/20091022-2_0.C.jj\t2026-03-27 10:17:15.910301758 +0100\n+++ gcc/testsuite/g++.dg/lto/20091022-2_0.C\t2026-04-09 09:09:30.703737425 +0200\n@@ -2,6 +2,7 @@\n // { dg-lto-options {{-O3 -flto -Winline}} }\n // { dg-skip-if \"requires hosted libstdc++ for string\" { ! hostedlib } }\n \n+#define _GLIBCXX_SYSHDR\n #include <string>\n \n int\n","prefixes":[]}