re PR fortran/69043 (Trying to include a directory causes an infinite loop)
[official-gcc.git] / gcc / fortran / ChangeLog
blob9ed112ec63163ff71700f08bc1f277768977070e
1 2016-03-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2             Jim MacArthur  <jim.macarthur@codethink.co.uk>
4         PR fortran/69043
5         * scanner.c (load_file): Check that included file is regular.
7 2016-03-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
8             Harold Anlauf  <anlauf@gmx.de>
10         PR fortran/69520
11         * invoke.texi: Explain use of the 'no-' construct within the
12         -fcheck= option.
13         * options.c (gfc_handle_runtime_check_option): Enable use of
14         'no-' prefix for the various options with -fcheck= to allow
15         negating previously enabled check options.
17 2016-03-12  Paul Thomas  <pault@gcc.gnu.org>
19         PR fortran/70031
20         * decl.c (gfc_match_prefix): Treat the 'module' prefix in the
21         same way as the others, rather than fixing it to come last.
22         (gfc_match_function_decl, gfc_match_subroutine): After errors
23         in 'copy_prefix', emit them immediately in the case of module
24         procedures to prevent a later ICE.
26         PR fortran/69524
27         * decl.c (gfc_match_submod_proc): Permit 'module procedure'
28         declarations within the contains section of modules as well as
29         submodules.
30         * resolve.c (resolve_fl_procedure): Likewise.
31         *trans-decl.c (build_function_decl): Change the gcc_assert to
32         allow all forms of module procedure declarations within module
33         contains sections.
35 2016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
37         PR fortran/68147
38         PR fortran/47674
39         * frontend-passes.c (realloc_string_callback): Don't set
40         walk_subtrees.
42 2016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
44         * dump-parse-tree.c (show_code_node):  Print association
45         list of a block if present.  Handle EXEC_END_BLOCK.
47 2016-02-28  Harald Anlauf <anlauf@gmx.de>
48             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
50         PR fortran/56007
51         * match.c (gfc_match_iterator): Add diagnostic for array variable
52         as do loop index.
54 2016-02-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
55             Steven G. Kargl  <kargl@gcc.gnu.org>
57         PR fortran/69910
58         * io.c (gfc_match_open): Check that open status is an expression
59         constant before comparing string to 'scratch' with NEWUNIT.
61 2016-02-27  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
63         * trans.c (gfc_allocate_allocatable): size conversion
64         from byte to number of elements for event variables.
65         * trans-types.c (gfc_get_derived_type): event variables
66         represented as a pointer (like lock variable).
68 2016-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
70         PR fortran/61156
71         * scanner.c (add_path_to_list): If include path is not a directory,
72         issue a fatal error.
74 2016-02-23  Andre Vehreschild  <vehre@gcc.gnu.org>
76         PR fortran/67451
77         * trans-array.c (gfc_array_allocate): Take the attributes from the
78         expression to allocate and not from the source=-expression.
80 2016-02-20  Paul Thomas  <pault@gcc.gnu.org>
82         PR fortran/69423
83         * trans-decl.c (create_function_arglist): Deferred character
84         length functions, with and without declared results, address
85         the passed reference type as '.result' and the local string
86         length as '..result'.
87         (gfc_null_and_pass_deferred_len): Helper function to null and
88         return deferred string lengths, as needed.
89         (gfc_trans_deferred_vars): Call it, thereby reducing repeated
90         code, add call for deferred arrays and reroute pointer function
91         results. Avoid using 'tmp' for anything other that a temporary
92         tree by introducing 'type_of_array' for the arrayspec type.
94 2015-02-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
96         PR fortran/69742
97         * frontend-passes.c (cfe-expr_0):  Don't register functions
98         from within an ASSOCIATE statement.
100 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
102         PR fortran/60526
103         * decl.c (build_sym):  If the name has already been defined as a
104         type, it has a symtree with an upper case letter at the beginning.
105         If such a symtree exists, issue an error and exit.  Don't do
106         this if there is no corresponding upper case letter.
108 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
110         PR fortran/60526
111         PR bootstrap/69816
112         * decl.c (build_sym):  Reverted previous patch.
114 2016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
116         PR fortran/60526
117         * decl.c (build_sym):  If the name has already been defined as a
118         type, issue error and return false.
120 2016-02-12  David Malcolm  <dmalcolm@redhat.com>
122         PR other/69554
123         * error.c (gfc_diagnostic_start_span): New function.
124         (gfc_diagnostics_init): Initialize global_dc's start_span.
126 2016-02-11  Andre Vehreschild  <vehre@gcc.gnu.org>
128         PR fortran/69296
129         * gfortran.h: Added flag to gfc_association_list indicating that
130         the rank of an associate variable has been guessed only.
131         * parse.c (parse_associate): Set the guess flag mentioned above
132         when guessing the rank of an expression.
133         * resolve.c (resolve_assoc_var): When the rank has been guessed,
134         make sure, that the guess was correct else overwrite with the actual
135         rank.
136         * trans-stmt.c (trans_associate_var): For subref_array_pointers in
137         class objects, take the span from the _data component.
139 2016-02-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
141         PR fortran/50555
142         * primary.c (match_actual_arg): If symbol has attribute flavor of
143         namelist, generate an error. (gfc_match_rvalue): Likewise return
144         MATCH_ERROR.
145         * resolve.c (resolve_symbol): Scan arument list of procedures and
146         generate an error if a namelist is found.
148 2016-02-05  Mikael Morin  <mikael@gcc.gnu.org>
150         PR fortran/66089
151         * trans-expr.c (expr_is_variable, gfc_expr_is_variable): Rename
152         the former to the latter and make it non-static.  Update callers.
153         * gfortran.h (gfc_expr_is_variable): New declaration.
154         (struct gfc_ss_info): Add field needs_temporary.
155         * trans-array.c (gfc_scalar_elemental_arg_saved_as_argument):
156         Tighten the condition on aggregate expressions with a check
157         that the expression is a variable and doesn't need a temporary.
158         (gfc_conv_resolve_dependency): Add intermediary reference variable.
159         Set the needs_temporary field.
161 2016-02-03  Andre Vehreschild  <vehre@gcc.gnu.org>
163         PR fortran/67451
164         PR fortran/69418
165         * trans-expr.c (gfc_copy_class_to_class): For coarrays just the
166         pointer is passed.  Take it as is without trying to deref the
167         _data component.
168         * trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
169         argument to source=-expression.
171 2016-02-02  Nathan Sidwell  <nathan@codesourcery.com>
173         * lang.opt (fopenacc-dim=): New option.
175 2016-01-31  Paul Thomas  <pault@gcc.gnu.org>
177         PR fortran/67564
178         * trans-expr.c (gfc_conv_procedure_call): For the vtable copy
179         subroutines, add a string length argument, when the actual
180         argument is an unlimited polymorphic class object.
182 2016-01-30  Paul Thomas  <pault@gcc.gnu.org>
184         PR fortran/69566
185         * trans-expr.c (gfc_conv_procedure_call): Correct expression
186         for 'ulim_copy', which was missing a test for 'comp'.
188 2016-01-28  Andre Vehreschild  <vehre@gcc.gnu.org>
190         PR fortran/62536
191         * decl.c (gfc_match_end): Only unnest and remove BLOCK namespaces
192         when the END encountered does not match a BLOCK's end.
194 2016-01-27  Janus Weil  <janus@gcc.gnu.org>
196         PR fortran/69484
197         * invoke.texi: Fix documentation of -Wall with respect to -Wtabs.
199 2016-01-27  Paul Thomas  <pault@gcc.gnu.org>
201         PR fortran/69422
202         * trans-expr.c (is_scalar_reallocatable_lhs): Remove the check
203         for allocatable components, whilst checking if the symbol is a
204         derived or class entity..
206 2016-01-26  Paul Thomas  <pault@gcc.gnu.org>
208         PR fortran/69385
209         * trans-expr.c (gfc_trans_assignment_1): Exclude initialization
210         assignments from check on assignment of scalars to unassigned
211         arrays and correct wrong code within the corresponding block.
213 2016-01-26  David Malcolm  <dmalcolm@redhat.com>
215         PR other/69006
216         * error.c (gfc_diagnostic_starter): Delete use of pp_newline.
218 2016-01-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
220         PR fortran/69397
221         PR fortran/68442
222         * interface.c (gfc_arglist_matches_symbol): Replace assert with
223         a return false if not a procedure.
224         * resolve.c (resolve_generic_f): Test if we are resolving an
225         initialization expression and adjust error message accordingly.
227 2016-01-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
229         PR fortran/66094
230         * frontend-passes.c (matmul_lhs_realloc):  Add
231         forgotten break statement.
233 2016-01-24  Dominique d'Humieres <dominiq@lps.ens.fr>
235         PR fortran/68283
236         * primary.c (gfc_variable_attr): revert revision r221955,
237         call gfc_internal_error only if there is no error.
239 2016-01-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
241         PR fortran/66094
242         * frontend-passes.c (enum matrix_case):  Add case A2B2T for
243         MATMUL(A,TRANSPoSE(B)) where A and B are rank 2.
244         (inline_limit_check):  Also add A2B2T.
245         (matmul_lhs_realloc):  Handle A2B2T.
246         (check_conjg_variable):  Rename to
247         (check_conjg_transpose_variable):  and also count TRANSPOSE.
248         (inline_matmul_assign):  Handle A2B2T.
250 2016-01-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
252         PR fortran/65996
253         * error.c (gfc_error): Save the state of abort_on_error and set
254         it to false for buffered errors to allow normal processing.
255         Restore the state before leaving.
257 2016-01-19  Martin Jambor  <mjambor@suse.cz>
259         * types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
260         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
261         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
263 2016-01-15  Paul Thomas  <pault@gcc.gnu.org>
265         PR fortran/64324
266         * resolve.c (check_uop_procedure): Prevent deferred length
267         characters from being trapped by assumed length error.
269         PR fortran/49630
270         PR fortran/54070
271         PR fortran/60593
272         PR fortran/60795
273         PR fortran/61147
274         PR fortran/64324
275         * trans-array.c (gfc_conv_scalarized_array_ref): Pass decl for
276         function as well as variable expressions.
277         (gfc_array_init_size): Add 'expr' as an argument. Use this to
278         correctly set the descriptor dtype for deferred characters.
279         (gfc_array_allocate): Add 'expr' to the call to
280         'gfc_array_init_size'.
281         * trans.c (gfc_build_array_ref): Expand logic for setting span
282         to include indirect references to character lengths.
283         * trans-decl.c (gfc_get_symbol_decl): Ensure that deferred
284         result char lengths that are PARM_DECLs are indirectly
285         referenced both for directly passed and by reference.
286         (create_function_arglist): If the length type is a pointer type
287         then store the length as the 'passed_length' and make the char
288         length an indirect reference to it.
289         (gfc_trans_deferred_vars): If a character length has escaped
290         being set as an indirect reference, return it via the 'passed
291         length'.
292         * trans-expr.c (gfc_conv_procedure_call): The length of
293         deferred character length results is set TREE_STATIC and set to
294         zero.
295         (gfc_trans_assignment_1): Do not fix the rse string_length if
296         it is a variable, a parameter or an indirect reference. Add the
297         code to trap assignment of scalars to unallocated arrays.
298         * trans-stmt.c (gfc_trans_allocate): Remove 'def_str_len' and
299         all references to it. Instead, replicate the code to obtain a
300         explicitly defined string length and provide a value before
301         array allocation so that the dtype is correctly set.
302         trans-types.c (gfc_get_character_type): If the character length
303         is a pointer, use the indirect reference.
305 2016-01-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
307         PR fortran/69154
308         * frontend-passes.c (in_where):  New variable.
309         (inline_matmul_assign):  Don't try this if we are within
310         a WHERE statement.
311         (gfc_code_walker):  Keep track of in_where.
313 2016-01-10  Paul Thomas  <pault@gcc.gnu.org>
315         PR fortran/67779
316         * trans_array.c (gfc_conv_scalarized_array_ref): Add missing
317         se->use_offset from condition for calculation of 'base'.
319 2016-01-08  Jakub Jelinek  <jakub@redhat.com>
321         PR fortran/69128
322         * trans.h (OMPWS_SCALARIZER_BODY): Define.
323         (OMPWS_NOWAIT): Renumber.
324         * trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
325         if OMPWS_SCALARIZER_BODY is not set already, and set also
326         OMPWS_SCALARIZER_BODY until the final loop creation.
327         * trans-expr.c (gfc_trans_assignment_1): Likewise.
328         * trans-openmp.c (gfc_trans_omp_workshare): Also clear
329         OMPWS_SCALARIZER_BODY.
330         * trans-array.c (gfc_trans_scalarized_loop_end): Don't create
331         OMP_FOR if OMPWS_SCALARIZER_BODY is set.
333 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
335         Update copyright years.
337         * gfortranspec.c (lang_specific_driver): Update copyright notice
338         dates.
339         * gfc-internals.texi: Bump @copying's copyright year.
340         * gfortran.texi: Ditto.
341         * intrinsic.texi: Ditto.
342         * invoke.texi: Ditto.
344 2016-01-01  Paul Thomas  <pault@gcc.gnu.org>
346         PR fortran/68864
347         * trans-array.c (evaluate_bound): If deferred, test that 'desc'
348         is an array descriptor before using gfc_conv_descriptor_xxx.
350 Copyright (C) 2016 Free Software Foundation, Inc.
352 Copying and distribution of this file, with or without modification,
353 are permitted in any medium without royalty provided the copyright
354 notice and this notice are preserved.