Commit Graph

23 Commits

Author SHA1 Message Date
Brooks Moses
e25a0da328 data.c: Remove trailing periods from error messages.
* data.c: Remove trailing periods from error messages.
* decl.c: Likewise.
* expr.c: Likewise.
* io.c: Likewise.
* match.c: Likewise.
* module.c: Likewise.
* options.c: Likewise.
* resolve.c: Likewise.
* symbol.c: Likewise.
* trans-io.c: Likewise.

From-SVN: r118880
2006-11-15 19:05:28 -08:00
Bud Davis
5868cbf992 re PR fortran/28974 (Extremely slow compilation of enumerated DATA statements.)
2006-11-15  Bud Davis <bdavis9659@sbcglobal.net>

        PR fortran/28974
        * gfortran.h (gfc_expr): Add element which holds a splay-tree
        for the exclusive purpose of quick access to a constructor by
        offset.
        * data.c (find_con_by_offset): Use the splay tree for the search.
        (gfc_assign_data_value): Use the splay tree.
        (gfc_assign_data_value_range): ditto.
        * expr.c (gfc_get_expr): Initialize new element to null.
        (gfc_free_expr): Delete splay tree when deleting gfc_expr.

From-SVN: r118844
2006-11-15 05:10:22 +00:00
Tobias Schlüter
bc0a33d315 data.c: Add 2006 to copyright years.
* data.c: Add 2006 to copyright years.
* interface.c: Same.
* misc.c: Same.
* trans-io.c: Same.

From-SVN: r118700
2006-11-11 18:10:24 +01:00
Francois-Xavier Coudert
150675a88b re PR fortran/29067 (gfc_resolve_expr(): Bad expression type)
PR fortran/29067

	* decl.c (gfc_set_constant_character_len): NULL-terminate the
	character constant string.
	* data.c (create_character_intializer): Likewise.
	* expr.c (gfc_simplify_expr): NULL-terminate the substring
	character constant.
	* primary.c (match_hollerith_constant): NULL-terminate the
	character constant string.

	* gfortran.dg/pr29067.f: New test.

From-SVN: r118338
2006-10-31 20:15:22 +00:00
Paul Thomas
5b440a1cf4 [multiple changes]
2006-10-17  Paul Thomas <pault@gcc.gnu.org>

	PR fortran/20541
	* trans-array.c (gfc_trans_array_bounds): Test for and set
	negative stride of a non-constant bound array to zero.

	PR fortran/29392
	* data.c (create_character_intializer): Copy and simplify
	the expressions for the start and end of a sub-string
	reference.

2006-10-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/29392
	* gfortran.dg/data_char_3.f90: New test.

	PR fortran/20541
	* gfortran.dg/negative_automatic_size.f90: New test.

From-SVN: r117797
2006-10-16 22:29:46 +00:00
Steven G. Kargl
6c655c5e60 data.c (gfc_assign_data_value): Fix comment typo.
2006-06-05  Steven G. Kargl  <kargls@comcast.net>

        * data.c (gfc_assign_data_value):  Fix comment typo.  Remove
        a spurious return.

From-SVN: r114406
2006-06-05 19:50:05 +00:00
Paul Thomas
6690a9e079 re PR fortran/14067 (no warning when character data statement overflows declared size)
2006-06-05  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/14067
	* data.c (create_character_intializer): Add warning message
	for truncated string.

	PR fortran/16943
	* symbol.c : Include flags.h.
	(gfc_add_type): If a procedure and types are the same do not
	throw an error unless standard is less than gnu or pedantic.

	PR fortran/20838
	* parse.c (parse_do_block): Error if named block do construct
	does not have a named enddo.

	PR fortran/27655
	* check.c (gfc_check_associated): Pick up EXPR_NULL for pointer
	as well as target and put error return at end of function.

2006-06-05  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/14067
	* gfortran.dg/data_char_1.f90: Add messages for truncated
	strings.

	PR fortran/16943
	* gfortran.dg/func_decl_2.f90: New test.

	PR fortran/20838
	* gfortran.dg/do_2.f90: New test.

	PR fortran/27655
	* gfortran.dg/associated_3.f90: New test.

From-SVN: r114385
2006-06-05 07:45:03 +00:00
Per Bothner
45a82bd957 data.c (gfc_assign_data_value): Handle USE_MAPPED_LOCATION.
* data.c (gfc_assign_data_value): Handle USE_MAPPED_LOCATION.
	* scanner.c (gfc_gobble_whitespace): Likewise.

