From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10992 invoked by alias); 23 Jun 2006 04:47:30 -0000 Received: (qmail 10878 invoked by alias); 23 Jun 2006 04:47:12 -0000 Date: Fri, 23 Jun 2006 04:47:00 -0000 Message-ID: <20060623044712.10871.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/16206] rejects valid array initialization expression In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pault at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-06/txt/msg02109.txt.bz2 List-Id: ------- Comment #11 from pault at gcc dot gnu dot org 2006-06-23 04:47 ------- Subject: Bug 16206 Author: pault Date: Fri Jun 23 04:46:50 2006 New Revision: 114925 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114925 Log: 2006-06-23 Paul Thomas PR fortran/25049 PR fortran/25050 * check.c (non_init_transformational): New function. (find_substring_ref): New function to signal use of disallowed transformational intrinsic in an initialization expression. (gfc_check_all_any): Call previous if initialization expr. (gfc_check_count): The same. (gfc_check_cshift): The same. (gfc_check_dot_product): The same. (gfc_check_eoshift): The same. (gfc_check_minloc_maxloc): The same. (gfc_check_minval_maxval): The same. (gfc_check_gfc_check_product_sum): The same. (gfc_check_pack): The same. (gfc_check_spread): The same. (gfc_check_transpose): The same. (gfc_check_unpack): The same. PR fortran/18769 *intrinsic.c (add_functions): Add gfc_simplify_transfer. *intrinsic.h : Add prototype for gfc_simplify_transfer. *simplify.c (gfc_simplify_transfer) : New function to act as placeholder for eventual implementation. Emit error for now. PR fortran/16206 * expr.c (find_array_element): Eliminate condition on length of offset. Add bounds checking. Rearrange exit. Return try and put gfc_constructor result as an argument. (find_array_section): New function. (find_substring_ref): New function. (simplify_const_ref): Add calls to previous. (simplify_parameter_variable): Return on NULL expr. (gfc_simplify_expr): Only call gfc_expand_constructor for full arrays. PR fortran/20876 * match.c (gfc_match_forall): Add missing locus to gfc_code. 2006-06-23 Paul Thomas PR fortran/16206 * gfortran.dg/array_initializer_1.f90: New test. Added: branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/array_initializer_1.f90 Modified: branches/gcc-4_1-branch/gcc/fortran/ChangeLog branches/gcc-4_1-branch/gcc/fortran/check.c branches/gcc-4_1-branch/gcc/fortran/expr.c branches/gcc-4_1-branch/gcc/fortran/intrinsic.c branches/gcc-4_1-branch/gcc/fortran/intrinsic.h branches/gcc-4_1-branch/gcc/fortran/match.c branches/gcc-4_1-branch/gcc/fortran/simplify.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16206