Commit Graph

17 Commits

Author SHA1 Message Date
Feng Wang 4a90ae54a0 [multiple changes]
2005-07-14  Steven G. Kargl  <kargls@comcast.net>

	* gfortran.dg/char_array_constructor.f90: New test.

2005-07-14  Feng Wang  <fengwang@nudt.edu.cn>
	Steven G. Kargl  <kargls@comcast.net>

	* array.c (resolve_character_array_constructor): Allocate gfc_charlen
	for the array and attach to namespace list for automatic deallocation.

From-SVN: r102002
2005-07-14 01:37:41 +00:00
Kelley Cook ab57747bb0 Update FSF address.
From-SVN: r101310
2005-06-25 00:40:37 +00:00
Tobias Schlüter ab21e2722d array.c (gfc_match_array_constructor): Disallow empty array constructor.
fortran/
2005-06-03  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
	Erik Edelmann  <erik.edelmann@iki.fi>

	* array.c (gfc_match_array_constructor): Disallow empty array
	constructor.
testsuite/
2005-06-04  Erik Edelmann  <erik.edelmann@iki.fi>

	* gfortran.dg/array_constructor_3.f90: New test.

From-SVN: r100579
2005-06-04 12:26:57 +02:00
Erik Edelmann acc75ae36e array.c (gfc_match_array_constructor): Support [ ...
fortran/
	* array.c (gfc_match_array_constructor): Support [ ... ]
	style array constructors.
testsuite/
	* gfortran.dg/array_constructor_1.f90: New test.
	* gfortran.dg/array_constructor_2.f90: New test.

From-SVN: r99919
2005-05-18 21:20:31 +02:00
Feng Wang df7cc9b576 re PR fortran/15959 (ICE and assertion failure in trans-decl.c with character initialization)
2005-04-05  Feng Wang  <fengwang@nudt.edu.cn>

	PR fortran/15959
	PR fortran/20713

	* array.c (resolve_character_array_constructor): New function. Set
	constant character array's character length.
	(gfc_resolve_array_constructor): Use it.
	* decl.c (add_init_expr_to_sym): Set symbol and initializer character
	length.
	(gfc_set_constant_character_len): New function. Set constant character
	expression according the given length.
	* match.h (gfc_set_constant_character_len): Add prototype.

2005-04-05  Feng Wang  <fengwang@nudt.edu.cn>

	* gfortran.dg/pr15959.f90: New test.
	* gfortran.dg/string_pad_trunc.f90: New test.

From-SVN: r97613
2005-04-05 08:54:50 +00:00
Tobias Schlüter 231b2fccf5 gfortran.h (gfc_add_dimension, [...]): Add argument.
* gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
gfc_add_procedure): Add argument.
* array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
gfc_match_null, match_type_spec, match_attr_spec,
gfc_match_formal_arglist, match_result, gfc_match_function_decl):
Update callers to match.
(gfc_match_entry) : Likewise, fix comment typo.
(gfc_match_subroutine, attr_decl1, gfc_add_dimension,
access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
gfc_match_derived_decl): Update callers.
* interface.c (gfc_match_interface): Likewise.
* match.c (gfc_match_label, gfc_add_flavor,
gfc_match_call, gfc_match_common, gfc_match_block_data,
gfc_match_namelist, gfc_match_module, gfc_match_st_function):
Likewise.
* parse.c (parse_derived, parse_interface, parse_contained),
primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
* resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
* symbol.c (check_conflict, check_used): Add new 'name' argument,
use when printing error message.
(gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
gfc_add_generic, gfc_add_in_common, gfc_add_data,
gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
gfc_add_procedure): Add new 'name' argument.  Pass along to
check_conflict and check_used.
(gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
gfc_add_pure, gfc_add_recursive, gfc_add_intent,
gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
argument in calls to any of the modified functions.

From-SVN: r94718
2005-02-07 23:16:13 +01:00
Kazu Hirata ec3781807e arith.c, [...]: Update copyright.
* arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
	gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
	match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
	scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
	trans-io.c, trans-stmt.c, trans.c: Update copyright.

From-SVN: r93830
2005-01-18 12:11:56 +00:00
Steven G. Kargl d22e48951c arith.c: Add system.h; remove string.h
* arith.c: Add system.h; remove string.h
        * decl.c: Ditto
        * matchexp.c: Ditto
        * parse.c: Ditto
        * resolve.c: Ditto
        * st.c: Ditto
        * check.c: Remove stdlib.h and stdarg.h
        * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
        * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
        * f95-lang.c: Add system.h; remove stdio.h
        * interface.c: Add system.h; remove stdlib.h and string.h
        * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
        * io.c: Remove string.h
        * simplify.c: Ditto
        * match.c: Remove stdarg.h and string.h
        * misc.c: Update copyright; add system.h; remove stdlib.h,
        string.h, and sys/stat.h
        * module.c: Add system.h; remove string.h, stdio.h, errno.h,
        unistd.h, and time.h
        * option.c: Remove string.h and stdlib.h
        * primary.c: Ditto
        * scanner.c: Update copyright; add system.h; remove stdlib.h,
        stdio.h, string.h, and strings.h
        * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
        * trans-array.c: Remove stdio.h and gmp.h
        * trans-const.c: Ditto
        * trans-expr.c: Ditto
        * trans-io.c: Ditto
        * trans-stmt.c: Ditto
        * trans.c: Ditto
        * trans-intrinsic.c: Remove stdio.h and string.h

From-SVN: r92866
2005-01-03 13:43:55 -08:00
Steven G. Kargl 8d5cfa2765 re PR fortran/16222 (non-integral DO loop variables are unsupported.)
2004-12-12  Steven G. Kargl  <kargls@comcast.net>
	Paul Brook  <paul@codesourcery.com>

	PR fortran/16222
	* resolve.c (gfc_resolve_iterator_expr): New function.
	(gfc_resolve_iterator): Use it.  Add real_ok argument.  Convert
	start, end and stride to correct type.
	(resolve_code): Pass extra argument.
	* array.c (resolve_array_list): Pass extra argument.
	* gfortran.h (gfc_resolve): Add prototype.
	* trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
	Handle real type iterators.
testsuite/
	* gfortran.dg/real_do_1.f90: New test.

Co-Authored-By: Paul Brook <paul@codesourcery.com>

From-SVN: r92057
2004-12-12 20:27:02 +00:00
Kazu Hirata f7b529fae7 arith.c, [...]: Fix comment formatting.
* arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
	gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
	module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
	trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
	trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.

From-SVN: r90266
2004-11-08 14:56:41 +00:00
Kazu Hirata 1f2959f06e array.c, [...]: Fix comment typos.
* array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
	interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
	resolve.c, scanner.c, trans-array.c, trans-array.h,
	trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
	trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
	trans.h: Fix comment typos.  Follow spelling conventions.

From-SVN: r87605
2004-09-16 16:00:45 +00:00
Paul Brook 6e45f57bf3 array.c: Don't include assert.h.
* array.c: Don't include assert.h.
	* data.c: Don't include assert.h.  Replace assert and abort with
	gcc_assert and gcc_unreachable.
	* dependency.c: Ditto.
	* f95-lang.c: Ditto.
	* iresolve.c: Ditto.
	* resolve.c: Ditto.
	* simplify.c: Ditto.
	* symbol.c: Ditto.
	* trans-array.c: Ditto.
	* trans-common.c: Ditto.
	* trans-const.c: Ditto.
	* trans-decl.c: Ditto.
	* trans-expr.c: Ditto.
	* trans-intrinsic.c: Ditto.
	* trans-io.c: Ditto.
	* trans-stmt.c: Ditto.
	* trans-types.c: Ditto.
	* trans.c: Ditto.

From-SVN: r87187
2004-09-08 14:33:03 +00:00
Tobias Schlüter 4077d20743 re PR fortran/13201 (PARAMETER variables of nonconstant shape are accepted)
PR fortran/13201
* resolve.c (resolve_symbol): Verify that the shape of a
parameter array is not only explicit, but also constant.
* array.c (gfc_is_compile_time_shape): New function.
* gfortran.h (gfc_is_compile_time_shape): Add prototype.

From-SVN: r84400
2004-07-09 23:20:50 +02:00
Tobias Schlüter da4f9e3b4d array.c (gfc_insert_constructor): Avoid redundant call to mpz_comp.
* array.c (gfc_insert_constructor): Avoid redundant call to
mpz_comp. Add 2004 to copyright years.

From-SVN: r83442
2004-06-21 19:16:25 +02:00
Tobias Schlüter 63645982e7 gfortran.h (gfc_current_locus, [...]): Remove.
* gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
(gfc_current_locus): Declare new global variable.
* scanner.c (gfc_current_locus, gfc_set_locus): Remove.
(gfc_current_locus1): Rename ...
(gfc_current_locus): ... to this.
(gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
and gfc_current_locus(), respectively.
* array.c (match_subscript, gfc_match_array_ref, match_array_list,
match_array_cons_element, gfc_match_array_constructor):
Read/modify gfc_current_locus instead of calling gfc_set_locus()
and gfc_current_locus().
* decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
match_attr_spec, gfc_match_function_decl, gfc_match_end,
attr_decl1, gfc_match_save): Likewise.
* error.c (error_print, gfc_internal_error): Likewise.
* expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
* interface.c (gfc_add_interface): Likewise.
* io.c (gfc_match_format, match_dt_format, match_dt_element,
match_io_iterator, match_io): Likewise.
* match.c (gfc_match_space, gfc_match_eos,
gfc_match_small_literal_int, gfc_match_st_label,
gfc_match_strings, gfc_match_name, gfc_match_iterator,
gfc_match_char, gfc_match, gfc_match_assignment,
gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
gfc_match_nullify, gfc_match_call, match_implicit_range,
gfc_match_implicit, gfc_match_data, match_case_selector,
gfc_match_case, match_forall_iterator): Likewise.
* matchexp.c (gfc_match_defined_op_name, next_operator,
match_level_1, match_mult_operand, match_ext_mult_operand,
match_add_operand, match_ext_add_operand, match_level_2,
match_level_3, match_level_4, match_and_operand, match_or_operand,
match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
* module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
* parse.c (match_word, decode_statement, next_free, next_fixed,
add_statement, verify_st_order, parse_if_block, gfc_parse_file):
Likewise.
* primary.c (match_digits, match_integer_constant,
match_boz_constant, match_real_constant, match_substring,
next_string_char, match_charkind_name, match_string_constant,
match_logical_constant, match_const_complex_part,
match_complex_constant, match_actual_arg, match_keyword_arg,
gfc_match_actual_arglist, gfc_match_structure_constructor,
gfc_match_rvalue, gfc_match_variable): Likewise.
* st.c (gfc_get_code): Likewise.
* symbol.c (check_conflict, check_used, check_done,
duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.

From-SVN: r82320
2004-05-27 14:35:12 +02:00
Tobias Schlüter 9fc4d79ba4 Make-lang.in, [...]: Update copyright years and boilerplate.
* Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
trans-array.c, trans-array.h, trans-common.c, trans-const.c,
trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
trans-types.h, trans.c, trans.h: Update copyright years and
boilerplate.
* data.c: Likewise, also removed two whitespace-only lines.
        * gfortranspec.c, lang.opt: Update copyright years.

From-SVN: r81839
2004-05-14 15:00:04 +02:00
Diego Novillo 6de9cd9a88 Merge tree-ssa-20020619-branch into mainline.
From-SVN: r81764
2004-05-13 02:41:07 -04:00