From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 665B5395C04A; Wed, 25 Nov 2020 14:48:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 665B5395C04A From: "pascal_cuoq at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/97986] New: ICE in force_constant_size when applying va_arg to VLA type Date: Wed, 25 Nov 2020 14:48:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pascal_cuoq at hotmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2020 14:48:18 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97986 Bug ID: 97986 Summary: ICE in force_constant_size when applying va_arg to VLA type Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: pascal_cuoq at hotmail dot com Target Milestone: --- This bug seems most similar to (but still different from) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D59711 (in which a comment sa= ys that it appears to have been fixed in GCC 6). In GCC 10.2 and some earlier versions, compiling the following program (Compiler Explorer link: https://gcc.godbolt.org/z/11ob5j ): #include int sum(int n, ...) { va_list ap; va_start(ap, n); int *input =3D va_arg(ap, int[n]); int rc =3D 0; for (int i =3D 0; i < n; i++) rc +=3D input[i]; return rc; } Produces the following error message: In file included from :1: : In function 'sum': :7:29: internal compiler error: in force_constant_size, at gimplify.c:733 7 | int *input =3D va_arg(ap, int[n]); | ^~~ Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Compiler returned: 1=