From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 122522 invoked by alias); 30 Nov 2017 18:19:57 -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 122502 invoked by uid 89); 30 Nov 2017 18:19:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-14.9 required=5.0 tests=BAYES_00,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT,KB_WAM_FROM_NAME_SINGLEWORD,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=tweaking, boo, H*RU:192.168.1.4, Hx-spam-relays-external:192.168.1.4 X-HELO: userp1040.oracle.com Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Nov 2017 18:19:55 +0000 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vAUIJmhA002056 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 30 Nov 2017 18:19:49 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vAUIJlWX001027 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 30 Nov 2017 18:19:47 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vAUIJl1u014674; Thu, 30 Nov 2017 18:19:47 GMT Received: from [192.168.1.4] (/95.247.228.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 30 Nov 2017 10:19:47 -0800 Subject: [C++ PING] Re: [C++ Patch, V2] PR 82593 ("Internal compiler error: in process_init_constructor_array, at cp/typeck2.c:1294") To: "gcc-patches@gcc.gnu.org" Cc: Jason Merrill , Nathan Sidwell References: <44bdbaa0-35f1-7f0c-85aa-b603939d016e@oracle.com> From: Paolo Carlini Message-ID: <44c93777-3841-e600-441d-0d616c357e0b@oracle.com> Date: Thu, 30 Nov 2017 18:23:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <44bdbaa0-35f1-7f0c-85aa-b603939d016e@oracle.com> Content-Type: multipart/mixed; boundary="------------024D105218D51E713D0167B5" X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg02611.txt.bz2 This is a multi-part message in MIME format. --------------024D105218D51E713D0167B5 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-length: 1078 Hi, On 17/11/2017 15:09, Paolo Carlini wrote: > Hi again, > > I managed to spend much more time on the issue and I'm starting a new > thread with a mature - IMHO - proposal: the big thing is the use of > the existing check_array_designated_initializer in > process_init_constructor_array,  which calls maybe_constant_value, as > we want, and covers all the ill-formed cases which I can imagine. I'm > also tweaking a bit the parser to check the return value of > require_potential_rvalue_constant_expression in order to avoid > redundant diagnostic in some cases. Also, a couple more testcases > beyond the bug report. I'm gently pinging this. I rebased it vs a very minor conflict due to Jakub's implementation of P0329R4. While I was at it, I'm also proposing a small tweak vs the previous version in the way check_array_designated_initializer is used: only if ce->index is non-null, more consistently with the current code. Or see the original post:     https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01481.html Thanks! Paolo. /////////////////////////// --------------024D105218D51E713D0167B5 Content-Type: text/plain; charset=UTF-8; name="patch_82593_3" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="patch_82593_3" Content-length: 5633 SW5kZXg6IGNwL2NwLX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kb2VzIG5vdCBoYXZlIGEgZGVzaWduYXRlZCBp bml0aWFsaXplci4gICovCiAKLXN0YXRpYyBib29sCitib29sCiBjaGVja19h cnJheV9kZXNpZ25hdGVkX2luaXRpYWxpemVyIChjb25zdHJ1Y3Rvcl9lbHQg KmNlLAogCQkJCSAgICB1bnNpZ25lZCBIT1NUX1dJREVfSU5UIGluZGV4KQog ewpJbmRleDogY3AvcGFyc2VyLmMKPT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQot LS0gY3AvcGFyc2VyLmMJKHJldmlzaW9uIDI1NTE2MSkKKysrIGNwL3BhcnNl ci5jCSh3b3JraW5nIGNvcHkpCkBAIC0yMjIxOCw4ICsyMjIxOCwxMCBAQCBj cF9wYXJzZXJfaW5pdGlhbGl6ZXJfbGlzdCAoY3BfcGFyc2VyKiBwYXJzZXIs IGJvbwogCiAJICBpZiAoIWNwX3BhcnNlcl9wYXJzZV9kZWZpbml0ZWx5IChw YXJzZXIpKQogCSAgICBkZXNpZ25hdG9yID0gTlVMTF9UUkVFOwotCSAgZWxz ZSBpZiAobm9uX2NvbnN0KQotCSAgICByZXF1aXJlX3BvdGVudGlhbF9ydmFs dWVfY29uc3RhbnRfZXhwcmVzc2lvbiAoZGVzaWduYXRvcik7CisJICBlbHNl IGlmIChub25fY29uc3QKKwkJICAgJiYgKCFyZXF1aXJlX3BvdGVudGlhbF9y dmFsdWVfY29uc3RhbnRfZXhwcmVzc2lvbgorCQkgICAgICAgKGRlc2lnbmF0 b3IpKSkKKwkgICAgZGVzaWduYXRvciA9IE5VTExfVFJFRTsKIAkgIGlmIChk ZXNpZ25hdG9yKQogCSAgICAvKiBXYXJuIHRoZSB1c2VyIHRoYXQgdGhleSBh cmUgdXNpbmcgYW4gZXh0ZW5zaW9uLiAgKi8KIAkgICAgcGVkd2FybiAobG9j LCBPUFRfV3BlZGFudGljLApJbmRleDogY3AvdHlwZWNrMi5jCj09P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 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PQotLS0gdGVzdHN1aXRlL2crKy5kZy9jcHAweC9k ZXNpZzIuQwkobm9uZXhpc3RlbnQpCisrKyB0ZXN0c3VpdGUvZysrLmRnL2Nw cDB4L2Rlc2lnMi5DCSh3b3JraW5nIGNvcHkpCkBAIC0wLDAgKzEsMjMgQEAK Ky8vIFBSIGMrKy84MjU5MworLy8geyBkZy1kbyBjb21waWxlIHsgdGFyZ2V0 IGMrKzExIH0gfQorLy8geyBkZy1vcHRpb25zICIiIH0KKworZW51bSB7Cisg SU5ERVgxID0gMCwKKyBJTkRFWDIKK307CisKK2NsYXNzIFNvbWVDbGFzcyB7 CitwdWJsaWM6CisgU29tZUNsYXNzKCk7Citwcml2YXRlOgorIHN0cnVjdCB7 IGludCBmaWVsZDsgfSBtZW1iZXJbMl07Cit9OworCitTb21lQ2xhc3M6OlNv bWVDbGFzcygpCisgOiBtZW1iZXIoeworICAgW0lOREVYMV0gPSB7IC5maWVs ZCA9IDAgfSwKKyAgIFtJTkRFWDJdID0geyAuZmllbGQgPSAxIH0KKyB9KQor eworfQpJbmRleDogdGVzdHN1aXRlL2crKy5kZy9jcHAweC9kZXNpZzMuQwo9 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09Ci0tLSB0ZXN0c3VpdGUvZysrLmRnL2Nw cDB4L2Rlc2lnMy5DCShub25leGlzdGVudCkKKysrIHRlc3RzdWl0ZS9nKysu ZGcvY3BwMHgvZGVzaWczLkMJKHdvcmtpbmcgY29weSkKQEAgLTAsMCArMSwy MSBAQAorLy8gUFIgYysrLzgyNTkzCisvLyB7IGRnLWRvIGNvbXBpbGUgeyB0 YXJnZXQgYysrMTEgfSB9CisvLyB7IGRnLW9wdGlvbnMgIiIgfQorCitjb25z dCBpbnQgSU5ERVgxID0gMDsKK2NvbnN0IGludCBJTkRFWDIgPSAxOworCitj bGFzcyBTb21lQ2xhc3MgeworcHVibGljOgorIFNvbWVDbGFzcygpOworcHJp dmF0ZToKKyBzdHJ1Y3QgeyBpbnQgZmllbGQ7IH0gbWVtYmVyWzJdOworfTsK KworU29tZUNsYXNzOjpTb21lQ2xhc3MoKQorIDogbWVtYmVyKHsKKyAgIFtJ TkRFWDFdID0geyAuZmllbGQgPSAwIH0sCisgICBbSU5ERVgyXSA9IHsgLmZp ZWxkID0gMSB9CisgfSkKK3sKK30KSW5kZXg6IHRlc3RzdWl0ZS9nKysuZGcv Y3BwMHgvZGVzaWc0LkMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gdGVz dHN1aXRlL2crKy5kZy9jcHAweC9kZXNpZzQuQwkobm9uZXhpc3RlbnQpCisr KyB0ZXN0c3VpdGUvZysrLmRnL2NwcDB4L2Rlc2lnNC5DCSh3b3JraW5nIGNv cHkpCkBAIC0wLDAgKzEsMjEgQEAKKy8vIFBSIGMrKy84MjU5MworLy8geyBk Zy1kbyBjb21waWxlIHsgdGFyZ2V0IGMrKzExIH0gfQorLy8geyBkZy1vcHRp b25zICIiIH0KKworaW50IElOREVYMSA9IDA7CitpbnQgSU5ERVgyID0gMTsK KworY2xhc3MgU29tZUNsYXNzIHsKK3B1YmxpYzoKKyBTb21lQ2xhc3MoKTsK K3ByaXZhdGU6Cisgc3RydWN0IHsgaW50IGZpZWxkOyB9IG1lbWJlclsyXTsK K307CisKK1NvbWVDbGFzczo6U29tZUNsYXNzKCkKKyA6IG1lbWJlcih7Cisg ICBbSU5ERVgxXSA9IHsgLmZpZWxkID0gMCB9LCAgLy8geyBkZy1lcnJvciAi Y29uc3RhbnQgZXhwcmVzc2lvbiIgfQorICAgW0lOREVYMl0gPSB7IC5maWVs ZCA9IDEgfSAgIC8vIHsgZGctZXJyb3IgImNvbnN0YW50IGV4cHJlc3Npb24i IH0KKyB9KQoreworfQo= --------------024D105218D51E713D0167B5--