Go to file
Paul Thomas 597553ab3c re PR fortran/35810 ([TR 15581 / F2003] Automatic reallocation on assignment to allocatable variables)
2010-11-28  Paul Thomas  <pault@gcc.gnu.org>

	 PR fortran/35810
	* trans-array.c (gfc_trans_array_constructor): If the loop->to
	is a VAR_DECL, assume this is dynamic. In this case, use the
	counter to obtain the value and set loop->to appropriately.
	(gfc_conv_ss_descriptor): Always save the offset of a variable
	in info.saved_offset.
	(gfc_conv_ss_startstride): Do not attempt bound checking of the
	lhs of an assignment, if allocatable and f2003 is allowed.
	(gfc_conv_loop_setup): If possible, do not use an allocatable
	lhs variable for the loopspec.
	(gfc_is_reallocatable_lhs): New function.
	(get_std_lbound): New function.
	(gfc_alloc_allocatable_for_assignment): New function.
	* gfortran.h : Add flag_realloc_lhs to the options structure.
	* lang.opt : Add option f(no-)realloc-lhs.
	* invoke.texi : Document option f(no-)realloc-lhs.
	* options.c (gfc_init_options, gfc_post_options,
	gfc_handle_option): Incorporate f(no-)realloc-lhs with default
	to frealloc_lhs for -std > f95.
	* trans-array.h : Add primitive for previous.
	* trans-expr.c (gfc_conv_string_length): Return if character
	length is a variable and the expression is NULL.
	(gfc_conv_procedure_call): If the call is of the kind x = f(...)
	and the lhs is allocatable and reallocation on assignment OK,
	call gfc_alloc_allocatable_for_assignment. Do not generate the
	function call unless direct by reference.
	(realloc_lhs_loop_for_fcn_call): New function.
	(realloc_lhs_bounds_for_intrinsic_call): New function.
	(gfc_trans_arrayfunc_assign): Reallocation assignments need
	a loopinfo and for the loop bounds to be set.  With intrinsic
	functions, free the lhs data and let the library allocate the
	data array. Done by the new functions above.
	(gfc_trans_assignment_1): If the lhs is allocatable and
	reallocation on assignment is allowed, mark the lhs and use
	gfc_alloc_allocatable_for_assignment to make the reallocation.
	* trans.h : Add is_alloc_lhs bitfield to gfc_ss structure.

2010-11-28  Paul Thomas  <pault@gcc.gnu.org

	PR fortran/35810
	* gfortran.dg/realloc_on_assign_1.f03: New test.
	* gfortran.dg/realloc_on_assign_2.f03: New test.
	* gfortran.dg/transpose_2.f90: dg-option -fno-realloc-lhs.
	* gfortran.dg/unpack_bounds_1.f90: The same.
	* gfortran.dg/cshift_bounds_2.f90: The same.
	* gfortran.dg/matmul_bounds_2.f90: The same.
	* gfortran.dg/matmul_bounds_3.f90: The same.
	* gfortran.dg/matmul_bounds_4.f90: The same.
	* gfortran.dg/matmul_bounds_5.f90: The same.

