From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6519 invoked by alias); 14 Jan 2015 09:32:33 -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 6448 invoked by uid 48); 14 Jan 2015 09:32:28 -0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/64545] failed gcc build: internal compiler error: in inline_small_functions, at ipa-inline.c:1693 Date: Wed, 14 Jan 2015 09:32:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: ubizjak at gmail 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: cc 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: 2015-01/txt/msg01149.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64545 Uro=C5=A1 Bizjak changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hjl.tools at gmail dot com --- Comment #7 from Uro=C5=A1 Bizjak --- Also breaks profiledbootstrap autotester [1]. [1] https://gcc.gnu.org/ml/gcc-regression/2015-01/msg00258.html >>From gcc-bugs-return-473156-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 14 09:45:05 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 15127 invoked by alias); 14 Jan 2015 09:45:04 -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 14941 invoked by uid 55); 14 Jan 2015 09:44:58 -0000 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/64511] [5 Regression] ICE at -O3 with -g enabled on x86_64-linux-gnu Date: Wed, 14 Jan 2015 09:45:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: compile-time-hog, memory-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 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: 2015-01/txt/msg01150.txt.bz2 Content-length: 1503 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64511 --- Comment #6 from rguenther at suse dot de --- On Tue, 13 Jan 2015, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64511 > > Jakub Jelinek changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |jakub at gcc dot gnu.org > > --- Comment #5 from Jakub Jelinek --- > x % x for x == 0 is undefined behavior, so perhaps with the exception of > sanitization we can just assume it is not 0 and thus fold x % x to 0. > Or does e.g. Ada/Java require something different? See the inconsistent handing of % vs. / in fold (we fold 0 % x to 0 but preserve literal 0 % 0 - we don't fold 0 / x to 0). In my view we should just go ahead and fold, though with -fnon-call-exceptions one may do try { x % x abort (); } catch (...) { } and throw from inside a trap handler. Which means that one can catch undefined behavior. IMHO -fnon-call-exceptions and sub-flags like -ftrapv tell GCC to treat the specific undefined behavior as defined - namely trapping. We don't have a special flag for divide-by-zero-traps though (it's not exactly "overflow"). So maybe with making the folding more consistent we should simply add such flag, -fdivide-by-zero-traps which also makes modulo-by-zero trap?