COMMON requires 4 bytes of padding at start

Janus Weil jaydub66@googlemail.com
Sat Sep 20 17:34:00 GMT 2008


Hi all,

here is an extended patch which implements the new options
falign-commons and Walign-commons, both of which default to true, so
that gfortran's default behavior is the same as before (COMMON block
are padded and warned about). The patch includes documentation and
test cases.
There has been some discussion in this thread as well as in the PR
regarding the defaults and the validity of the test case. I am really
indifferent with regards to the default behavior, as long as there is
an option to change it, which is just what the patch implements.

Ok for trunk?

Janus


2008-09-20  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/37486
	* gfortran.h (gfc_option_t): New members flag_align_commons and
	warn_align_commons.
	* lang.opt: New options falign-commons and Walign-commons.
	* invoke.texi: Documentation for new options.
	* options.c (gfc_init_options): Initialize new options.
	(gfc_handle_options): Handle new options.
	* trans-common.c (translate_common): Implement new options.


2008-09-20  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/37486
	* gfortran.dg/common_align_1.f90: New.
	* gfortran.dg/warn_align_commons.f90: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flag_align_commons.diff
Type: text/x-patch
Size: 8088 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080920/8fda2d75/attachment.bin>


More information about the Fortran mailing list