trans-intrinsic.c (conv_co_minmaxsum): Change condition style.
[official-gcc.git] / gcc / fortran / ChangeLog
blob6c9477f29596346eda0398c4aef320b174f75f8e
1 2014-05-08  Tobias Burnus  <burnus@net-b.de>
3         * trans-intrinsic.c (conv_co_minmaxsum): Change condition style.
5 2014-05-08  Tobias Burnus  <burnus@net-b.de>
7         * check.c (check_co_minmaxsum, gfc_check_co_minmax,
8         gfc_check_co_sum): New.
9         * error.c (gfc_notify_std): Update -std=f2008ts.
10         * gfortran.h (gfc_isym_id): Add GFC_ISYM_CO_MAX,
11         GFC_ISYM_CO_MIN, GFC_ISYM_CO_SUM.
12         * intrinsic.h (gfc_check_co_minmax,
13         gfc_check_co_sum): Declare.
14         * intrinsic.c (add_subroutines): Add co_min, co_max
15         and co_sum.
16         (gfc_check_intrinsic_standard): Update text for
17         -std=f2008ts.
18         * intrinsic.texi (CO_MIN, CO_MAX, CO_SUM): Document
19         them.
20         * invoke.texi (-std=f2008ts): Update wording.
21         * trans.h (gfor_fndecl_co_max,
22         gfor_fndecl_co_min, gfor_fndecl_co_sum): Define.
23         * trans-decl.c (gfor_fndecl_co_max,
24         gfor_fndecl_co_min, gfor_fndecl_co_sum): Define.
25         (gfc_build_builtin_function_decls): Assign to it.
26         * trans-intrinsic.c (conv_co_minmaxsum): New.
27         (gfc_conv_intrinsic_subroutine): Call it.
29 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
30             Mike Stump  <mikestump@comcast.net>
31             Richard Sandiford  <rdsandiford@googlemail.com>
33         * target-memory.c: Include wide-int.h.
34         (gfc_interpret_logical): Use wide-int interfaces.
35         * trans-array.c: Include wide-int.h.
36         (gfc_conv_array_initializer): Use wide-int interfaces.
37         * trans-const.c: Include wide-int.h.
38         (gfc_conv_string_init): Use wide-int interfaces.
39         (gfc_conv_mpz_to_tree): Likewise.
40         (gfc_conv_tree_to_mpz): Likewise.
41         * trans-decl.c (gfc_can_put_var_on_stack): Use tree_fits_uhwi_p.
42         * trans-expr.c: Include wide-int.h.
43         (gfc_conv_cst_int_power): Use wide-int interfaces.
44         (gfc_string_to_single_character): Likewise.
45         (gfc_optimize_len_trim): Likewise.
46         * trans-intrinsic.c: Include wide-int.h.
47         (trans_this_image): Use wide-int interfaces.
48         (gfc_conv_intrinsic_bound): Likewise.
49         (conv_intrinsic_cobound): Likewise.
50         * trans-types.c (gfc_init_types): Likewise.
51         (gfc_get_array_type_bounds): Pass an integer of the correct type
52         instead of using integer_one_node.
54 2014-04-30  Tobias Burnus  <burnus@net-b.de>
56         * trans-decl.c (create_function_arglist): Add hidden coarray arguments
57         also for polymorphic coarrays.
58         * trans-expr.c (gfc_conv_procedure_call): Pass hidden coarray arguments
59         also for polymorphic coarrays.
61 2014-04-30  Tobias Burnus  <burnus@net-b.de>
63         * resolve.c (resolve_function): Don't do
64         assumed-size check for lcobound/ucobound.
65         * trans-types.c (gfc_build_array_type): Only build an array
66         descriptor with codimensions for allocatable coarrays.
68 2014-04-30  Tobias Burnus  <burnus@net-b.de>
70         * gfortran.h (gfc_init_coarray_decl): Remove.
71         * parse.c (translate_all_program_units): Remove call to it.
72         (gfc_parse_file): Update call.
73         * trans.h (gfor_fndecl_caf_this_image,
74         gfor_fndecl_caf_num_images): Add.
75         (gfort_gvar_caf_num_images,
76         gfort_gvar_caf_this_image): Remove.
77         * trans-decl.c (gfor_fndecl_caf_this_image,
78         gfor_fndecl_caf_num_images): Add.
79         (gfort_gvar_caf_num_images,
80         gfort_gvar_caf_this_image): Remove.
81         (gfc_build_builtin_function_decls): Init new decl.
82         (gfc_init_coarray_dec): Remove.
83         (create_main_function): Change calls.
84         * trans-intrinsic.c (trans_this_image, trans_image_index,
85         conv_intrinsic_cobound): Generate call to new library function
86         instead of to a static variable.
87         * trans-stmt.c (gfc_trans_sync): Ditto.
89 2014-04-30  Tobias Burnus  <burnus@net-b.de>
91         * trans-expr.c (get_tree_for_caf_expr): Fix handling of polymorphic
92         and derived-type coarrays.
94 2014-04-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
96         PR fortran/59604
97         PR fortran/58003
98         * gfortran.h (gfc_convert_mpz_to_signed):  Add prototype.
99         * arith.c (gfc_int2int):  Convert number to signed if
100         arithmetic overflow is not checked.
101         * simplify.c (convert_mpz_to_unsigned): Only trigger assert for
102         size if range checking is in force.
103         (convert_mpz_to_signed):  Make non-static, rename to
104         (gfc_convert_mpz_to_signed).
105         (simplify_dshift): Use gfc_convert_mpz_to_signed.
106         (gfc_simplify_ibclr):  Likewise.
107         (gfc_simplify_ibits):  Likewise.
108         (gfc_simplify_ibset):  Likewise.
109         (simplify_shift):  Likewise.
110         (gfc_simplify_ishiftc):  Likewise.
111         (gfc_simplify_maskr):  Likewise.
112         (gfc_simplify_maskl):  Likewise.
114 2014-04-22  Tobias Burnus  <burnus@net-b.de>
116         PR fortran/60881
117         * trans-expr.c (gfc_trans_subcomponent_assign): Fix handling
118         of scalar coarrays.
120 2014-04-17  Jakub Jelinek  <jakub@redhat.com>
122         * trans-types.c (gfc_init_kinds): Make sure GET_MODE_BITSIZE
123         argument is enum machine_mode.
125 2014-04-13  Paul Thomas  <pault@gcc.gnu.org>
127         PR fortran/58085
128         PR fortran/60717
129         * trans.h: Add 'use_offset' bitfield to gfc_se.
130         * trans-array.c (gfc_conv_expr_descriptor): Use 'use_offset'
131         as a trigger to unconditionally recalculate the offset for
132         array slices and constant arrays.
133         trans-expr.c (gfc_conv_intrinsic_to_class): Use it.
134         trans-stmt.c (trans_associate_var): Ditto.
135         (gfc_conv_procedure_call): Ditto.
137 2014-04-11  Tobias Burnus  <burnus@net-b.de>
139         PR fortran/58880
140         PR fortran/60495
141         * resolve.c (gfc_resolve_finalizers): Ensure that vtables
142         and finalization wrappers are generated.
144 2014-04-11  Janne Blomqvist  <jb@gcc.gnu.org>
146         * intrinsic.texi (RANDOM_SEED): Improve example.
148 2014-04-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
150         * class.c (gfc_build_class_symbol): Append "_t" to target class
151         names to make the generated type names unique.
153 2014-04-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
155         PR fortran/60191
156         * trans-types.c (gfc_get_function_type): In case of recursion
157         build a variadic function type with empty argument list instead of a
158         stdarg-like function type with incomplete argument list.
160 2014-04-04  Tobias Burnus  <burnus@net-b.de>
162         * check.c (gfc_check_cmplx): Fix typo.
164 2014-03-28  Mikael Morin  <mikael@gcc.gnu.org>
165             Tobias Burnus  <burnus@net-b.de>
167         PR fortran/60576
168         * trans-expr.c (gfc_conv_derived_to_class): Avoid
169         generation of out-of-bounds range expr.
171 2014-03-28  Mikael Morin  <mikael@gcc.gnu.org>
173         PR fortran/60677
174         * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Enlarge argument
175         list buffer.
177 2014-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
179         PR fortran/60522
180         * frontend-passes.c (cfe_code):  Do not walk subtrees
181         for WHERE.
183 2014-03-27  Tobias Burnus  <burnus@net-b.de>
185         PR fortran/58880
186         * trans-expr.c (gfc_conv_scalar_to_descriptor): Fix handling
187         of nonpointers.
189 2014-03-26 Dominique d'Humieres <dominiq@lps.ens.fr>
191         PR fortran/34928
192         * fortran.texi: Document Volatile COMMON as not supported.
194 2014-03-22  Jakub Jelinek  <jakub@redhat.com>
196         PR debug/60603
197         * cpp.c (gfc_cpp_init): Restore cb_change_file call to
198         <built-in>.
200 2014-03-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
202         PR fortran/60148
203         * gfortran.texi: Add description of namelist DELIM= behavior.
205 2014-03-19  Tobias Burnus  <burnus@net-b.>
207         PR fortran/60543
208         * io.c (check_io_constraints): Use gfc_unset_implicit_pure.
209         * resolve.c (resolve_ordinary_assign): Ditto.
211 2014-03-19  Tobias Burnus  <burnus@net-b.de>
213         PR fortran/60543
214         PR fortran/60283
215         * gfortran.h (gfc_unset_implicit_pure): New prototype.
216         * resolve.c (gfc_unset_implicit_pure): New.
217         (resolve_structure_cons, resolve_function,
218         pure_subroutine): Use it.
219         * decl.c (match_old_style_init, gfc_match_data,
220         match_pointer_init, variable_decl): Ditto.
221         * expr.c (gfc_check_pointer_assign): Ditto.
222         * intrinsic.c (gfc_intrinsic_sub_interface): Ditto.
223         * io.c (match_vtag, gfc_match_open, gfc_match_close,
224         match_filepos, gfc_match_inquire, gfc_match_print,
225         gfc_match_wait): Ditto.
226         * match.c (gfc_match_critical, gfc_match_stopcode,
227         lock_unlock_statement, sync_statement, gfc_match_allocate,
228         gfc_match_deallocate): Ditto.
229         * parse.c (decode_omp_directive): Ditto.
230         * symbol.c (gfc_add_save): Ditto.
232 2014-03-18  Janus Weil  <janus@gcc.gnu.org>
234         PR fortran/55207
235         PR fortran/60549
236         * decl.c (match_attr_spec): Revert r208590.
238 2014-03-18  Jakub Jelinek  <jakub@redhat.com>
240         PR ipa/58721
241         * trans.c (gfc_unlikely, gfc_likely): Don't add __builtin_expect
242         if !optimize.
244 2014-03-18  Tobias Burnus  <burnus@net-b.de>
246         PR ipa/58721
247         * trans.h (gfc_unlikely, gfc_likely): Add predictor as argument.
248         (gfc_trans_io_runtime_check): Remove.
249         * trans-io.c (gfc_trans_io_runtime_check): Make static; add has_iostat
250         as argument, add predictor to block.
251         (set_parameter_value, gfc_trans_open, gfc_trans_close, build_filepos,
252         gfc_trans_inquire, gfc_trans_wait, build_dt): Update calls.
253         * trans.c (gfc_unlikely, gfc_likely): Add predictor as argument.
254         (gfc_trans_runtime_check, gfc_allocate_using_malloc,
255         gfc_allocate_allocatable, gfc_deallocate_with_status): Set explicitly
256         branch predictor.
257         * trans-expr.c (gfc_conv_procedure_call): Ditto.
258         * trans-stmt.c (gfc_trans_allocate): Ditto.
259         * trans-array.c (gfc_array_init_size, gfc_array_allocate): Ditto.
261 2014-03-15  Janus Weil  <janus@gcc.gnu.org>
263         PR fortran/55207
264         * decl.c (match_attr_spec): Variables in the main program implicitly
265         get the SAVE attribute in Fortran 2008.
267 2014-03-14  Mikael Morin  <mikael@gcc.gnu.org>
269         PR fortran/60392
270         * trans-array.c (gfc_conv_array_parameter): Don't reuse the descriptor
271         if it has transposed dimensions.
273 2014-03-08  Tobias Burnus  <burnus@net-b.de>
275         PR fortran/60447
276         * f95-lang.c (gfc_init): Return false when only
277         preprocessing.
278         * options.c (gfc_post_options): Ditto.
280 2014-03-08  Tobias Burnus  <burnus@net-b.de>
282         * gfortran.texi (Fortran 2003 Status): Mention finalization,
283         deferred-length character support and input rounding.
284         (Fortran 2008 Status): Mention that at termination
285         signalling exceptions are shown.
287 2014-03-06  Paul Thomas  <pault@gcc.gnu.org>
288             Janus Weil  <janus@gcc.gnu.org>
290         PR fortran/51976
291         * gfortran.h (symbol_attribute): Add deferred_parameter attribute.
292         * primary.c (build_actual_constructor): It is not an error if
293         a missing component has the deferred_parameter attribute;
294         equally, if one is given a value, it is an error.
295         * resolve.c (resolve_fl_derived0): Remove error for deferred
296         character length components.  Add the hidden string length
297         field to the structure. Give it the deferred_parameter
298         attribute.
299         * trans-array.c (duplicate_allocatable): Add a strlen field
300         which is used as the element size if it is non-null.
301         (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Pass a
302         NULL to the new argument in duplicate_allocatable.
303         (structure_alloc_comps): Set the hidden string length as
304         appropriate. Use it in calls to duplicate_allocatable.
305         (gfc_alloc_allocatable_for_assignment): When a deferred length
306         backend declaration is variable, use that; otherwise use the
307         string length from the expression evaluation.
308         * trans-expr.c (gfc_conv_component_ref): If this is a deferred
309         character length component, the string length should have the
310         value of the hidden string length field.
311         (gfc_trans_subcomponent_assign): Set the hidden string length
312         field for deferred character length components.  Allocate the
313         necessary memory for the string.
314         (alloc_scalar_allocatable_for_assignment): Same change as in
315         gfc_alloc_allocatable_for_assignment above.
316         * trans-stmt.c (gfc_trans_allocate): Likewise.
317         * trans-intrinsic (size_of_string_in_bytes): Make non-static.
318         * trans-types.c (gfc_get_derived_type): Set the tree type for
319         a deferred character length component.
320         * trans.c (gfc_deferred_strlen): New function.
321         * trans.h (size_of_string_in_bytes,gfc_deferred_strlen): New prototypes.
323 2014-03-01  Mikael Morin  <mikael@gcc.gnu.org>
325         PR fortran/60341
326         * frontend-passes.c (optimize_comparison): Guard two union accesses
327         with the corresponding tag checks.
329 2014-02-28  Janus Weil  <janus@gcc.gnu.org>
331         PR fortran/60359
332         * class.c (find_intrinsic_vtab): Prevent duplicate creation of copy
333         procedure for characters.
335 2014-02-21  Janus Weil  <janus@gcc.gnu.org>
337         PR fortran/60302
338         * check.c (gfc_check_c_f_pointer): Only clear 'size' if 'gfc_array_size'
339         is successful.
341 2014-02-21  Janus Weil  <janus@gcc.gnu.org>
343         PR fortran/60234
344         * gfortran.h (gfc_build_class_symbol): Removed argument.
345         * class.c (gfc_add_component_ref): Fix up missing vtype if necessary.
346         (gfc_build_class_symbol): Remove argument 'delayed_vtab'. vtab is always
347         delayed now, except for unlimited polymorphics.
348         (comp_is_finalizable): Procedure pointer components are not finalizable.
349         * decl. (build_sym, build_struct, attr_decl1): Removed argument of
350         'gfc_build_class_symbol'.
351         * match.c (copy_ts_from_selector_to_associate, select_type_set_tmp):
352         Ditto.
353         * symbol.c (gfc_set_default_type): Ditto.
355 2014-02-19  Janus Weil  <janus@gcc.gnu.org>
357         PR fortran/60232
358         * expr.c (gfc_get_variable_expr): Don't add REF_ARRAY for dimensionful
359         functions, which are used as procedure pointer target.
361 2014-02-18  Tobias Burnus  <burnus@net-b.de>
363         PR fortran/49397
364         * expr.c (gfc_check_pointer_assign): Add check for
365         F2008Cor2, C729.
366         * trans-decl.c (gfc_get_symbol_decl): Correctly generate external
367         decl in a corner case.
369 2014-02-18  Janus Weil  <janus@gcc.gnu.org>
371         PR fortran/60231
372         * resolve.c (check_generic_tbp_ambiguity): Check for presence of dummy
373         arguments to prevent ICE.
375 2014-02-17  Janus Weil  <janus@gcc.gnu.org>
377         PR fortran/55907
378         * resolve.c (build_default_init_expr): Don't initialize character
379         variable if -fno-automatic is given.
381 2014-02-15  Mikael Morin  <mikael@gcc.gnu.org>
383         PR fortran/59599
384         * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Calculate the
385         number of arguments.
387 2014-02-11  Jakub Jelinek  <jakub@redhat.com>
389         PR fortran/52370
390         * trans-decl.c (gfc_build_dummy_array_decl): Set TREE_NO_WARNING
391         on decl if sym->attr.optional.
393 2014-02-09  Paul Thomas  <pault@gcc.gnu.org>
395         PR fortran/57522
396         * resolve.c (resolve_assoc_var): Set the subref_array_pointer
397         attribute for the 'associate-name' if necessary.
398         * trans-stmt.c (trans_associate_var): If the 'associate-name'
399         is a subref_array_pointer, assign the element size of the
400         associate variable to 'span'.
402 2014-02-09  Paul Thomas  <pault@gcc.gnu.org>
404         PR fortran/59026
405         * trans-expr.c (gfc_conv_procedure_call): Pass the value of the
406         actual argument to a formal argument with the value attribute
407         in an elemental procedure.
409 2014-02-08  Janus Weil  <janus@gcc.gnu.org>
410             Mikael Morin <mikael.morin@gcc.gnu.org>
412         PR fortran/58470
413         * class.c (generate_finalization_wrapper): Assert that proc_tree has
414         been set in gfc_resolve_finalizers.
415         * resolve.c (resolve_fl_derived0): Remove unnecessary call to
416         gfc_is_finalizable.
418 2014-02-07  Benno Schulenberg  <bensberg@justemail.net>
420         PR translation/52289
421         * fortran/resolve.c (resolve_ordinary_assign): Fix typoed word
422         in an error message.
424 2014-02-02  Mikael Morin  <mikael@gcc.gnu.org>
426         PR fortran/57033
427         * primary.c (gfc_convert_to_structure_constructor): Avoid null pointer
428         dereference.
430 2014-02-01  Paul Thomas  <pault@gcc.gnu.org>
432         PR fortran/59906
433         * trans-stmt.c (gfc_add_loop_ss_code): In the case of character
434         SS_REFERENCE, use gfc_conv_string_parameter to ensure that a
435         pointer to the string is stored.
436         * trans-expr.c (gfc_conv_expr_reference): Likewise, use
437         gfc_conv_string_parameter to ensure that a pointer to is passed
438         to the elemental function.
440 2014-01-28  Paul Thomas  <pault@gcc.gnu.org>
442         PR fortran/59414
443         * trans-stmt.c (gfc_trans_allocate): Before the pointer
444         assignment to transfer the source _vptr to a class allocate
445         expression, the final class reference should be exposed. The
446         tail that includes the _data and array references is stored.
447         This reduced expression is transferred to 'lhs' and the _vptr
448         added. Then the tail is restored to the allocate expression.
450 2014-01-26  Mikael Morin  <mikael@gcc.gnu.org>
452         PR fortran/58007
453         * module.c (read_module): Assert for component name correctness.
455 2014-01-18  Mikael Morin  <mikael@gcc.gnu.org>
457         PR fortran/58007
458         * module.c (MOD_VERSION): Bump.
459         (fp2, find_pointer2): Remove.
460         (mio_component_ref): Don't forcedfully set the containing derived type
461         symbol for loading.  Remove unused argument.
462         (mio_ref): Update caller
463         (mio_symbol): Dump component list earlier.
464         (skip_list): New argument nest_level.  Initialize level with the new
465         argument.
466         (read_module): Add forced pointer components association for derived
467         type symbols.
469 2014-01-12  Janus Weil  <janus@gcc.gnu.org>
471         PR fortran/58026
472         * decl.c (gfc_match_data_decl): Improve error recovery.
474 2014-01-09  Tobias Burnus  <burnus@net-b.de>
476         * cpp.c (gfc_cpp_handle_option): Add missing break.
477         * trans-io.c (transfer_expr): Silence unused value warning.
479 2014-01-08  Janus Weil  <janus@gcc.gnu.org>
481         PR fortran/58182
482         * resolve.c (gfc_verify_binding_labels): Modify order of checks.
484 2014-01-06  Janus Weil  <janus@gcc.gnu.org>
486         PR fortran/59589
487         * class.c (comp_is_finalizable): New function to dermine if a given
488         component is finalizable.
489         (finalize_component, generate_finalization_wrapper): Use it.
491 2014-01-06  Janus Weil  <janus@gcc.gnu.org>
493         PR fortran/59023
494         PR fortran/59662
495         * resolve.c (resolve_global_procedure): Don't apply to c-binding
496         procedures.
497         (gfc_verify_binding_labels): Remove duplicate line.
499 2014-01-04  Janus Weil  <janus@gcc.gnu.org>
501         PR fortran/59547
502         * class.c (add_proc_comp): Copy pure attribute.
504 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
506         Update copyright years
508 2014-01-02  Tobias Burnus  <burnus@net-b.de>
510         * gfortranspec.c (lang_specific_driver): Update copyright notice
511         dates.
512         * gfc-internals.texi: Bump @copying's copyright year.
513         * gfortran.texi: Ditto.
514         * intrinsic.texi: Ditto.
515         * invoke.texi: Ditto.
517 2014-01-02  Janus Weil  <janus@gcc.gnu.org>
519         PR fortran/59654
520         * resolve.c (resolve_typebound_procedures): No need to create the vtab
521         here.
523 Copyright (C) 2014 Free Software Foundation, Inc.
525 Copying and distribution of this file, with or without modification,
526 are permitted in any medium without royalty provided the copyright
527 notice and this notice are preserved.