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
Tobias Schlüter
40f2165e2d
resolve.c (resolve_code): Impose correct restrictions on assigned variable.
...
fortran/
* resolve.c (resolve_code): Impose correct restrictions on
assigned variable.
testsuite/
* gfortran.dg/assign_1.f90: New test.
From-SVN: r91898
2004-12-08 13:27:54 +01: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
Tobias Schlüter
edbfca8fd7
re PR fortran/17676 (Problem with user operator)
...
PR fortran/17676
* resolve.c (resolve_operator): Use correct operator name in message.
From-SVN: r88726
2004-10-08 02:16:28 +02: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
0e6928d853
re PR fortran/16400 (Invalid usage of assumed-size arrays is not rejected)
...
fortran/
PR fortran/16400
PR fortran/16404
(port from g95)
* resolve.c (resolve_transfer): New function.
(resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
testsuite/
PR fortran/16404
* gfortran.dg/der_io_1.f90: XFAIL illegal testcase.
From-SVN: r86931
2004-09-01 23:07:39 +02:00
Tobias Schlüter
9d64df18fd
gfortran.h (gfc_default_*_kind): Remove prototypes, add extern variable declaration of same name.
...
* gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
variable declaration of same name.
* arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
Replace all calls to gfc_default_*_kind with variable accesses.
* trans-types.c: Same as above.
(gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
static qualifier. Replace all occurences.
(gfc_default_*_kind): Remove functions.
From-SVN: r86662
2004-08-27 16:49:35 +02:00
Tobias Schlüter
de37af8c4e
resolve.c (merge_argument_lists): Revert unintentionally committed change.
...
* resolve.c (merge_argument_lists): Revert unintentionally
committed change.
From-SVN: r86498
2004-08-24 18:58:33 +02:00
Tobias Schlüter
7be7d41bde
* resolve.c (resolve_entries): Fix a bunch of comment typos.
...
From-SVN: r86497
2004-08-24 18:54:52 +02: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
3d79abbdf8
re PR fortran/13082 (Function entries and entries with alternate returns not implemented)
...
2004-08-17 Paul Brook <paul@codesourcery.com>
Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/13082
* decl.c (get_proc_name): Update mystery comment.
(gfc_match_entry): Check for errors earlier. Add entry point to list.
* dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
* gfortran.h (symbol_attribute): Add entry_master. Document entry.
(struct gfc_entry_list): Define.
(gfc_get_entry_list): Define.
(struct gfc_namespace): Add refs and entries.
(enum gfc_exec_op): Add EXEC_ENTRY.
(struct gfc_code): Add ext.entry.
* module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
(mio_symbol_attribute): Don't save/reture addr->entry.
(mio_namespace_ref): Refcount namespaces.
* parse.c (accept_statement): Handle ST_ENTRY.
(gfc_fixup_sibling_symbols): Mark symbol as referenced.
(parse_contained): Fixup sibling references to entry points
after parsing the procedure body.
* resolve.c (resolve_contained_fntype): New function.
(merge_argument_lists, resolve_entries): New functions.
(resolve_contained_functions): Use them.
(resolve_code): Handle EXEC_ENTRY.
(gfc_resolve): Call resolve_entries.
* st.c (gfc_free_statement): Handle EXEC_ENTRY.
* symbol.c (gfc_get_namespace): Refcount namespaces.
(gfc_free_namespace): Ditto.
* trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
optional when multiple entry points are present.
* trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
(gfc_get_extern_function_decl): Add assertion. Fix coment.
(create_function_arglist, trans_function_start, build_entry_thunks):
New functions.
(gfc_build_function_decl): Rename ...
(build_function_decl): ... to this.
(gfc_create_function_decl): New function.
(gfc_generate_contained_functions): Use it.
(gfc_trans_entry_master_switch): New function.
(gfc_generate_function_code): Use new functions.
* trans-stmt.c (gfc_trans_entry): New function.
* trans-stmt.h (gfc_trans_entry): Add prototype.
* trans-types.c (gfc_get_function_type): Add entry point argument.
* trans.c (gfc_trans_code): Handle EXEC_ENTRY.
(gfc_generate_module_code): Call gfc_create_function_decl.
* trans.h (gfc_build_function_decl): Remove.
(gfc_create_function_decl): Add prototype.
testsuite/
* gfortran.dg/entry_1.f90: New test.
Co-Authored-By: Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
From-SVN: r86128
2004-08-17 15:34:12 +00:00
Tobias Schlüter
4f61394674
gfortran.h: Add comments.
...
2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
* gfortran.h: Add comments.
* parse.c (parse_contained): Fix comment typo.
* resolve.c (was_declared): Ditto.
* symbol.c: Ditto.
From-SVN: r85950
2004-08-13 17:24:09 +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
d3fcc995c2
re PR fortran/15481 ([meta-bugs] frontend adds superfluous symbols to namespaces)
...
fortran/
2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/15481
PR fortran/13372
PR fortran/13575
PR fortran/15978
* module.c (write_symbol, write_symtree): Remove workaround.
* primary.c (match_actual_arglist): Enhance comment.
(gfc_match_rvalue): Handle function call with first argument
a keyword argument correctly.
* resolve.c (resolve_symbol): Change call to
gfc_set_default_type to issue error if no implicit type
can be found.
* trans-decl.c (gfc_create_module_variable): Remove workaround.
testsuite/
PR fortran/15481
PR fortran/13372
PR fortran/13575
PR fortran/15978
* gfortran.fortran-torture/compile/implicit_2.f90: New test.
Also fixed David Billinghursts ChangeLog entry to use GMT
From-SVN: r84373
2004-07-09 16:53:45 +02:00
Janne Blomqvist
8750f9cdec
re PR fortran/15750 (IOLENGTH form of INQUIRE statement not implemented)
...
PR fortran/15750
* io.c (gfc_match_inquire): Bugfix for iolength related stuff.
(gfc_resolve_inquire): Resolve the iolength tag. Return
SUCCESS at end of function if no failure has occured.
* resolve.c (resolve_code): Resolve if iolength is encountered.
* trans-io.c: (ioparm_iolength, iocall_iolength,
iocall_iolength_done): New variables.
(last_dt): Add IOLENGTH.
(gfc_build_io_library_fndecls ): Set iolength related variables.
(gfc_trans_iolength): Implement.
(gfc_trans_dt_end): Treat iolength as a third form of data transfer.
libgfortran/
PR fortran/15750
* inquire.c (st_inquire): Add comment
* io.h (st_parameter): Add iolength.
(st_iolength, st_iolength_done): Declare.
* transfer.c (iolength_transfer, iolength_transfer_init,
st_iolength, st_iolength_done): New functions.
testsuite/
* gfortran.fortran-torture/execute/iolength_1.f90: New test.
* gfortran.fortran-torture/execute/iolength_3.f90: New test.
From-SVN: r83472
2004-06-22 00:43:55 +00:00
Tobias Schlüter
f5e440e11d
resolve.c (resolve_symbol): Add comment in function body.
...
* resolve.c (resolve_symbol): Add comment in function body.
(check_data_variable): Change type of mark to ar_type, adapt code
accordingly.
From-SVN: r83443
2004-06-21 19:23:52 +02:00
Tobias Schlüter
6ef4215401
re PR fortran/15962 (constant expression not recognized as such)
...
fortran/
PR fortran/15962
* match.c (match_case_selector): Call gfc_match_init_expr
instead of gfc_match_expr.
* resolve.c (validate_case_label_expr): No need to check for
constant, since it wouldn't have been matched with the fix to
match.c.
testsuite/
PR fortran/15962
* gfortran.fortran-torture/execute/select_1.f90: New test.
From-SVN: r83202
2004-06-15 23:50:50 +02:00
Tobias Schlüter
a4ac5dd3ef
re PR fortran/13201 (PARAMETER variables of nonconstant shape are accepted)
...
PR fortran/13201
* resolve.c (resolve_symbol): Verify that parameter array has an
explicit shape. Fix typos and coding style issues in surrounding
lines.
From-SVN: r82830
2004-06-09 14:35:39 +02:00
Paul Brook
54b4ba60f2
re PR fortran/13930 (derived type with intent(in) attribute not accepted)
...
PR fortran/13930
* decl.c (add_init_expr_to_sym): Remove incorrect check.
(default_initializer): Move to expr.c.
(variable_decl): Don't assign default initializer to variables.
* expr.c (gfc_default_initializer): Move to here.
* gfortran.h (gfc_default_initializer): Add prototype.
* resolve.c (resolve_symbol): Check for illegal initializers.
Assign default initializer.
testsuite/
* gfortran.fortran-torture/execute/der_init_4.f90: New test.
From-SVN: r81966
2004-05-18 00:48:05 +00: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