------- Comment #3 from rakdver at atrey dot karlin dot mff dot cuni dot cz 2006-02-16 12:59 ------- Subject: Re: [4.2 Regression] loop-invariant miscompiles openmp.c
> 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. I certainly can change it this way if I know the memory is nontrapping. In particular, if may_trap_p from some reason returns false for the statement in question, that would be the cause of the problem. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26316