From-SVN: r167220
2010-11-28 13:47:26 +00:00
boehm-gc configure: Regenerate. 2010-10-28 22:37:36 +00:00
config bootstrap-lto.mk (BOOT_ADAFLAGS): Delete. 2010-11-27 15:53:23 +00:00
contrib make_sunver.pl: Use elfdump -s to extract symbols if possible, readelf -s otherwise. 2010-11-25 18:16:57 +00:00
fixincludes PR other/46202: implement install-strip. 2010-11-20 19:37:08 +00:00
gcc re PR fortran/35810 ([TR 15581 / F2003] Automatic reallocation on assignment to allocatable variables) 2010-11-28 13:47:26 +00:00
gnattools PR other/46202: implement install-strip. 2010-11-20 19:37:08 +00:00
include simple-object.h (simple_object_attributes_merge): Declare, replacing simple_object_attributes_compare. 2010-11-17 01:03:06 +00:00
INSTALL
intl Fix unportable shell quoting. 2010-09-27 20:19:41 +00:00
libada PR other/46202: implement install-strip. 2010-11-20 19:37:08 +00:00
libcpp * es.po: Update. 2010-11-23 23:26:07 +00:00
libdecnumber cppbuiltin.c (define_builtin_macros_for_type_sizes): Define __FLOAT_WORD_ORDER__ according to FLOAT_WORDS_BIG_ENDIAN. 2010-11-24 23:29:41 +00:00
libffi libffi-dg.exp: Rename ... 2010-11-15 20:30:37 +00:00
libgcc cppbuiltin.c (define_builtin_macros_for_type_sizes): Define __FLOAT_WORD_ORDER__ according to FLOAT_WORDS_BIG_ENDIAN. 2010-11-24 23:29:41 +00:00
libgfortran re PR fortran/32049 (Support on x86_64 also kind=16) 2010-11-16 22:23:19 +01:00
libgomp fortran.exp: Add paths for libquadmath. 2010-11-24 19:26:27 +00:00
libiberty Fix build regression 2010-11-21 03:29:27 +00:00
libjava jvmti.exp (gcj_jvmti_compile_cxx_to_o): Add -pthread on alpha*-dec-osf*. 2010-11-09 09:38:23 +00:00
libmudflap re PR testsuite/20003 (libmudflap.cth timeouts too short) 2010-10-31 22:04:20 -04:00
libobjc In libobjc/: 2010-11-23 Richard Frith-Macdonald <rfm@gnu.org> 2010-11-23 19:20:54 +00:00
libquadmath Makefile.am (libquadmath_la_LIBADD): Move -lm ... 2010-11-19 12:13:13 +00:00
libssp configure.ac (gfortran_use_symver): Only check for Sun-style symbol versioning on Solaris 2. 2010-07-02 16:17:04 +00:00
libstdc++-v3 re PR libstdc++/46683 (FAIL: ext/profile/all.cc) 2010-11-28 10:22:55 +00:00
lto-plugin lto-plugin.c (add_output_files): Fix memory leak. 2010-11-13 19:49:07 +01:00
maintainer-scripts gcc_release (snapshot_print): Also include an sha1 hash for every tarball. 2010-08-23 18:52:06 +00:00
zlib Update to Automake 1.11.1. 2010-04-02 18:18:06 +00:00
ABOUT-NLS
ChangeLog re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character return type) 2010-11-26 04:25:32 +00:00
ChangeLog.tree-ssa
compile Update automake-provided files in the toplevel. 2009-08-22 11:47:16 +00:00
config-ml.in config-ml.in: Add Go support... 2010-11-19 20:25:49 +00:00
config.guess config.sub: Update to version 2010-05-21. 2010-05-25 13:22:07 +00:00
config.rpath * config.rpath: Add AIX 6 support. 2008-03-13 14:55:20 -04:00
config.sub config.sub: Update to version 2010-05-21. 2010-05-25 13:22:07 +00:00
configure re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character return type) 2010-11-26 04:25:32 +00:00
configure.ac re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character return type) 2010-11-26 04:25:32 +00:00
COPYING
COPYING3 COPYING_v3: New file. 2007-07-17 08:37:53 +00:00
COPYING3.LIB COPYING_v3: New file. 2007-07-17 08:37:53 +00:00
COPYING.LIB
COPYING.RUNTIME Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
depcomp Update automake-provided files in the toplevel. 2009-08-22 11:47:16 +00:00
install-sh Update automake-provided files in the toplevel. 2009-08-22 11:47:16 +00:00
libtool-ldflags re PR bootstrap/31906 ("-Xcompiler" is inserted after "-Xlinker" when building libstdc++) 2007-09-20 10:20:05 +00:00
libtool.m4 Sync from git Libtool and regenerate. 2009-12-05 17:18:53 +00:00
lt~obsolete.m4 Sync from git Libtool and regenerate. 2009-12-05 17:18:53 +00:00
ltgcc.m4 libtool.m4: Update to libtool 2.2.6. 2008-09-26 16:21:02 +00:00
ltmain.sh Sync from git Libtool and regenerate. 2009-12-05 17:18:53 +00:00
ltoptions.m4 Sync from git Libtool and regenerate. 2009-12-05 17:18:53 +00:00
ltsugar.m4 libtool.m4: Update to libtool 2.2.6. 2008-09-26 16:21:02 +00:00
ltversion.m4 Sync from git Libtool and regenerate. 2009-12-05 17:18:53 +00:00
MAINTAINERS MAINTAINERS (Write After Approval): Add myself. 2010-11-18 20:56:26 +00:00
Makefile.def re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character return type) 2010-11-26 04:25:32 +00:00
Makefile.in re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character return type) 2010-11-26 04:25:32 +00:00
Makefile.tpl re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character return type) 2010-11-26 04:25:32 +00:00
missing Update automake-provided files in the toplevel. 2009-08-22 11:47:16 +00:00
mkdep
mkinstalldirs Update automake-provided files in the toplevel. 2009-08-22 11:47:16 +00:00
move-if-change Import from Autoconf sources: 2005-11-21 13:21:37 +11:00
README README: Refer to the various COPYING* files instead of just COPYING. 2009-10-10 20:59:49 +00:00
symlink-tree
ylwrap Update automake-provided files in the toplevel. 2009-08-22 11:47:16 +00:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.