From patchwork Fri May 3 09:36:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 241259 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id AD8ED2C00C4 for ; Fri, 3 May 2013 19:36:45 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=lvinBm65mCtqpl4T6aVWPm0wvnKavRjVD/ddhjFHo5xVwO yteH7K2V/t6K1PPtIiuR0yv6yBgWQLRQL2Ev1bqpGZ3BZdOgmuAb3M10RUSFpK94 gmUExCJk25qviLS7se9uHWbTpwVQTCNjndu/pzqnEnICqNg3VGbOqv2juJSRw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=4VbW3/nYrjgGwge6hjUajKZvGZA=; b=PSGWFdCgOQpbAAazzBrx 8VhYGJ7kYzyPhULzGOt9lJ0rN9rzsvJYmIfij4KCycQWDpscGpvXRcLLfJSwCFJY k1Q09a+ot7W9d42qZjv+J6xwC5QFhOdDqf0w+xcfYhIbq8g5KWF4I7hV3CtV/bLJ Gr92JnxaKnfYwDvbSpl66OM= Received: (qmail 13760 invoked by alias); 3 May 2013 09:36:39 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 13750 invoked by uid 89); 3 May 2013 09:36:39 -0000 X-Spam-SWARE-Status: No, score=-6.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_HOSTKARMA_NO, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, SPF_PASS, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 03 May 2013 09:36:38 +0000 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r439aZHC001509 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 3 May 2013 09:36:36 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r439aZqM011285 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Fri, 3 May 2013 09:36:36 GMT Received: from abhmt111.oracle.com (abhmt111.oracle.com [141.146.116.63]) by userz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r439aZdg011170 for ; Fri, 3 May 2013 09:36:35 GMT Received: from poldo4.casa (/79.53.234.40) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 03 May 2013 02:36:35 -0700 Message-ID: <51838521.4000801@oracle.com> Date: Fri, 03 May 2013 11:36:33 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" Subject: [C++ testcase, committed] PR 54318 X-Virus-Found: No Hi, committed to mainline. Thanks, Paolo. /////////////////// 2013-05-03 Paolo Carlini PR c++/54318 * g++.dg/cpp0x/pr54318.C: New. Index: g++.dg/cpp0x/pr54318.C =================================================================== --- g++.dg/cpp0x/pr54318.C (revision 0) +++ g++.dg/cpp0x/pr54318.C (working copy) @@ -0,0 +1,24 @@ +// PR c++/54318 +// { dg-do compile { target c++11 } } + +template +struct wrapped +{ + typedef T type; +}; + +template +typename T::type unwrap1(T); + +int unwrap(int); + +template +auto unwrap(T t) -> decltype(unwrap(unwrap1(t))) +{ + return unwrap(unwrap1(t)); +} + +int main() +{ + unwrap(wrapped>()); +}