This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: PR testsuite/21865 (really a middle-end vector bug)


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;
        }
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]