PR fortran/36517, fortran/36492
authorDaniel Kraft <d@domob.eu>
Wed, 18 Jun 2008 13:53:32 +0000 (15:53 +0200)
committerDaniel Kraft <domob@gcc.gnu.org>
Wed, 18 Jun 2008 13:53:32 +0000 (15:53 +0200)
commitd28480827e3674794d7d6793148c737d491bc9ba
tree639abee5a18c067cde88b601cac41a076983e196
parentf0c882ab6fcf7595b5d12203a9840202167d45f1
PR fortran/36517, fortran/36492

2008-06-18  Daniel Kraft  <d@domob.eu>

PR fortran/36517, fortran/36492
* gfortran.dg/array_constructor_25.f03:  New test.
* gfortran.dg/array_constructor_26.f03:  New test.
* gfortran.dg/array_constructor_27.f03:  New test.
* gfortran.dg/array_constructor_28.f03:  New test.
* gfortran.dg/array_constructor_29.f03:  New test.
* gfortran.dg/array_constructor_30.f03:  New test.
* gfortran.dg/array_constructor_type_19.f03:  New test.
* gfortran.dg/array_constructor_type_20.f03:  New test.
* gfortran.dg/array_constructor_type_21.f03:  New test.

2008-06-18  Daniel Kraft  <d@domob.eu>

PR fortran/36517, fortran/36492
* array.c (gfc_resolve_character_array_constructor):  Call
gfc_set_constant_character_len with changed length-chec argument.
* decl.c (gfc_set_constant_character_len):  Changed array argument to
be a generic length-checking argument that can be used for correct
checking with typespec and in special cases where the should-be length
is different from the target length.
(build_struct):  Call gfc_set_constant_character_len with changed length
checking argument and introduced additional checks for exceptional
conditions on invalid code.
(add_init_expr_to_sym), (do_parm):  Call gfc_set_constant_character_len
with changed argument.
* match.h (gfc_set_constant_character_len):  Changed third argument to
int for the should-be length rather than bool.

From-SVN: r136894
14 files changed:
gcc/fortran/ChangeLog
gcc/fortran/array.c
gcc/fortran/decl.c
gcc/fortran/match.h
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/array_constructor_25.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/array_constructor_26.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/array_constructor_27.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/array_constructor_28.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/array_constructor_29.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/array_constructor_30.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/array_constructor_type_19.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/array_constructor_type_20.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/array_constructor_type_21.f03 [new file with mode: 0644]