From-SVN: r114310
2006-06-01 09:18:34 -07:00
Francois-Xavier Coudert
223f9d5aaa re PR fortran/27552 (-fdump-parse-tree doesn't like Holleriths (but then, who does?))
2006-05-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
            Feng Wang  <fengwang@nudt.edu.cn>

        PR fortran/27552
        * dump-parse-tree.c (gfc_show_expr): Deal with Hollerith constants.
        * data.c (create_character_intializer): Set from_H flag if character is
        initialized by Hollerith constant.


Co-Authored-By: Feng Wang <fengwang@nudt.edu.cn>

From-SVN: r113881
2006-05-18 02:31:41 +00:00
Paul Thomas
4075a94ef5 re PR fortran/24534 (PUBLIC derived types with private components)
2005-11-06  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/24534
	* resolve.c (resolve_symbol): Exclude case of PRIVATE declared
	within derived type from error associated with PRIVATE type
	components within derived type.

	PR fortran/20838
	PR fortran/20840
	* gfortran.h: Add prototype for gfc_has_vector_index.
	* io.c (gfc_resolve_dt): Error if internal unit has a vector index.
	* expr.c (gfc_has_vector_index): New function to check if any of
	the array references of an expression have vector inidices.
	(gfc_check_pointer_assign): Error if internal unit has a vector index.

	PR fortran/17737
	* data.c (gfc_assign_data_value): Remove gcc_assert that caused the ICE
	and replace by a standard dependent warning/error if overwriting an
	existing initialization.
	* decl.c (gfc_data_variable): Remove old error for already initialized
	variable and the unused error check for common block variables.  Add
	error for hots associated variable and standard dependent error for
	common block variables, outside of blockdata.
	* symbol.c (check_conflict): Add constraints for DATA statement.

2005-11-06  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/24534
	gfortran.dg/private_type_2.f90: Modified to check that case with
	PRIVATE declaration within derived type is accepted.

	PR fortran/20838
	gfortran.dg/pointer_assign_1.f90: New test.

	PR fortran/20840
	* gfortran.dg/arrayio_0.f90: New test.

	PR fortran/17737
	gfortran.dg/data_initialized.f90: New test.
	gfortran.dg/data_constraints_1.f90: New test.
	gfortran.dg/data_constraints_2.f90: New test.

From-SVN: r106567
2005-11-06 20:05:12 +00:00
Jakub Jelinek
31f74accb2 re PR fortran/20063 (n*'xxxx' disables padding)
PR fortran/20063
	* data.c (gfc_assign_data_value_range): Call
	create_character_initializer if last_ts is a character type.

	* gfortran.fortran-torture/execute/data_4.f90: New test.

From-SVN: r102349
2005-07-25 09:51:12 +02:00
Kelley Cook
ab57747bb0 Update FSF address.
From-SVN: r101310
2005-06-25 00:40:37 +00:00
Kazu Hirata
aa9c57ecdb data.c, [...]: Fix comment typos.
* data.c, parse.c, trans-array.c, trans-decl.c,
	trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
	trans.h: Fix comment typos.  Follow spelling conventions.

From-SVN: r100219
2005-05-26 18:36:11 +00:00
Kazu Hirata
e7dc5b4f22 data.c, [...]: Fix comment typos.
* data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
	trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
	trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
	Follow spelling conventions.

From-SVN: r94111
2005-01-23 14:36:26 +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
Kazu Hirata
13795658b5 data.c, [...]: Fix comment typos.
* data.c, decl.c, f95-lang.c, gfortran.h, match.c,
	trans-array.c, trans-common.c, trans-expr.c,
	trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
	comment typos.  Follow spelling conventions.

From-SVN: r87492
2004-09-14 12:37:28 +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
Richard Henderson
b85024359a re PR fortran/13465 (Data statement for large arrays compiles verrrry slllowwwly and shows quadratic behaviour.)
PR 13465
        * data.c (find_con_by_offset): Search ordered list; handle
        elements with repeat counts.
        (gfc_assign_data_value_range): New.
        * gfortran.h (struct gfc_data_value): Make repeat unsigned.
        (gfc_assign_data_value_range): Declare.
        * match.c (top_val_list): Extract repeat count into a temporary.
        * resolve.c (values): Make left unsigned.
        (next_data_value): Don't decrement left.
        (check_data_variable): Use gfc_assign_data_value_range.

From-SVN: r86443
2004-08-23 14:53:14 -07:00
Paul Brook
ec53454bff re PR fortran/14976 (.space is wrong)
PR fortran/14976
	PR fortran/16228
	* data.c (assign_substring_data_value): Remove.
	(create_character_intializer): New function.
	(gfc_assign_data_value): Track the typespec for the current
	subobject.  Use create_character_intializer.
testsuite/
	* gfortran.dg/data_char_1.f90: New test.

From-SVN: r86256
2004-08-19 16:45:21 +00:00
Tobias Schlüter
fd52837724 Make-lang.in (F95_OBJS, [...]): Alpabetize.
* Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alpabetize.  Move data.c
	* data.c (gfc_get_section_index):  Remove dependency on trans.h.

From-SVN: r83041
2004-06-12 19:48:41 +00:00
Tobias Schlüter
2fa548415a re PR fortran/15557 (Not Implemented: Substring reference in DATA statement)
fortran/
PR fortran/15557
* data.c (assign_substring_data_value): New function.
(gfc_assign_data_value): Call the new function if we're dealing
with a substring LHS.

testsuite/
PR fortran/15557
* gfortran.fortran-torture/execute/data_3.f90: New testcase.

From-SVN: r82570
2004-06-02 13:38:24 +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