This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/36886] misaligment for cshift of character
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Aug 2008 09:22:26 -0000
- Subject: [Bug libfortran/36886] misaligment for cshift of character
- References: <bug-36886-10391@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from tkoenig at gcc dot gnu dot org 2008-08-03 09:22 -------
(In reply to comment #4)
> > Created an attachment (id=16001)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16001&action=view) [edit]
> > better patch
>
> I think some of the run-time checks (with -fbounds-checks) for PR 36874 can be
> best done in libgfortran. How about including in your patch a check that the
> shape of ARRAY (minus dimension DIM) is conformable with the SHIFT argument?
I've done so for other intrinsics (see PR 34670), and I plan to do so
for cshift as well.
Not with this patch, though; I like to do one thing at a time :-)
> I was additionally wondering whether one should change error code such as:
> if (which < 0 || (which + 1) > GFC_DESCRIPTOR_RANK (array))
> into
> if (__builtin_expect (which < 0 || (which + 1) > GFC_DESCRIPTOR_RANK (array),
> 0))
> to speed up the run time by a tiny bit.
Sure, we could do that for all of the run-time checks.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36886