From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20688 invoked by alias); 4 Nov 2013 10:07:52 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 17640 invoked by uid 48); 4 Nov 2013 10:05:50 -0000 From: "bernd.edlinger at hotmail dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/58970] [4.7/4.8/4.9 Regression] internal compiler error: in get_bit_range, at expr.c:4562 Date: Mon, 04 Nov 2013 10:07:00 -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: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bernd.edlinger at hotmail dot de X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.4 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-SW-Source: 2013-11/txt/msg00194.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D58970 --- Comment #12 from Bernd Edlinger --- (In reply to Jakub Jelinek from comment #11) > (In reply to Bernd Edlinger from comment #10) > > but this should'nt be neccessary then? > >=20 > > if (bitoffset > *bitpos) > > { > > HOST_WIDE_INT adjust =3D bitoffset - *bitpos; > > - > > gcc_assert ((adjust % BITS_PER_UNIT) =3D=3D 0); > > - gcc_assert (*offset !=3D NULL_TREE); > >=20=20 > > *bitpos +=3D adjust; > > - *offset > > - =3D size_binop (MINUS_EXPR, *offset, size_int (adjust / BITS_PER_UNIT= )); > > + if (*offset =3D=3D NULL_TREE) > > + *offset =3D size_int (-adjust / BITS_PER_UNIT); > > + else > > + *offset > > + =3D size_binop (MINUS_EXPR, *offset, size_int (adjust / BITS_PER_UN= IT)); > > *bitstart =3D 0; > > } >=20 > Can you prove it isn't necessary? I mean, *bitpos could still be smaller > than bitoffset, even when not negative, say with some packed+aligned > structures containing bitfields or similar. NULL_TREE *offset is the same > thing as zero at that spot, just perhaps less efficient in that case, so I > think if we can't prove it will not be hit, it is easy to handle it. hmm, my english... I meant the change here is not necessary, because after the if (*bitpos < 0) {...}, *offset can no longer be NULL, and I'd leave the assertion untouched. >>From gcc-bugs-return-433419-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Nov 04 10:12:40 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 25309 invoked by alias); 4 Nov 2013 10:12:40 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 22764 invoked by uid 48); 4 Nov 2013 10:10:38 -0000 From: "paolo.carlini at oracle dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/51671] g++ fails to allow a redundant typedef if the redundant typedef depends on a template parameter Date: Mon, 04 Nov 2013 10:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: paolo.carlini at oracle dot com X-Bugzilla-Status: NEW 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: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg00196.txt.bz2 Content-length: 251 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51671 --- Comment #4 from Paolo Carlini --- Another testcase: template struct S { static void f() { typedef T q; typedef U q; } };