From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21259 invoked by alias); 11 Aug 2011 13:42:31 -0000 Received: (qmail 21248 invoked by uid 22791); 11 Aug 2011 13:42:30 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Aug 2011 13:42:14 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/49911] SRA + DOM + VRP + -fstrict-enums incorrectly remove predicate Date: Thu, 11 Aug 2011 13:42:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2011-08/txt/msg01100.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49911 --- Comment #15 from Richard Guenther 2011-08-11 13:41:24 UTC --- (In reply to comment #11) > > So, Eric - are you still objecting to make VRP and the middle-end aligned > > by ignoring TYPE_MIN/MAX_VALUE in VRP? > > Just to give a bit of context to the reader: this problem bit the Ada compiler > since VRP had been introduced in 2004. At the time, the consensus was that the > Ada compiler was lying to the middle-end, because objects of type T could have > values that are outside [TYPE_MIN_VALUE:TYPE_MAX_VALUE] in some cases and this > breaks an invariant of the middle-end. So we changed the Ada compiler in 2009. > > If it appears that the previous consensus was short-sighted and should now be > reversed, fine with me, but please document what TYPE_MIN_VALUE/TYPE_MAX_VALUE > mean under the new one. And if they don't mean anything, then remove them. No, they still mean "nothing", but VRP assumes they are the canonical value according to precision/signedness. Which C and C++ do not follow. Unfortunately the C and C++ maintainers do not care (and probably have a harder job "fixing" this because they lack the nice separation of the "real" frontend and the interface to GENERIC). As they mean "nothing" I would like to make VRP not assume anything about them (and VRP is really the only one caring for TYPE_MIN/MAX_VALUE apart from array domain uses).