From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9119B393A426; Tue, 25 May 2021 18:37:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9119B393A426 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/100734] [12 Regression] /test/gnu/gcc/objdir/gcc/include-fixed/stdlib.h:291:8: internal compiler error: in from_mode_char, at attribs.h:304 Date: Tue, 25 May 2021 18:37:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: build, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Tue, 25 May 2021 18:37:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100734 --- Comment #7 from Andrew Pinski --- (In reply to Andrew Pinski from comment #6) > (In reply to Richard Biener from comment #3) > > Possibly a dup of PR100727? >=20 > I think it is unrelated. >=20 > The problem is the fix for PR 100619, sets the attributes to be "+" but t= he > code in attribs.c, skip over the '+' but does not check if it is the end = of > the string: This patch might fix the ICE (sorry for the tab to spaces): diff --git a/gcc/attribs.c b/gcc/attribs.c index ebc0783c439..4adbe9fed5e 100644 --- a/gcc/attribs.c +++ b/gcc/attribs.c @@ -2140,7 +2140,10 @@ init_attr_rdwr_indices (rdwr_map *rwm, tree attrs) /* Skip the internal-only plus sign. */ if (*m =3D=3D '+') - ++m; + { + ++m; + continue; + } acc.str =3D m; acc.mode =3D acc.from_mode_char (*m);=