public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] PR fortran/68053 -- Reduce initialization expression to constant value
@ 2015-11-08 22:36 Steve Kargl
  2015-11-08 22:37 ` Steve Kargl
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Kargl @ 2015-11-08 22:36 UTC (permalink / raw)
  To: fortran, gcc-patches

The attached patch has been built and regression tested
on i386-*-freebsd and x86_64-*-freebsd.  If an array
index in an initialization expression is an array element
from an array named constant, the array index needs to be
reduced.  This patch causes the reduction to occur.
OK to commit?

2015-11-08  Steven g. Kargl  <kargl@gcc.gnu.org>

	PR fortran/68053
	* decl.c (add_init_expr_to_sym):  Try to reduce initialization expression
	before testing for a constant value.

2015-11-08  Steven g. Kargl  <kargl@gcc.gnu.org>

	PR fortran/68053
	* gfortran.dg/pr68053.f90: New test.
-- 
Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-09  5:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-08 22:36 [PATCH] PR fortran/68053 -- Reduce initialization expression to constant value Steve Kargl
2015-11-08 22:37 ` Steve Kargl
2015-11-09  5:38   ` Paul Richard Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).