[fortran] Disable use of -malign-double

Steve Kargl sgk@troutmask.apl.washington.edu
Thu Feb 1 03:54:00 GMT 2007


On Wed, Jan 31, 2007 at 09:59:32PM -0500, Andrew Pinski wrote:
> > 
> > On Wed, Jan 31, 2007 at 06:32:58PM -0800, Jerry DeLisle wrote:
> > > Andrew Pinski wrote:
> > > >>On Tue, Jan 30, 2007 at 11:17:23PM -0800, Andrew Pinski wrote:
> > > >>>On Tue, 2007-01-30 at 23:11 -0800, Steve Kargl wrote:
> > > >>>
> > > >>How about this patch?
> > > >
> > > >This is the wrong approach as some target might define -malign-double
> > > >to mean something different from x86's definition.  Also I don't think
> > > >we should be erroring out if someone compiles the whole libc, libgfortran,
> > > >etc. with -malign-double which will work.
> > No other target uses -malign-double to means something else.  If 
> > another target did re-use this option to mean something else, then
> > that would be a bug.
> 
> Why?  This is a target specific option (it starts with -m).

info gcc

> 
> > History shows that few people actually read documentation.
> > In fact, history shows that even when you tell people the
> > exact words in the documentation, they still ignore you.
> 
> So that is their problem, when stuff does not work and they
> use an option which changes the ABI, then they get what they
> deserve.  Really we should not have these options but for somereason in the
> past, people thought it was a good idea to expose stuff like this.

And, then we enter the infinite loop of anwswer the same old questions.

> 
> You don't want to error out on all options that change the ABI in the
> gfortran front-end.  If you want to error out for -malign-double, then error
> out for the other options like -mabi=d64 and -mrtd and -mregparm= and
> -malign-natural and -msoft-fp (which by the way changes the ABI but it
> defaults to having a multilib on most targets except for x86).  You now
> see the issue with the error on one target specific ABI changing option.

I'll get those when bogus bug reports come in :-)

> Also by the way I could compile all of the libraries with -malign-double
> and have the option work correctly so erroring out is wrong. 

Are you sure?  What is the ramification of -malign-double on
derived types?

type aligned
  character(len=3) s
  integer(2) i
  real(8) d
  real(4)
end type aligned

Then there is the sequence attribute

type aligned
  sequence
  character(len=3) s
  integer(2) i
  real(8) d
  real(4)
end type aligned

-- 
Steve



More information about the Fortran mailing list