d4e968e5bc53c7a0e3d9a5d1811f4b51e07502de
[gcc.git] / gcc / fortran / ChangeLog
1 2012-01-09 Paul Thomas <pault@gcc.gnu.org>
2
3 PR fortran/51791
4 * interface.c (matching_typebound_op): Drill down through
5 possible parentheses to obtain base expression. Do not test for
6 'class_ok' but, instead for the class structure components.
7 * resolve.c (resolve_ordinary_assign): Extend error message for
8 polymorphic assignment to advise checking for specific
9 subroutine.
10
11 PR fortran/51792
12 * resolve.c (resolve_typebound_function): Restore 'static' to
13 declaration.
14
15 2012-01-09 Mikael Morin <mikael@gcc.gnu.org>
16
17 PR fortran/51758
18 * trans-array.c (gfc_walk_elemental_function_args):
19 Skip over NULL() actual arguments.
20
21 2012-01-09 Tobias Burnus <burnus@net-b.de>
22
23 * gfortran.texi: Bump copyright year.
24 (Fortran 2003 Status): Update polymorphism item, add
25 item for generic interface with DT name.
26
27 2012-01-09 Tobias Burnus <burnus@net-b.de>
28
29 PR fortran/51578
30 * gfortran.h (gfc_use_list):
31 * match.h (gfc_use_module): Rename to ...
32 (gfc_use_modules): ... this.
33 * module.c (use_locus, specified_nonint, specified_int): Remove
34 global variable.
35 (module_name): Change type to const char*, used with gfc_get_string.
36 (module_list): New global variable.
37 (free_rename): Free argument not global var.
38 (gfc_match_use): Save match to module_list.
39 (load_generic_interfaces, read_module): Don't free symtree.
40 (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
41 type change of module_name.
42 (write_symbol0, write_generic): Optimize due to the type change.
43 (import_iso_c_binding_module, use_iso_fortran_env_module): Use
44 locus of rename->where.
45 (gfc_use_module): Take module_list as argument.
46 (gfc_use_modules): New function.
47 (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
48 * parse.c (last_was_use_stmt): New global variable.
49 (use_modules): New function.
50 (decode_specification_statement, decode_statement): Move USE match up
51 and call use_modules.
52 (next_free, next_fixed): Call use_modules.
53 (accept_statement): Don't call gfc_module_use.
54
55 2012-01-06 Tobias Burnus <burnus@net-b.de>
56
57 * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
58 Update call to gfc_trans_dealloc_allocated.
59 * trans.c (gfc_allocate_using_malloc): Fix spacing.
60 (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
61 label_finish when an error occurs.
62 (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
63 * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
64 Update prototype.
65 (gfor_fndecl_caf_deregister): New tree symbol.
66 * trans-expr.c (gfc_conv_procedure_call): Update
67 gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
68 * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
69 structure_alloc_comps, gfc_trans_deferred_array): Ditto.
70 (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
71 * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
72 gfc_trans_dealloc_allocated): Update prototypes.
73 * trans-stmt.c (gfc_trans_sync): Fix indentation.
74 (gfc_trans_allocate): Fix errmsg padding and label handling.
75 (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
76 * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
77 * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
78 to avoid other stats accidentally matching this one.
79 * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
80 (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
81 and add decl for caf_deregister.
82 (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
83 * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
84 gfc_deallocate_with_status.
85
86 2012-01-05 Paul Thomas <pault@gcc.gnu.org>
87
88 PR fortran/PR48946
89 * resolve.c (resolve_typebound_static): If the typebound
90 procedure is 'deferred' try to find the correct specific
91 procedure in the derived type operator space itself.
92
93 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
94
95 PR fortran/50981
96 * trans-array.h (gfc_walk_elemental_function_args): New argument.
97 * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
98 * trans-stmt.c (gfc_trans_call): Ditto.
99 * trans-array.c (gfc_walk_function_expr): Ditto.
100 (gfc_walk_elemental_function_args): Get the dummy argument list
101 if possible. Check that the dummy and the actual argument are both
102 optional, and set can_be_null_ref accordingly.
103
104 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
105
106 PR fortran/50981
107 * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
108 * trans-array.c: If the reference can be NULL, save the reference
109 instead of the value.
110 * trans-expr.c (gfc_conv_expr): If we have saved a reference,
111 dereference it.
112
113 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
114
115 * trans-expr.c (gfc_conv_expr): Move address taking...
116 (gfc_conv_expr_reference): ... here.
117
118 2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
119
120 PR fortran/49693
121 * trans-common.c (create_common): Update copyright years. Mark
122 variables as used to avoid warnings about unused variables in
123 common blocks.
124
125 2012-01-03 Hans-Peter Nilsson <hp@axis.com>
126
127 * gfortran.h (struct gfc_expr): Add missing "struct"
128 qualifier for member base_expr.
129
130 2012-01-02 Paul Thomas <pault@gcc.gnu.org>
131
132 PR fortran/51529
133 * trans-array.c (gfc_array_allocate): Null allocated memory of
134 newly allocted class arrays.
135
136 PR fortran/46262
137 PR fortran/46328
138 PR fortran/51052
139 * interface.c(build_compcall_for_operator): Add a type to the
140 expression.
141 * trans-expr.c (conv_base_obj_fcn_val): New function.
142 (gfc_conv_procedure_call): Use base_expr to detect non-variable
143 base objects and, ensuring that there is a temporary variable,
144 build up the typebound call using conv_base_obj_fcn_val.
145 (gfc_trans_class_assign): Pick out class procedure pointer
146 assignments and do the assignment with no further prcessing.
147 (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
148 gfc_trans_class_assign): Move to top of file.
149 * gfortran.h : Add 'base_expr' field to gfc_expr.
150 * resolve.c (get_declared_from_expr): Add 'types' argument to
151 switch checking of derived types on or off.
152 (resolve_typebound_generic_call): Set the new argument.
153 (resolve_typebound_function, resolve_typebound_subroutine):
154 Set 'types' argument for get_declared_from_expr appropriately.
155 Identify base expression, if not a variable, in the argument
156 list of class valued calls. Assign it to the 'base_expr' field
157 of the final expression. Strip away all references after the
158 last class reference.
159
160 2012-01-02 Tobias Burnus <burnus@net-b.de>
161
162 PR fortran/51682
163 * trans-intrinsic.c (trans_this_image, trans_image_index,
164 trans_num_images, conv_intrinsic_cobound): Fold_convert the
165 caf_num_images/caf_this_images variables to the correct int kind.
166
167 2012-01-01 Jakub Jelinek <jakub@redhat.com>
168
169 * gfortranspec.c (lang_specific_driver): Update copyright notice
170 dates.
171 \f
172 Copyright (C) 2012 Free Software Foundation, Inc.
173
174 Copying and distribution of this file, with or without modification,
175 are permitted in any medium without royalty provided the copyright
176 notice and this notice are preserved.