Patch: PR testsuite/21865 (really a middle-end vector bug)
Steve Ellcey
sje@cup.hp.com
Mon Jun 27 21:32:00 GMT 2005
This is a patch for PR testsuite/21865. The defect is marked as a
testsuite bug but I believe this is a compiler bug in that we try to
align vectors with an alignment that is greater than BIGGEST_ALIGNMENT.
I don't believe the default alignment should ever be greater than
BIGGEST_ALIGNMENT.
Tested on 32 and 64 bit PA to verify that pr21817-1.c no longer fails.
Also verified that were no regressions.
Steve Ellcey
sje@cup.hp.com
2005-06-27 Steve Ellcey <sje@cup.hp.com>
PR testsuite/21865
* stor-layout.c (layout_type): Do not align beyond BIGGEST_ALIGNMENT.
*** gcc.orig/gcc/stor-layout.c Mon Jun 27 14:20:14 2005
--- gcc/gcc/stor-layout.c Mon Jun 27 14:21:10 2005
*************** layout_type (tree type)
*** 1646,1653 ****
nunits_tree, 0);
/* Always naturally align vectors. This prevents ABI changes
! depending on whether or not native vector modes are supported. */
! TYPE_ALIGN (type) = tree_low_cst (TYPE_SIZE (type), 0);
break;
}
--- 1646,1656 ----
nunits_tree, 0);
/* Always naturally align vectors. This prevents ABI changes
! depending on whether or not native vector modes are supported,
! but do not try to align beyond BIGGEST_ALIGNMENT. */
!
! TYPE_ALIGN (type) = MIN (tree_low_cst (TYPE_SIZE (type), 0),
! BIGGEST_ALIGNMENT);
break;
}
More information about the Gcc-patches
mailing list