From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31008 invoked by alias); 10 Oct 2006 14:33:01 -0000 Received: (qmail 30957 invoked by uid 48); 10 Oct 2006 14:32:50 -0000 Date: Tue, 10 Oct 2006 14:33:00 -0000 Message-ID: <20061010143250.30956.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/28230] [4.2 Regression] -O2 -fwrapv miscompiles gcc, binutils, gzip. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-10/txt/msg00797.txt.bz2 List-Id: ------- Comment #17 from rguenth at gcc dot gnu dot org 2006-10-10 14:32 ------- No, it's extract_range_from_binary_expr operating on [0, +INF] + [0, 65535] and blindly using int_const_binop to compute the resulting range... I believe the following is completely bogus and we cannot ignore overflows in range arithmetic for wrapv either. static inline tree vrp_int_const_binop (enum tree_code code, tree val1, tree val2) { tree res; if (flag_wrapv) return int_const_binop (code, val1, val2, 0); -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2006-09-21 03:31:17 |2006-10-10 14:32:50 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28230