From patchwork Sun May 20 23:45:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Hope X-Patchwork-Id: 8834 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3BC5623EB5 for ; Sun, 20 May 2012 23:45:55 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 00D35A1820C for ; Sun, 20 May 2012 23:45:54 +0000 (UTC) Received: by ggnf1 with SMTP id f1so4831598ggn.11 for ; Sun, 20 May 2012 16:45:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:message-id :date:from:user-agent:mime-version:to:subject:content-type :content-transfer-encoding:x-gm-message-state; bh=k7RWT6eDMjuhVYKG0XDcb9YUw+85ge962CSW7RedZ/k=; b=mnZ+v4agMqa+bbOnXZN1oaGQ/1Nkg3Pi/3edMB/wfEh/IVLF77rQ5YhQ6Oj24zN30B pTswon7f1z2YxOB1cegsLywTDbMADYnndhj9KrsBdOZ6Tl37AaYGuDBYpOiufj1otUPm KCLFbyHvtwL+hJSq10ZdWF46J29UzYcBz+FI3vAtJeAUF8bOHtmQdB8l4A22vowESp/1 S8r2+37vRT+P7KSf3ef76PdzrLqHM7Jez+iO97gvEMh0572qwaz5nbEsV5dIuCohLfx4 FzEZVGSBg2X4WwKbZuti7a9+BCcFHrsBIUDvabAEVfkFVyXo9qgqDXYZf66dP2/Z+IkM fKrQ== Received: by 10.50.46.232 with SMTP id y8mr4960426igm.57.1337557554257; Sun, 20 May 2012 16:45:54 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.35.72 with SMTP id o8csp250107ibd; Sun, 20 May 2012 16:45:52 -0700 (PDT) Received: by 10.68.129.67 with SMTP id nu3mr59979658pbb.73.1337557552568; Sun, 20 May 2012 16:45:52 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id sp3si18405803pbc.148.2012.05.20.16.45.51 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 20 May 2012 16:45:52 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of michael.hope@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of michael.hope@linaro.org) smtp.mail=michael.hope@linaro.org Received: by pbbrr4 with SMTP id rr4so7351087pbb.37 for ; Sun, 20 May 2012 16:45:51 -0700 (PDT) Received: by 10.68.226.99 with SMTP id rr3mr62613800pbc.48.1337557551553; Sun, 20 May 2012 16:45:51 -0700 (PDT) Received: from [192.168.1.35] (204.47.255.123.static.snap.net.nz. [123.255.47.204]) by mx.google.com with ESMTPS id uz7sm4148254pbc.35.2012.05.20.16.45.49 (version=SSLv3 cipher=OTHER); Sun, 20 May 2012 16:45:50 -0700 (PDT) Message-ID: <4FB9822B.9080805@linaro.org> Date: Mon, 21 May 2012 11:45:47 +1200 From: Michael Hope User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org, patches@linaro.org Subject: [PATCH, 4.6] Fix PR53170: missing target c++11 selector X-Gm-Message-State: ALoCoQnmiWGaz2Z1+wHERPnpCIOXzozzmqYq+yEvejkCKbJNlRgfvbijloYtyg0+XXMicbFE4XtX The testsuite for PR52796 uses the 'target c++11' selector which doesn't exist in 4.6. This patch backports the selector, clearing the 'ERROR: g++.dg/cpp0x/variadic-value1.C: syntax error in target selector "target c++11" for " dg-do 2 run { target c++11 } "' errors which have appeared in recent 4.6 builds. Tested on x86_64-linux-gnu with no regressions. Changes the ERROR to UNSUPPORTED. OK for 4.6? -- Michael 2012-05-21 Michael Hope PR 53170 Backport from mainline 2011-11-08 Jason Merrill * lib/target-supports.exp (check_effective_target_c++11): New. === modified file 'gcc/testsuite/lib/target-supports.exp' --- gcc/testsuite/lib/target-supports.exp 2012-02-22 17:38:22 +0000 +++ gcc/testsuite/lib/target-supports.exp 2012-05-18 01:57:51 +0000 @@ -3822,6 +3822,17 @@ return 0 } +# Check which language standard is active by checking for the presence of +# one of the C++11 -std flags. This assumes that the default for the +# compiler is C++98, and that there will never be multiple -std= arguments +# on the command line. +proc check_effective_target_c++11 { } { + if ![check_effective_target_c++] { + return 0 + } + return [check-flags { { } { } { -std=c++0x -std=gnu++0x -std=c++11 -std=gnu++11 } }] +} + # Return 1 if the language for the compiler under test is C++. proc check_effective_target_c++ { } {