From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13610 invoked by alias); 16 Feb 2006 12:57:07 -0000 Received: (qmail 13572 invoked by uid 48); 16 Feb 2006 12:57:04 -0000 Date: Thu, 16 Feb 2006 12:57:00 -0000 Message-ID: <20060216125704.13571.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/26316] [4.2 Regression] loop-invariant miscompiles openmp.c In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub 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-02/txt/msg01815.txt.bz2 List-Id: ------- Comment #2 from jakub at gcc dot gnu dot org 2006-02-16 12:57 ------- It doesn't need to be marked as trapping. If you have if (idx <= 20) val = p[idx]; you certainly can't change this into: tmp = p[idx]; if (idx <= 20) val = tmp; except if tmp = p[idx]; is speculative load that won't trap if the address is invalid. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26316