From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117578 invoked by alias); 31 May 2017 17:11:17 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 117438 invoked by uid 89); 31 May 2017 17:11:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.2 spammy= X-HELO: mail-io0-f176.google.com Received: from mail-io0-f176.google.com (HELO mail-io0-f176.google.com) (209.85.223.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 May 2017 17:11:14 +0000 Received: by mail-io0-f176.google.com with SMTP id k91so19984914ioi.1 for ; Wed, 31 May 2017 10:11:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=4/3R1pZxrB0hSSWP9AKhhBaC3UUrKLwGXt6arat0XbM=; b=EQ5lPpnz/hBcwRnSk5HhAvuNP6nsklM9w5yFjQDZVL3a5j+9tBTpkYuIDb7rLdvxgw nspaQym/OPgB+NnSuN9DZz8E6DPqbH276ZkBDGdiZPnjjyG8AzfdC8Jv9mNqRZcwMAgu DC7C1GcBvBMqw3gglAeYUKMxpTB748qfIGXABftSZSvZBjUIMSq+O5D+n3ZJK3352X/9 CGN2PO/zdDO+G0i2hqmgfQLm639KVn8SUkNswpM7Njs0++2DrXSvK0fVMVfPiEZMjhjW UYfKeoLSaoYlqxrEvNoLcE77kLz+3FVHLxsqqeL7GFg7NjQx3etTMg+Nbh9t6cvkMPbE p7ew== X-Gm-Message-State: AODbwcBJj5/Y5f3wXWbS/OSQzgrc6HgwxD3Fc1K9k938v7bfXmwdHDLP CzbhEZZbSMeRG+QSkDsxaNwm9UVSN+5PLKk= X-Received: by 10.107.25.203 with SMTP id 194mr22773642ioz.182.1496250676833; Wed, 31 May 2017 10:11:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.6.226 with HTTP; Wed, 31 May 2017 10:10:55 -0700 (PDT) From: Jason Merrill Date: Wed, 31 May 2017 17:16:00 -0000 Message-ID: Subject: C++ PATCH for c++/80840, ICE with constexpr and reference template parm To: gcc-patches List Content-Type: multipart/mixed; boundary="001a113fe2da16ef1b0550d5028f" X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg02391.txt.bz2 --001a113fe2da16ef1b0550d5028f Content-Type: text/plain; charset="UTF-8" Content-length: 404 In convert_nontype_argument to reference type we were inappropriately checking value_dependent_expression_p on an expression that might be a VAR_DECL and might be a TEMPLATE_PARM_INDEX of reference type. It's inappropriate in the former case because we don't care about the value of the object, only its address; we only want to test for the latter case. Tested x86_64-pc-linux-gnu, applying to trunk. --001a113fe2da16ef1b0550d5028f Content-Type: text/plain; charset="US-ASCII"; name="80840.diff" Content-Disposition: attachment; filename="80840.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j3d908660 Content-length: 2306 Y29tbWl0IDM4OGVjOGRlODQ0ZGRhNjc4NWQ1NWRhZWYwZmZmYzkwZWI0OTEx OGMKQXV0aG9yOiBKYXNvbiBNZXJyaWxsIDxqYXNvbkByZWRoYXQuY29tPgpE YXRlOiAgIFR1ZSBNYXkgMzAgMjE6Mzg6MTcgMjAxNyAtMDQwMAoKICAgICAg ICAgICAgUFIgYysrLzgwODQwIC0gSUNFIHdpdGggY29uc3RleHByIGFuZCBy ZWZlcmVuY2UKICAgIAogICAgICAgICAgICAqIHB0LmMgKGNvbnZlcnRfbm9u dHlwZV9hcmd1bWVudCk6IERvbid0IHRlc3Qgd2hldGhlciBhIGRlY2wgaXMK ICAgICAgICAgIC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hwcik7CiAJfQorCisgICAgICBpZiAoIXNhbWVf dHlwZV9wICh0eXBlLCBUUkVFX1RZUEUgKGV4cHIpKSkKKwlleHByID0gYnVp bGRfbm9wICh0eXBlLCBleHByKTsKICAgICB9CiAgIC8qIFt0ZW1wLmFyZy5u b250eXBlXS81LCBidWxsZXQgNAogCmRpZmYgLS1naXQgYS9nY2MvdGVzdHN1 aXRlL2crKy5kZy90ZW1wbGF0ZS9yZWYxMC5DIGIvZ2NjL3Rlc3RzdWl0ZS9n KysuZGcvdGVtcGxhdGUvcmVmMTAuQwpuZXcgZmlsZSBtb2RlIDEwMDY0NApp bmRleCAwMDAwMDAwLi42MGU5MWQwCi0tLSAvZGV2L251bGwKKysrIGIvZ2Nj L3Rlc3RzdWl0ZS9nKysuZGcvdGVtcGxhdGUvcmVmMTAuQwpAQCAtMCwwICsx LDEzIEBACisvLyBQUiBjKysvODA4NDAKKy8vIHsgZGctZG8gY29tcGlsZSB7 IHRhcmdldCBjKysxMSB9IH0KKwordGVtcGxhdGUgPGNsYXNzIFQsIFQgWD4K K3N0cnVjdCBKdXN0OworCit0ZW1wbGF0ZSA8Y29uc3QgZG91YmxlJiBYPgor c3RydWN0IE51bWJlciB7CisgICAgc3RhdGljIGNvbnN0ZXhwciBkb3VibGUg dmFsdWUgPSBYOworICAgIHVzaW5nIHJlc3VsdCA9IEp1c3Q8Y29uc3QgZG91 YmxlJiwgdmFsdWU+OworfTsKKworaW50IG1haW4oKSB7fQo= --001a113fe2da16ef1b0550d5028f--