[Bug c/77767] [5/6/7 Regression] Side-effect from VLA array parameters lost
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77767 Richard Biener changed: What|Removed |Added Priority|P3 |P2
[Bug c/77767] [5/6/7 Regression] Side-effect from VLA array parameters lost
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77767 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek --- Created attachment 40377 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40377&action=edit gcc7-pr77767.patch I went through all the grokdeclarator (indirect) callers, and those callers (of e.g. groktypename, grokparm, push_parm_decl and c_parser_objc_method_decl) that are called with non-NULL expr actually ensure it is initialized with NULL_TREE first and want to append to it. Here is thus an untested patch. Optionally, the building of COMPOUND_EXPR could be in both spots (this one and the one in the if (this_size_varies) handling later on) replaced with append_to_statement_list (whatever, expr); Any preferences here?
[Bug c/77767] [5/6/7 Regression] Side-effect from VLA array parameters lost
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77767 --- Comment #5 from Jakub Jelinek --- Created attachment 40378 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40378&action=edit gcc7-pr77767-2.patch Version with append_to_statement_list.
[Bug c/77767] [5/6/7 Regression] Side-effect from VLA array parameters lost
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77767 --- Comment #6 from joseph at codesourcery dot com --- I think the append_to_statement_list version should be preferred.
[Bug c/77767] [5/6/7 Regression] Side-effect from VLA array parameters lost
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77767 --- Comment #7 from Jakub Jelinek --- Unfortunately that version breaks the pr49120.c testcase, because mark_exp_read doesn't deal with STATEMENT_LISTs. I'll test the other patch.
[Bug c/77767] [5/6/7 Regression] Side-effect from VLA array parameters lost
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77767 --- Comment #8 from Jakub Jelinek --- Author: jakub Date: Wed Dec 21 00:07:49 2016 New Revision: 243832 URL: https://gcc.gnu.org/viewcvs?rev=243832&root=gcc&view=rev Log: PR c/77767 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression to *expr instead of overwriting it. * gcc.c-torture/execute/pr77767.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/execute/pr77767.c Modified: trunk/gcc/c/ChangeLog trunk/gcc/c/c-decl.c trunk/gcc/testsuite/ChangeLog
[Bug c/77767] [5/6/7 Regression] Side-effect from VLA array parameters lost
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77767 --- Comment #9 from Jakub Jelinek --- Author: jakub Date: Wed Dec 21 12:52:06 2016 New Revision: 243851 URL: https://gcc.gnu.org/viewcvs?rev=243851&root=gcc&view=rev Log: PR c/77767 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression to *expr instead of overwriting it. * gcc.c-torture/execute/pr77767.c: New test. Added: branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/execute/pr77767.c Modified: branches/gcc-6-branch/gcc/c/ChangeLog branches/gcc-6-branch/gcc/c/c-decl.c branches/gcc-6-branch/gcc/testsuite/ChangeLog
[Bug c/77767] [5/6/7 Regression] Side-effect from VLA array parameters lost
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77767 Joseph S. Myers changed: What|Removed |Added Target Milestone|--- |5.5 Summary|Side-effect from VLA array |[5/6/7 Regression] |parameters lost |Side-effect from VLA array ||parameters lost --- Comment #1 from Joseph S. Myers --- This appears to be a regression in 4.7 and later, probably caused by r173422 - https://gcc.gnu.org/ml/gcc-patches/2011-05/msg00319.html .
[Bug c/77767] [5/6/7 Regression] Side-effect from VLA array parameters lost
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77767 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2016-09-29 CC||mpolacek at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from Marek Polacek --- Confirmed.
[Bug c/77767] [5/6/7 Regression] Side-effect from VLA array parameters lost
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77767 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org --- Comment #3 from Marek Polacek --- Mine.