This is the mail archive of the gcc@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]

Re: ix86_data_alignment: bad defaults?


> > I like the "min (256, MAX_OFILE_ALIGNMENT)" fix...
> 
> So do I.

Ok to apply then?  Tested via djgpp cross-compile and cross-host.

	* config/i386/i386.c (ix86_data_alignment): Don't specify an
	alignment bigger than the object file can handle.

Index: i386.c
===================================================================
--- i386.c	(revision 122271)
+++ i386.c	(working copy)
@@ -15417,7 +15417,7 @@
 int
 ix86_data_alignment (tree type, int align)
 {
-  int max_align = optimize_size ? BITS_PER_WORD : 256;
+  int max_align = optimize_size ? BITS_PER_WORD : MIN (256, MAX_OFILE_ALIGNMENT);
 
   if (AGGREGATE_TYPE_P (type)
       && TYPE_SIZE (type)


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