This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, omp] Patch to omp-low.c to fix failures on IA64 HP-UX
On Fri, 2008-10-31 at 13:16 +0100, Jakub Jelinek wrote:
> Can you test it on HPUX?
>
> --- gcc/omp-low.c.jj 2008-09-30 16:57:11.000000000 +0200
> +++ gcc/omp-low.c 2008-10-31 13:03:00.000000000 +0100
> @@ -3681,8 +3681,20 @@ expand_omp_for_generic (struct omp_regio
> t4 = build_fold_addr_expr (iend0);
> t3 = build_fold_addr_expr (istart0);
> t2 = fold_convert (fd->iter_type, fd->loop.step);
> - t1 = fold_convert (fd->iter_type, fd->loop.n2);
> - t0 = fold_convert (fd->iter_type, fd->loop.n1);
> + if (POINTER_TYPE_P (type)
> + && TYPE_PRECISION (type) != TYPE_PRECISION (fd->iter_type))
> + {
> + /* Avoid casting pointers to integer of a different size. */
> + tree itype
> + = lang_hooks.types.type_for_size (TYPE_PRECISION (itype), 0);
I am assuming that should be "TYPE_PRECISION (type)", not
"TYPE_PRECISION (itype)" in the type_for_size call. I will test the
patch with that change.
Steve Ellcey
sje@cup.hp.com