]>
Commit | Line | Data |
---|---|---|
aa9aed00 JW |
1 | 2009-10-21 Janus Weil <janus@gcc.gnu.org> |
2 | ||
3 | PR fortran/41706 | |
4 | PR fortran/41766 | |
5 | * match.c (select_type_set_tmp): Set flavor for temporary. | |
6 | * resolve.c (resolve_class_typebound_call): Correctly resolve actual | |
7 | arguments. | |
8 | ||
f116b2fc PT |
9 | 2009-10-20 Paul Thomas <pault@gcc.gnu.org> |
10 | ||
11 | PR fortran/41706 | |
12 | * resolve.c (resolve_arg_exprs): New function. | |
13 | (resolve_class_compcall): Call the above. | |
14 | (resolve_class_typebound_call): The same. | |
15 | ||
1517fd57 JW |
16 | 2009-10-19 Janus Weil <janus@gcc.gnu.org> |
17 | ||
18 | PR fortran/41586 | |
19 | * parse.c (parse_derived): Correctly set 'alloc_comp' and 'pointer_comp' | |
20 | for CLASS variables. | |
21 | * trans-array.c (structure_alloc_comps): Handle deallocation and | |
22 | nullification of allocatable scalar components. | |
23 | * trans-decl.c (gfc_get_symbol_decl): Remember allocatable scalars for | |
24 | automatic deallocation. | |
25 | (gfc_trans_deferred_vars): Automatically deallocate allocatable scalars. | |
26 | ||
585ba38f TB |
27 | 2009-10-19 Tobias Burnus <burnus@net-b.de> |
28 | Steven G. Kargl <kargl@gcc.gnu.org> | |
29 | ||
30 | PR fortran/41755 | |
31 | * symbol.c (gfc_undo_symbols): Add NULL check. | |
32 | * match.c (gfc_match_equivalence): Add check for | |
33 | missing comma. | |
34 | ||
94990aca RG |
35 | 2009-10-19 Richard Guenther <rguenther@suse.de> |
36 | ||
37 | PR fortran/41494 | |
38 | * trans-expr.c (gfc_trans_scalar_assign): Do not call | |
39 | gfc_evaluate_now. | |
40 | ||
2e23972e JW |
41 | 2009-10-17 Janus Weil <janus@gcc.gnu.org> |
42 | Paul Thomas <pault@gcc.gnu.org> | |
43 | ||
44 | PR fortran/41608 | |
45 | * decl.c (gfc_match_data_decl): Add BT_CLASS for undefined type | |
46 | and empty type errors. | |
47 | * parse.c (gfc_build_block_ns): Only set recursive if parent ns | |
48 | has a proc_name. | |
49 | ||
50 | PR fortran/41629 | |
51 | PR fortran/41618 | |
52 | PR fortran/41587 | |
53 | * gfortran.h : Add class_ok bitfield to symbol_attr. | |
54 | * decl.c (build_sym): Set attr.class_ok if dummy, pointer or | |
55 | allocatable. | |
56 | (build_struct): Use gfc_try 't' to carry errors past the call | |
57 | to encapsulate_class_symbol. | |
58 | (attr_decl1): For a CLASS object, apply the new attribute to | |
59 | the data component. | |
60 | * match.c (gfc_match_select_type): Set attr.class_ok for an | |
61 | assigned selector. | |
62 | * resolve.c (resolve_fl_variable_derived): Check a CLASS object | |
63 | is dummy, pointer or allocatable by testing the class_ok and | |
64 | the use_assoc attribute. | |
65 | ||
0ae278e7 JW |
66 | 2009-10-16 Janus Weil <janus@gcc.gnu.org> |
67 | ||
68 | PR fortran/41719 | |
69 | * resolve.c (resolve_ordinary_assign): Reject intrinsic assignments | |
70 | to polymorphic variables. | |
71 | ||
28188747 PT |
72 | 2009-10-16 Paul Thomas <pault@gcc.gnu.org> |
73 | ||
74 | PR fortran/41648 | |
75 | PR fortran/41656 | |
76 | * trans-expr.c (select_class_proc): Convert the expression for the | |
77 | vindex, carried on the first member of the esym list. | |
78 | * gfortran.h : Add the vindex field to the esym_list structure. | |
79 | and eliminate the class_object field. | |
80 | * resolve.c (check_class_members): Remove the setting of the | |
81 | class_object field. | |
82 | (vindex_expr): New function. | |
83 | (get_class_from_expr): New function. | |
84 | (resolve_class_compcall): Call the above to find the ultimate | |
85 | class or derived component. If derived, do not generate the | |
86 | esym list. Add and expression for the vindex to the esym list | |
87 | by calling the above. | |
88 | (resolve_class_typebound_call): The same. | |
89 | ||
1feb1d7c SK |
90 | 2009-10-15 Steven G. Kargl <kargl@gcc.gnu.org> |
91 | ||
f6ee328a | 92 | PR fortran/41712 |
1feb1d7c SK |
93 | * intrinsic.texi: Explicitly state that ETIME and DTIME take |
94 | REAL(4) arguments. Fix nearby typographically errors where | |
95 | /leq was used instead of \leq. | |
96 | ||
f43085aa JW |
97 | 2009-10-13 Janus Weil <janus@gcc.gnu.org> |
98 | ||
99 | PR fortran/41581 | |
100 | * decl.c (encapsulate_class_symbol): Add new component '$size'. | |
101 | * resolve.c (resolve_allocate_expr): Move CLASS handling to | |
102 | gfc_trans_allocate. | |
103 | (resolve_class_assign): Replaced by gfc_trans_class_assign. | |
104 | (resolve_code): Remove calls to resolve_class_assign. | |
105 | * trans.c (gfc_trans_code): Use new function gfc_trans_class_assign. | |
106 | * trans-expr.c (get_proc_ptr_comp): Fix a memory leak. | |
107 | (gfc_conv_procedure_call): For CLASS dummies, set the | |
108 | $size component. | |
109 | (gfc_trans_class_assign): New function, replacing resolve_class_assign. | |
110 | * trans-stmt.h (gfc_trans_class_assign): New prototype. | |
111 | * trans-stmt.c (gfc_trans_allocate): Use correct size when allocating | |
112 | CLASS variables. Do proper initialization. Move some code here from | |
113 | resolve_allocate_expr. | |
114 | ||
3c6d5e12 JD |
115 | 2009-10-11 Jerry DeLisle <jvdelisle@gcc.gnu.org> |
116 | ||
117 | PR fortran/38439 | |
118 | * io.c (check_format): Fix locus for error messages and fix a comment. | |
119 | ||
a14ce128 PT |
120 | 2009-10-11 Paul Thomas <pault@gcc.gnu.org> |
121 | ||
1aa4ade6 | 122 | PR fortran/41583 |
a14ce128 PT |
123 | * decl.c (hash_value): New function. |
124 | (gfc_match_derived_decl): Call it. | |
125 | ||
619dd721 JW |
126 | 2009-10-09 Janus Weil <janus@gcc.gnu.org> |
127 | ||
128 | PR fortran/41585 | |
129 | * decl.c (build_struct): Bugfix for CLASS components. | |
130 | ||
d0a9804e TB |
131 | 2009-10-09 Tobias Burnus <burnus@net-b.de> |
132 | ||
133 | PR fortran/41582 | |
134 | * decl.c (encapsulate_class_symbol): Save attr.abstract. | |
135 | * resolve.c (resolve_allocate_expr): Reject class allocate | |
136 | without typespec or source=. | |
137 | * trans-stmt.c (gfc_trans_allocate): Change gfc_warning | |
138 | into gfc_error for "not yet implemented". | |
139 | ||
7431bf06 JW |
140 | 2009-10-09 Janus Weil <janus@gcc.gnu.org> |
141 | ||
142 | PR fortran/41579 | |
143 | * gfortran.h (gfc_select_type_stack): New struct, to be used as a stack | |
144 | for SELECT TYPE statements. | |
145 | (select_type_stack): New global variable. | |
146 | (type_selector,select_type_tmp): Removed. | |
147 | * match.c (type_selector,type_selector): Removed. | |
148 | (select_type_stack): New variable, serving as a stack for | |
149 | SELECT TYPE statements. | |
150 | (select_type_push,select_type_set_tmp): New functions. | |
151 | (gfc_match_select_type): Call select_type_push. | |
152 | (gfc_match_type_is): Call select_type_set_tmp. | |
153 | * parse.c (select_type_pop): New function. | |
154 | (parse_select_type_block): Call select_type_pop. | |
155 | * symbol.c (select_type_insert_tmp): New function. | |
156 | (gfc_find_sym_tree): Call select_type_insert_tmp. | |
157 | ||
2d5a82c1 KG |
158 | 2009-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> |
159 | ||
160 | * arith.c (arith_power): Use mpc_pow_z. | |
161 | * gfortran.h (HAVE_mpc_pow_z): Define. | |
162 | ||
6c19d9b5 DK |
163 | 2009-10-07 Daniel Kraft <d@domob.eu> |
164 | ||
165 | PR fortran/41615 | |
166 | * resolve.c (resolve_contained_fntype): Clarify error message for | |
167 | invalid assumed-length character result on module procedures. | |
168 | ||
93d76687 JW |
169 | 2009-10-07 Janus Weil <janus@gcc.gnu.org> |
170 | ||
171 | * expr.c (gfc_check_pointer_assign): Do the correct type checking when | |
172 | CLASS variables are involved. | |
173 | * match.c (gfc_match_select_type): Parse associate-name in SELECT TYPE | |
174 | statements, and set up a local namespace for the SELECT TYPE block. | |
175 | * parse.h (gfc_build_block_ns): New prototype. | |
176 | * parse.c (parse_select_type_block): Return from local namespace to its | |
177 | parent after SELECT TYPE block. | |
178 | (gfc_build_block_ns): New function for setting up the local namespace | |
179 | for a BLOCK construct. | |
180 | (parse_block_construct): Use gfc_build_block_ns. | |
181 | * resolve.c (resolve_select_type): Insert assignment for the selector | |
182 | variable, in case an associate-name is given, and put the SELECT TYPE | |
183 | statement inside a BLOCK. | |
184 | (resolve_code): Call resolve_class_assign after checking the assignment. | |
185 | * symbol.c (gfc_find_sym_tree): Moved some code here from | |
186 | gfc_get_ha_sym_tree. | |
187 | (gfc_get_ha_sym_tree): Moved some code to gfc_find_sym_tree. | |
188 | ||
28fccf2c PT |
189 | 2009-10-07 Paul Thomas <pault@gcc.gnu.org> |
190 | ||
d0a9804e TB |
191 | PR fortran/41613 |
192 | * resolve.c (check_class_members): Reset compcall.assign. | |
28fccf2c | 193 | |
7cf078dc PT |
194 | 2009-10-05 Paul Thomas <pault@gcc.gnu.org> |
195 | ||
196 | * trans-expr.c (select_class_proc): New function. | |
197 | (conv_function_val): Deal with class methods and call above. | |
198 | * symbol.c (gfc_type_compatible): Treat case where both ts1 and | |
199 | ts2 are BT_CLASS. | |
200 | gfortran.h : Add structure gfc_class_esym_list and include in | |
201 | the structure gfc_expr. | |
202 | * module.c (load_derived_extensions): New function. | |
203 | (read_module): Call above. | |
204 | (write_dt_extensions): New function. | |
205 | (write_derived_extensions): New function. | |
206 | (write_module): Use the above. | |
207 | * resolve.c (resolve_typebound_call): Add a function expression | |
208 | for class methods. This carries the chain of symbols for the | |
209 | dynamic dispatch in select_class_proc. | |
210 | (resolve_compcall): Add second, boolean argument to indicate if | |
211 | a function is being handled. | |
212 | (check_members): New function. | |
213 | (check_class_members): New function. | |
214 | (resolve_class_compcall): New function. | |
215 | (resolve_class_typebound_call): New function. | |
216 | (gfc_resolve_expr): Call above for component calls.. | |
217 | ||
916bd5f0 DK |
218 | 2009-10-05 Daniel Kraft <d@domob.eu> |
219 | ||
220 | PR fortran/41403 | |
221 | * trans-stmt.c (gfc_trans_goto): Ignore statement list on assigned goto | |
222 | if it is present. | |
223 | ||
d7f09764 DN |
224 | 2009-10-03 Richard Guenther <rguenther@suse.de> |
225 | ||
226 | * options.c (gfc_post_options): Handle -flto and -fwhopr. | |
227 | ||
ba6f7079 TB |
228 | 2009-10-02 Tobias Burnus <burnus@net-b.de> |
229 | ||
230 | PR fortran/41479 | |
231 | * trans-decl.c (gfc_init_default_dt): Check for presence of | |
232 | the argument only if it is optional or in entry master. | |
233 | (init_intent_out_dt): Ditto; call gfc_init_default_dt | |
234 | for all derived types with initializers. | |
235 | ||
8e70c271 KG |
236 | 2009-10-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> |
237 | ||
238 | PR fortran/33197 | |
239 | * gfortran.h (HAVE_mpc_arc): Define. | |
240 | * simplify.c (gfc_simplify_acos): Handle complex acos. | |
241 | (gfc_simplify_acosh): Likewise for acosh. | |
242 | (gfc_simplify_asin): Likewise for asin. | |
243 | (gfc_simplify_asinh): Likewise for asinh. | |
244 | (gfc_simplify_atan): Likewise for atan. | |
245 | (gfc_simplify_atanh): Likewise for atanh. | |
246 | ||
7919373d TB |
247 | 2009-10-01 Tobias Burnus <burnus@net-b.de> |
248 | ||
249 | PR fortran/41515 | |
250 | * decl.c (do_parm): Call add_init_expr_to_sym. | |
251 | ||
c6ec7cc6 DW |
252 | 2009-09-30 Dennis Wassel <dennis.wassel@gmail.com> |
253 | ||
254 | * gcc/fortran/trans-array.c (gfc_trans_array_bound_check): Improved | |
255 | bounds checking error messages. (gfc_conv_array_ref): Likewise. | |
256 | (gfc_conv_ss_startstride): Likewise. | |
257 | ||
e56817db TB |
258 | 2009-09-30 Janus Weil <janus@gcc.gnu.org> |
259 | ||
260 | * resolve.c (check_typebound_baseobject): Don't check for | |
261 | abstract types for CLASS. | |
262 | (resolve_class_assign): Adapt for RHS being a CLASS. | |
263 | * trans-intrinsic.c (gfc_conv_associated): Add component ref | |
264 | if expr is a CLASS. | |
265 | ||
cf2b3c22 TB |
266 | 2009-09-30 Janus Weil <janus@gcc.gnu.org> |
267 | ||
268 | * check.c (gfc_check_same_type_as): New function for checking | |
269 | SAME_TYPE_AS and EXTENDS_TYPE_OF. | |
270 | * decl.c (encapsulate_class_symbol): Set ABSTRACT attribute for class | |
271 | container, if the contained type has it. Add an initializer for the | |
272 | class container. | |
273 | (add_init_expr_to_sym): Handle BT_CLASS. | |
274 | (vindex_counter): New counter for setting vindices. | |
275 | (gfc_match_derived_decl): Set vindex for all derived types, not only | |
276 | those which are being extended. | |
277 | * expr.c (gfc_check_assign_symbol): Handle NULL initialization of class | |
278 | pointers. | |
279 | * gfortran.h (gfc_isym_id): New values GFC_ISYM_SAME_TYPE_AS and | |
280 | GFC_ISYM_EXTENDS_TYPE_OF. | |
281 | (gfc_type_is_extensible): New prototype. | |
282 | * intrinsic.h (gfc_check_same_type_as): New prototype. | |
283 | * intrinsic.c (add_functions): Add SAME_TYPE_AS and EXTENDS_TYPE_OF. | |
284 | * primary.c (gfc_expr_attr): Handle CLASS-valued functions. | |
285 | * resolve.c (resolve_structure_cons): Handle BT_CLASS. | |
286 | (type_is_extensible): Make non-static and rename to | |
287 | 'gfc_type_is_extensible. | |
288 | (resolve_select_type): Renamed type_is_extensible. | |
289 | (resolve_class_assign): Handle NULL pointers. | |
290 | (resolve_fl_variable_derived): Renamed type_is_extensible. | |
291 | (resolve_fl_derived): Ditto. | |
292 | * trans-expr.c (gfc_trans_subcomponent_assign): Handle NULL | |
293 | initialization of class pointer components. | |
294 | (gfc_conv_structure): Handle BT_CLASS. | |
295 | * trans-intrinsic.c (gfc_conv_same_type_as,gfc_conv_extends_type_of): | |
296 | New functions. | |
297 | (gfc_conv_intrinsic_function): Handle SAME_TYPE_AS and EXTENDS_TYPE_OF. | |
298 | ||
299 | 2009-09-30 Janus Weil <janus@gcc.gnu.org> | |
300 | ||
301 | * gfortran.h (type_selector, select_type_tmp): New global variables. | |
302 | * match.c (type_selector, select_type_tmp): New global variables, | |
303 | used for SELECT TYPE statements. | |
304 | (gfc_match_select_type): Better error handling. Remember selector. | |
305 | (gfc_match_type_is): Create temporary variable. | |
306 | * module.c (ab_attribute): New value 'AB_IS_CLASS'. | |
307 | (attr_bits): New string. | |
308 | (mio_symbol_attribute): Handle 'is_class'. | |
309 | * resolve.c (resolve_select_type): Insert pointer assignment statement, | |
310 | to assign temporary to selector. | |
311 | * symbol.c (gfc_get_ha_sym_tree): Replace selector by a temporary | |
312 | in SELECT TYPE statements. | |
313 | ||
314 | 2009-09-30 Janus Weil <janus@gcc.gnu.org> | |
315 | ||
316 | * dump-parse-tree.c (show_code_node): Renamed 'alloc_list'. | |
317 | * gfortran.h (gfc_code): Rename 'alloc_list'. Add member 'ts'. | |
318 | (gfc_expr_to_initialize): New prototype. | |
319 | * match.c (alloc_opt_list): Correctly check type compatibility. | |
320 | Renamed 'alloc_list'. | |
321 | (dealloc_opt_list): Renamed 'alloc_list'. | |
322 | * resolve.c (expr_to_initialize): Rename to 'gfc_expr_to_initialize' | |
323 | and make it non-static. | |
324 | (resolve_allocate_expr): Set vindex for CLASS variables correctly. | |
325 | Move initialization code to gfc_trans_allocate. Renamed 'alloc_list'. | |
326 | (resolve_allocate_deallocate): Renamed 'alloc_list'. | |
327 | (check_class_pointer_assign): Rename to 'resolve_class_assign'. Change | |
328 | argument type. Adjust to work with ordinary assignments. | |
329 | (resolve_code): Call 'resolve_class_assign' for ordinary assignments. | |
330 | Renamed 'check_class_pointer_assign'. | |
331 | * st.c (gfc_free_statement): Renamed 'alloc_list'. | |
332 | * trans-stmt.c (gfc_trans_allocate): Renamed 'alloc_list'. Handle | |
333 | size determination and initialization of CLASS variables. Bugfix for | |
334 | ALLOCATE statements with default initialization and SOURCE block. | |
335 | (gfc_trans_deallocate): Renamed 'alloc_list'. | |
336 | ||
337 | 2009-09-30 Paul Thomas <pault@gcc.gnu.org> | |
338 | ||
339 | * trans-expr.c (gfc_conv_procedure_call): Convert a derived | |
340 | type actual to a class object if the formal argument is a | |
341 | class. | |
342 | ||
343 | 2009-09-30 Janus Weil <janus@gcc.gnu.org> | |
344 | ||
345 | PR fortran/40996 | |
346 | * decl.c (build_struct): Handle allocatable scalar components. | |
347 | * expr.c (gfc_add_component_ref): Correctly set typespec of expression, | |
348 | after inserting component reference. | |
349 | * match.c (gfc_match_type_is,gfc_match_class_is): Make sure that no | |
350 | variables are being used uninitialized. | |
351 | * primary.c (gfc_match_varspec): Handle CLASS array components. | |
352 | * resolve.c (resolve_select_type): Transform EXEC_SELECT_TYPE to | |
353 | EXEC_SELECT. | |
354 | * trans-array.c (structure_alloc_comps,gfc_trans_deferred_array): | |
355 | Handle allocatable scalar components. | |
356 | * trans-expr.c (gfc_conv_component_ref): Ditto. | |
357 | * trans-types.c (gfc_get_derived_type): Ditto. | |
358 | ||
359 | 2009-09-30 Janus Weil <janus@gcc.gnu.org> | |
360 | ||
361 | * decl.c (encapsulate_class_symbol): Modify names of class container | |
362 | components by prefixing with '$'. | |
363 | (gfc_match_end): Handle COMP_SELECT_TYPE. | |
364 | * expr.c (gfc_add_component_ref): Modify names of class container | |
365 | components by prefixing with '$'. | |
366 | * gfortran.h (gfc_statement): Add ST_SELECT_TYPE, ST_TYPE_IS and | |
367 | ST_CLASS_IS. | |
368 | (gfc_case): New field 'ts'. | |
369 | (gfc_exec_op): Add EXEC_SELECT_TYPE. | |
370 | (gfc_type_is_extension_of): New prototype. | |
371 | * match.h (gfc_match_select_type,gfc_match_type_is,gfc_match_class_is): | |
372 | New prototypes. | |
373 | * match.c (match_derived_type_spec): New function. | |
374 | (match_type_spec): Use 'match_derived_type_spec'. | |
375 | (match_case_eos): Modify error message. | |
376 | (gfc_match_select_type): New function. | |
377 | (gfc_match_case): Modify error message. | |
378 | (gfc_match_type_is): New function. | |
379 | (gfc_match_class_is): Ditto. | |
380 | * parse.h (gfc_compile_state): Add COMP_SELECT_TYPE. | |
381 | * parse.c (decode_statement): Handle SELECT TYPE, TYPE IS and CLASS IS | |
382 | statements. | |
383 | (next_statement): Handle ST_SELECT_TYPE. | |
384 | (gfc_ascii_statement): Handle ST_SELECT_TYPE, ST_TYPE_IS, ST_CLASS_IS. | |
385 | (parse_select_type_block): New function. | |
386 | (parse_executable): Handle ST_SELECT_TYPE. | |
387 | * resolve.c (resolve_deallocate_expr): Handle BT_CLASS. Modify names of | |
388 | class container components by prefixing with '$'. | |
389 | (resolve_allocate_expr): Ditto. | |
390 | (resolve_select_type): New function. | |
391 | (gfc_resolve_blocks): Handle EXEC_SELECT_TYPE. | |
392 | (check_class_pointer_assign): Modify names of class container | |
393 | components by prefixing with '$'. | |
394 | (resolve_code): Ditto. | |
395 | * st.c (gfc_free_statement): Ditto. | |
396 | * symbol.c (gfc_type_is_extension_of): New function. | |
397 | (gfc_type_compatible): Use 'gfc_type_is_extension_of', plus a bugfix. | |
398 | * trans.c (gfc_trans_code): Handel EXEC_SELECT_TYPE. | |
399 | ||
400 | 2009-09-30 Janus Weil <janus@gcc.gnu.org> | |
401 | Paul Thomas <pault@gcc.gnu.org> | |
402 | ||
403 | * check.c (gfc_check_move_alloc): Arguments don't have to be arrays. | |
404 | The second argument needs to be type-compatible with the first (not the | |
405 | other way around, which makes a difference for CLASS entities). | |
406 | * decl.c (encapsulate_class_symbol): New function. | |
407 | (build_sym,build_struct): Handle BT_CLASS, call | |
408 | 'encapsulate_class_symbol'. | |
409 | (gfc_match_decl_type_spec): Remove warning, use BT_CLASS. | |
410 | (gfc_match_derived_decl): Set vindex; | |
411 | * expr.c (gfc_add_component_ref): New function. | |
412 | (gfc_copy_expr,gfc_check_pointer_assign,gfc_check_assign_symbol): | |
413 | Handle BT_CLASS. | |
414 | * dump-parse-tree.c (show_symbol): Print vindex. | |
415 | * gfortran.h (bt): New basic type BT_CLASS. | |
416 | (symbol_attribute): New field 'is_class'. | |
417 | (gfc_typespec): Remove field 'is_class'. | |
418 | (gfc_symbol): New field 'vindex'. | |
419 | (gfc_get_ultimate_derived_super_type): New prototype. | |
420 | (gfc_add_component_ref): Ditto. | |
421 | * interface.c (gfc_compare_derived_types): Pointer equality check | |
422 | moved here from gfc_compare_types. | |
423 | (gfc_compare_types): Handle BT_CLASS and use | |
424 | gfc_type_compatible. | |
425 | * match.c (gfc_match_allocate,gfc_match_deallocate,gfc_match_call): | |
426 | Handle BT_CLASS. | |
427 | * misc.c (gfc_clear_ts): Removed is_class. | |
428 | (gfc_basic_typename,gfc_typename): Handle BT_CLASS. | |
429 | * module.c (bt_types,mio_typespec): Handle BT_CLASS. | |
430 | (mio_symbol): Handle vindex. | |
431 | * primary.c (gfc_match_varspec,gfc_variable_attr): Handle BT_CLASS. | |
432 | * resolve.c (find_array_spec,check_typebound_baseobject): | |
433 | Handle BT_CLASS. | |
434 | (resolve_ppc_call,resolve_expr_ppc): Don't call 'gfc_is_proc_ptr_comp' | |
435 | inside 'gcc_assert'. | |
436 | (resolve_deallocate_expr,resolve_allocate_expr): Handle BT_CLASS. | |
437 | (check_class_pointer_assign): New function. | |
438 | (resolve_code): Handle BT_CLASS, call check_class_pointer_assign. | |
439 | (resolve_fl_var_and_proc,type_is_extensible,resolve_fl_variable_derived, | |
440 | resolve_fl_variable): Handle BT_CLASS. | |
441 | (check_generic_tbp_ambiguity): Add special case. | |
442 | (resolve_typebound_procedure,resolve_fl_derived): Handle BT_CLASS. | |
443 | * symbol.c (gfc_get_ultimate_derived_super_type): New function. | |
444 | (gfc_type_compatible): Handle BT_CLASS. | |
445 | * trans-expr.c (conv_parent_component_references): Handle CLASS | |
446 | containers. | |
447 | (gfc_conv_initializer): Handle BT_CLASS. | |
448 | * trans-types.c (gfc_typenode_for_spec,gfc_get_derived_type): | |
449 | Handle BT_CLASS. | |
450 | ||
9abe5e56 DK |
451 | 2009-09-29 Daniel Kraft <d@domob.eu> |
452 | ||
453 | PR fortran/39626 | |
454 | * gfortran.h (enum gfc_statement): Add ST_BLOCK and ST_END_BLOCK. | |
455 | (struct gfc_namespace): Convert flags to bit-fields and add flag | |
456 | `construct_entities' for use with BLOCK constructs. | |
457 | (enum gfc_exec_code): Add EXEC_BLOCK. | |
458 | (struct gfc_code): Add namespace field to union for EXEC_BLOCK. | |
459 | * match.h (gfc_match_block): New prototype. | |
460 | * parse.h (enum gfc_compile_state): Add COMP_BLOCK. | |
461 | * trans.h (gfc_process_block_locals): New prototype. | |
462 | (gfc_trans_deferred_vars): Made public, new prototype. | |
463 | * trans-stmt.h (gfc_trans_block_construct): New prototype. | |
464 | * decl.c (gfc_match_end): Handle END BLOCK correctly. | |
465 | (gfc_match_intent): Error if inside of BLOCK. | |
466 | (gfc_match_optional), (gfc_match_value): Ditto. | |
467 | * match.c (gfc_match_block): New routine. | |
468 | * parse.c (decode_statement): Handle BLOCK statement. | |
469 | (case_exec_markers): Add ST_BLOCK. | |
470 | (case_end): Add ST_END_BLOCK. | |
471 | (gfc_ascii_statement): Handle ST_BLOCK and ST_END_BLOCK. | |
472 | (parse_spec): Check for statements not allowed inside of BLOCK. | |
473 | (parse_block_construct): New routine. | |
474 | (parse_executable): Parse BLOCKs. | |
475 | (parse_progunit): Disallow CONTAINS in BLOCK constructs. | |
476 | * resolve.c (is_illegal_recursion): Find real container procedure and | |
477 | don't get confused by BLOCK constructs. | |
478 | (resolve_block_construct): New routine. | |
479 | (gfc_resolve_blocks), (resolve_code): Handle EXEC_BLOCK. | |
480 | * st.c (gfc_free_statement): Handle EXEC_BLOCK statements. | |
481 | * trans-decl.c (saved_local_decls): New static variable. | |
482 | (add_decl_as_local): New routine. | |
483 | (gfc_finish_var_decl): Add variable as local if inside BLOCK. | |
484 | (gfc_trans_deferred_vars): Make public. | |
485 | (gfc_process_block_locals): New routine. | |
486 | * trans-stmt.c (gfc_trans_block_construct): New routine. | |
487 | * trans.c (gfc_trans_code): Handle EXEC_BLOCK statements. | |
488 | ||
f2a71504 JD |
489 | 2009-09-28 Jerry DeLisle <jvdelisle@gcc.gnu.org> |
490 | ||
491 | PR fortran/35862 | |
492 | * io.c (format_token): Add enumerators for rounding format specifiers. | |
493 | (format_lex): Tokenize the rounding format specifiers. | |
494 | (gfc_match_open): Enable rounding modes in OPEN statement. | |
495 | ||
384c400a RH |
496 | 2009-09-28 Richard Henderson <rth@redhat.com> |
497 | ||
498 | * f95-lang.c (gfc_init_builtin_functions): Update call to | |
499 | build_common_builtin_nodes. | |
500 | ||
67749498 KG |
501 | 2009-09-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> |
502 | ||
503 | * simplify.c (gfc_simplify_acos, gfc_simplify_acosh, | |
504 | gfc_simplify_asin, gfc_simplify_asinh, gfc_simplify_atan, | |
505 | gfc_simplify_atanh): Fix error message. | |
506 | ||
bbffcb7e SK |
507 | 2009-09-24 Steven G. Kargl <kargl@gcc.gnu.org> |
508 | ||
509 | PR fortran/41459 | |
510 | * error.c(gfc_warning_now): Move warnings_are_errors test to | |
511 | after actual emitting of the warning. | |
512 | * parse.c (next_free): Improve error locus printing. | |
513 | (next_fixed): Change gfc_warn to gfc_warning_now, and improve | |
514 | locus reporting. | |
bbffcb7e | 515 | |
9b87db3c MM |
516 | 2009-09-16 Michael Matz <matz@suse.de> |
517 | ||
518 | PR fortran/41212 | |
519 | * trans.h (struct lang_type): Remove nontarget_type member. | |
520 | * trans.c (gfc_add_modify): Don't access it. | |
521 | * trans-decl.c (gfc_finish_var_decl): Don't allocate and set it, | |
522 | instead set DECL_RESTRICTED_P on affected decls. | |
523 | ||
1d65f45c RH |
524 | 2009-09-14 Richard Henderson <rth@redhat.com> |
525 | ||
526 | * f95-lang.c (gfc_init_builtin_functions): Update call to | |
527 | build_common_builtin_nodes. | |
528 | (gfc_maybe_initialize_eh): Don't call | |
529 | default_init_unwind_resume_libfunc. | |
530 | ||
f9417da1 RG |
531 | 2009-09-13 Richard Guenther <rguenther@suse.de> |
532 | Rafael Avila de Espindola <espindola@google.com> | |
533 | ||
534 | * f95-lang.c (gfc_maybe_initialize_eh): Do not init | |
535 | eh_personality_libfunc. | |
536 | ||
664e411b JW |
537 | 2009-09-11 Janus Weil <janus@gcc.gnu.org> |
538 | ||
539 | PR fortran/41242 | |
540 | * resolve.c (resolve_ordinary_assign): Don't call resolve_code, | |
541 | to avoid that subsequent codes are resolved more than once. | |
542 | (resolve_code): Make sure that type-bound assignment operators are | |
543 | resolved correctly. | |
544 | ||
545 | ||
43dfd40c SK |
546 | 2009-09-10 Steven G. Kargl <kargl@gcc.gnu.org> |
547 | ||
548 | PR fortran/31292 | |
549 | * fortran/decl.c(gfc_match_modproc): Check that module procedures | |
550 | from a module can USEd in module procedure statements in other | |
551 | program units. Update locus for better error message display. | |
552 | Detect intrinsic procedures in module procedure statements. | |
553 | ||
39b747f2 RG |
554 | 2009-09-09 Richard Guenther <rguenther@suse.de> |
555 | ||
556 | PR fortran/41297 | |
557 | * trans-expr.c (gfc_trans_scalar_assign): Correct typo that | |
558 | left 'tmp' unused in derived type assignment. | |
559 | ||
6c145259 TK |
560 | 2009-09-07 Thomas Koenig <tkoenig@gcc.gnu.org> |
561 | ||
562 | PR fortran/41197 | |
563 | * resolve_c (resolve_allocate_deallocate): Complain | |
564 | if stat or errmsg varaible is an array. | |
565 | ||
b2acf594 PT |
566 | 2009-09-05 Paul Thomas <pault@gcc.gnu.org> |
567 | ||
568 | PR fortran/41258 | |
569 | * primary.c (gfc_match_varspec): Do not look for typebound | |
570 | procedures unless the derived type has a f2k_derived namespace. | |
571 | ||
4537ec0c DN |
572 | 2009-09-03 Diego Novillo <dnovillo@google.com> |
573 | ||
574 | * f95-lang.c (lang_hooks): Remove const qualifier. | |
575 | ||
58f986ca RG |
576 | 2009-09-01 Richard Guenther <rguenther@suse.de> |
577 | ||
578 | * f95-lang.c (gfc_mark_addressable): Remove. | |
579 | (LANG_HOOKS_MARK_ADDRESSABLE): Likewise. | |
580 | ||
9cd38d51 JD |
581 | 2009-08-31 Jerry DeLisle <jvdelisle@gcc.gnu.org> |
582 | ||
583 | PR fortran/39229 | |
584 | * scanner.c (next_char): Fix typo in comment. | |
585 | (gfc_get_char_literal): Warn if truncate flag is set for both fixed and | |
586 | free form source, adjusting error locus as needed. | |
587 | * parse.c (next_fixed): Clear the truncate flag. | |
588 | (next_statement): Remove truncate warning. | |
589 | ||
e74f1cc8 JW |
590 | 2009-08-31 Janus Weil <janus@gcc.gnu.org> |
591 | Paul Thomas <pault@gcc.gnu.org> | |
592 | ||
593 | PR fortran/40940 | |
594 | * array.c (gfc_match_array_constructor): Rename gfc_match_type_spec. | |
595 | * decl.c (gfc_match_type_spec): Rename to gfc_match_decl_type_spec, | |
596 | and reject CLASS with -std=f95. | |
597 | (gfc_match_implicit, gfc_match_data_decl,gfc_match_prefix, | |
598 | match_procedure_interface): Rename gfc_match_type_spec. | |
599 | * gfortran.h (gfc_type_compatible): Add prototype. | |
600 | * match.h (gfc_match_type_spec): Rename to gfc_match_decl_type_spec. | |
601 | * match.c (match_intrinsic_typespec): Rename to match_type_spec, and | |
602 | add handling of derived types. | |
603 | (gfc_match_allocate): Rename match_intrinsic_typespec and check | |
604 | type compatibility of derived types. | |
605 | * symbol.c (gfc_type_compatible): New function to check if two types | |
606 | are compatible. | |
607 | ||
2fbd4117 JW |
608 | 2009-08-31 Janus Weil <janus@gcc.gnu.org> |
609 | ||
610 | PR fortran/40996 | |
611 | * check.c (gfc_check_allocated): Implement allocatable scalars. | |
612 | * resolve.c (resolve_allocate_expr,resolve_fl_var_and_proc): Ditto. | |
613 | * trans-intrinsic.c (gfc_conv_allocated): Ditto. | |
614 | ||
26ef2b42 DK |
615 | 2009-08-30 Daniel Kraft <d@domob.eu> |
616 | ||
617 | PR fortran/37425 | |
618 | * dump-parse-tree.c (show_typebound_proc): Renamed from `show_typebound' | |
619 | and accept gfc_typebound_proc and name instead of the symtree, needed | |
620 | for intrinsic operator output. | |
621 | (show_typebound_symtree): New method calling `show_typebound_proc'. | |
622 | (show_f2k_derived): Output type-bound operators also. | |
623 | (show_symbol): Moved output of `Procedure bindings:' label to | |
624 | `show_f2k_derived'. | |
625 | * gfortran.texi (Fortran 2003 status): Mention support of | |
626 | array-constructors with explicit type specification, type-bound | |
627 | procedures/operators, type extension, ABSTRACT types and DEFERRED. | |
628 | Link to Fortran 2003 wiki page. | |
629 | (Fortran 2008 status): Fix typo. Link to Fortran 2008 wiki page. | |
630 | * gfc-internals.texi (Type-bound Procedures): Document the new | |
631 | members/attributes of gfc_expr.value.compcall used for type-bound | |
632 | operators. | |
633 | (Type-bound Operators): New section documenting their internals. | |
634 | ||
889dc035 JW |
635 | 2009-08-27 Janus Weil <janus@gcc.gnu.org> |
636 | ||
637 | PR fortran/40869 | |
638 | * expr.c (gfc_check_pointer_assign): Enable interface check for | |
639 | pointer assignments involving procedure pointer components. | |
640 | * gfortran.h (gfc_compare_interfaces): Modified prototype. | |
641 | * interface.c (gfc_compare_interfaces): Add argument 'name2', to be | |
642 | used instead of s2->name. Don't rely on the proc_pointer attribute, | |
643 | but instead on the flags handed to this function. | |
644 | (check_interface1,compare_parameter): Add argument for | |
645 | gfc_compare_interfaces. | |
646 | * resolve.c (check_generic_tbp_ambiguity): Ditto. | |
647 | ||
4a44a72d DK |
648 | 2009-08-27 Daniel Kraft <d@domob.eu> |
649 | ||
650 | PR fortran/37425 | |
651 | * gfortran.h (gfc_expr): Optionally store base-object in compcall value | |
652 | and add a new flag to distinguish assign-calls generated. | |
653 | (gfc_find_typebound_proc): Add locus argument. | |
654 | (gfc_find_typebound_user_op), (gfc_find_typebound_intrinsic_op): Ditto. | |
655 | (gfc_extend_expr): Return if failure was by a real error. | |
656 | * interface.c (matching_typebound_op): New routine. | |
657 | (build_compcall_for_operator): New routine. | |
658 | (gfc_extend_expr): Handle type-bound operators, some clean-up and | |
659 | return if failure was by a real error or just by not finding an | |
660 | appropriate operator definition. | |
661 | (gfc_extend_assign): Handle type-bound assignments. | |
662 | * module.c (MOD_VERSION): Incremented. | |
663 | (mio_intrinsic_op): New routine. | |
664 | (mio_full_typebound_tree): New routine to make typebound-procedures IO | |
665 | code reusable for type-bound user operators. | |
666 | (mio_f2k_derived): IO of type-bound operators. | |
667 | * primary.c (gfc_match_varspec): Initialize new fields in gfc_expr and | |
668 | pass locus to gfc_find_typebound_proc. | |
669 | * resolve.c (resolve_operator): Only output error about no matching | |
670 | interface if gfc_extend_expr did not already fail with an error. | |
671 | (extract_compcall_passed_object): Use specified base-object if present. | |
672 | (update_compcall_arglist): Handle ignore_pass field. | |
673 | (resolve_ordinary_assign): Update to handle extended code for | |
674 | type-bound assignments, too. | |
675 | (resolve_code): Handle EXEC_ASSIGN_CALL statement code. | |
676 | (resolve_tb_generic_targets): Pass locus to gfc_find_typebound_proc. | |
677 | (resolve_typebound_generic), (resolve_typebound_procedure): Ditto. | |
678 | (resolve_typebound_intrinsic_op), (resolve_typebound_user_op): Ditto. | |
679 | (ensure_not_abstract_walker), (resolve_fl_derived): Ditto. | |
680 | (resolve_typebound_procedures): Remove not-implemented error. | |
681 | (resolve_typebound_call): Handle assign-call flag. | |
682 | * symbol.c (find_typebound_proc_uop): New argument to pass locus for | |
683 | error message about PRIVATE, verify that a found procedure is not marked | |
684 | as erraneous. | |
685 | (gfc_find_typebound_intrinsic_op): Ditto. | |
686 | (gfc_find_typebound_proc), (gfc_find_typebound_user_op): New locus arg. | |
687 | ||
9cd38d51 | 688 | 2009-08-22 Bud Davis <bdavis9659@sbcglobal.net> |
171fc18d BD |
689 | |
690 | PR fortran/28093 | |
9cd38d51 | 691 | * io.c: reverted previous patch. |
171fc18d | 692 | |
3fe9e1ff JB |
693 | 2009-08-25 Janne Blomqvist <jb@gcc.gnu.org> |
694 | ||
695 | * gfortran.texi: Fix ENCODE example. | |
696 | ||
23878536 JW |
697 | 2009-08-25 Janus Weil <janus@gcc.gnu.org> |
698 | ||
699 | PR fortran/41139 | |
700 | * primary.c (gfc_match_varspec): Make sure EXPR_PPC is only used for | |
701 | calls to procedure pointer components, other references to procedure | |
702 | pointer components are EXPR_VARIABLE. | |
703 | * resolve.c (resolve_actual_arglist): Bugfix (there can be calls without | |
704 | actual arglist). | |
705 | * trans-expr.c (gfc_get_proc_ptr_comp): Renamed to 'get_proc_ptr_comp', | |
706 | removed argument 'se' and made static. Avoid inserting a temporary | |
707 | variable for calling the PPC. | |
708 | (conv_function_val): Renamed gfc_get_proc_ptr_comp. | |
709 | (gfc_conv_procedure_call): Distinguish functions returning a procedure | |
710 | pointer from calls to a procedure pointer. Distinguish calls to | |
711 | procedure pointer components from procedure pointer components as | |
712 | actual arguments. | |
713 | * trans-stmt.h (gfc_get_proc_ptr_comp): Make it static. | |
714 | ||
c50d9687 JD |
715 | 2009-08-24 Jerry DeLisle <jvdelisle@gcc.gnu.org> |
716 | ||
717 | PR fortran/41162 | |
718 | * io.c (check_format): Fix to not error on slash after P. Fix some | |
719 | error loci. | |
720 | ||
72acf720 JD |
721 | 2009-08-24 Jerry DeLisle <jvdelisle@gcc.gnu.org> |
722 | ||
723 | PR fortran/41154 | |
724 | * io.c (check_format): Fix to not error on right paren after P. | |
725 | ||
033e7d21 AH |
726 | 2009-08-24 Aldy Hernandez <aldyh@redhat.com> |
727 | ||
728 | PR fortran/40660 | |
729 | * trans-io.c (build_dt): Pass UNKNOWN_LOCATION to build_call_expr_loc. | |
730 | (transfer_array_desc): Same. | |
731 | ||
e523d8bc JD |
732 | 2009-08-23 Jerry DeLisle <jvdelisle@gcc.gnu.org> |
733 | ||
734 | PR fortran/35754 | |
735 | * io.c (check_format): Add checks for comma and the allowed | |
736 | format specifiers after the 'P' specifier. Fix typo in error message | |
737 | and adjust locus. | |
738 | ||
de1ee8e1 JD |
739 | 2009-08-23 Jerry DeLisle <jvdelisle@gcc.gnu.org> |
740 | ||
741 | PR fortran/37446 | |
742 | * io.c (enum format_token): Change FMT_EXT to FMT_EN and FMT_ES. | |
743 | (format_lex): Likewise. | |
744 | (token_to_string): New function. | |
745 | (check_format): Use the new tokens and the new function. Add | |
746 | check for positive width. | |
747 | ||
3212c187 SK |
748 | 2009-08-22 Steven G. Kargl <kargl@gcc.gnu.org> |
749 | ||
750 | * fortran/decl.c: Disallow procedure pointers with -std=f95. | |
751 | ||
8234e5e0 | 752 | 2009-08-22 Steven K. kargl <kargl@gcc.gnu.org> |
62a88856 | 753 | Paul Thomas <pault@gcc.gnu.org> |
8234e5e0 SK |
754 | |
755 | * fortran/decl.c (match_char_spec): Rename to gfc_match_char_spec, | |
756 | and remove static. | |
757 | * fortran/gfortran.h: Add *expr3 entity to gfc_code. Add prototype | |
758 | for gfc_match_char_spec. | |
759 | * fortran/trans-stmt.c (gfc_trans_allocate): Translate the SOURCE= | |
760 | tag. | |
761 | * fortran/match.c (match_intrinsic_typespec): New function to match | |
762 | F2003 intrinsic-type-spec. | |
763 | (conformable_arrays): New function. Check SOURCE= and | |
764 | allocation-object are conformable. | |
765 | (gfc_match_allocate): Use new functions. Match SOURCE= tag. | |
766 | ||
9cd38d51 | 767 | 2009-08-22 Bud Davis <bdavis9659@sbcglobal.net> |
94d34253 BD |
768 | |
769 | PR fortran/28093 | |
770 | * io.c : added variable to store original len of fmt | |
771 | * io.c (check_format): Consume H items using next_char | |
772 | in both modes to handle consecutive single quotes. | |
773 | Test for extra characters in fmt, issue warning. | |
774 | ||
50dbf0b4 JW |
775 | 2009-08-21 Janus Weil <janus@gcc.gnu.org> |
776 | ||
777 | PR fortran/41106 | |
778 | * primary.c (gfc_variable_attr): Make it work also on EXPR_FUNCTION. | |
779 | (gfc_expr_attr): Use gfc_variable_attr for procedure pointer components. | |
780 | * resolve.c (resolve_fl_derived): Handle CHARACTER-valued procedure | |
781 | pointer components. | |
782 | * trans-expr.c (gfc_conv_component_ref): Ditto. | |
783 | (gfc_conv_variable): Ditto. | |
784 | (gfc_conv_procedure_call): Ditto. | |
785 | (gfc_trans_pointer_assignment): Ditto. | |
786 | * trans-types.c (gfc_get_derived_type): Ditto. | |
787 | ||
3f0a1331 | 788 | 2009-08-20 Tobias Schlüter <tobi@gcc.gnu.org> |
3110415b TS |
789 | |
790 | * trans-stmt.c (gfc_trans_do): Add a few missing folds. | |
791 | ||
167f281e MM |
792 | 2009-08-20 Michael Matz <matz@suse.de> |
793 | ||
794 | PR fortran/41126 | |
795 | * trans-expr.c (gfc_conv_string_tmp): Check type compatibility | |
796 | instead of equality. | |
797 | ||
e4c1aa19 JW |
798 | 2009-08-20 Janus Weil <janus@gcc.gnu.org> |
799 | ||
800 | PR fortran/41121 | |
801 | * resolve.c (resolve_symbol): Don't resolve formal_ns of intrinsic | |
802 | procedures. | |
803 | ||
10174ddf MM |
804 | 2009-08-18 Michael Matz <matz@suse.de> |
805 | ||
806 | * trans-expr.c (gfc_conv_substring): Don't evaluate casted decl early, | |
807 | change order of length calculation to (end - start) + 1. | |
808 | (gfc_get_interface_mapping_array): Adjust call to | |
809 | gfc_get_nodesc_array_type. | |
810 | * trans-array.c (gfc_trans_create_temp_array, | |
811 | gfc_build_constant_array_constructor, gfc_conv_expr_descriptor): Ditto. | |
812 | * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto. | |
813 | * trans.c (gfc_add_modify): Assignment between base type and nontarget | |
814 | type are equal enough. | |
815 | (gfc_call_malloc): Use prvoid_type_node for return value of | |
816 | __builtin_malloc. | |
817 | (gfc_allocate_with_status): Ditto. | |
818 | * trans-types.c (gfc_array_descriptor_base): Double size of this array. | |
819 | (gfc_init_types): Build prvoid_type_node. | |
820 | (gfc_build_array_type): New bool parameter "restricted". | |
821 | (gfc_get_nodesc_array_type): Ditto, build restrict qualified pointers, | |
822 | if it's true. | |
823 | (gfc_get_array_descriptor_base): Ditto. | |
824 | (gfc_get_array_type_bounds): Ditto. | |
825 | (gfc_sym_type): Use symbol attributes to feed calls to above functions. | |
826 | (gfc_get_derived_type): Ditto. | |
827 | * trans.h (struct lang_type): Add nontarget_type member. | |
828 | * trans-types.h (prvoid_type_node): Declare. | |
829 | (gfc_get_array_type_bounds, gfc_get_nodesc_array_type): Declare new | |
830 | parameter. | |
831 | * trans-decl.c (gfc_finish_var_decl): Give scalars that can't be | |
832 | aliased a type with a different alias set than the base type. | |
833 | (gfc_build_dummy_array_decl): Adjust call to gfc_get_nodesc_array_type. | |
834 | ||
37513ce9 JW |
835 | 2009-08-18 Janus Weil <janus@gcc.gnu.org> |
836 | Paul Thomas <pault@gcc.gnu.org> | |
837 | ||
838 | PR fortran/40870 | |
839 | * trans-types.c (gfc_get_ppc_type): Include formal args in backend_decl | |
840 | using the interface symbol. Character types are returned by reference. | |
841 | (gfc_get_derived_type): Prevent infinite recursion loop | |
842 | if a PPC has a derived-type formal arg. | |
843 | ||
1151ccc9 PT |
844 | 2008-08-17 Paul Thomas <pault@gcc.gnu.org> |
845 | ||
846 | PR fortran/41062 | |
847 | * trans-decl.c (gfc_trans_use_stmts): Keep going through use | |
848 | list if symbol is not use associated. | |
849 | ||
b325faf9 DK |
850 | 2009-08-17 Daniel Kraft <d@domob.eu> |
851 | ||
852 | PR fortran/37425 | |
853 | * resolve.c (get_checked_tb_operator_target): New routine to do checks | |
854 | on type-bound operators in common between intrinsic and user operators. | |
855 | (resolve_typebound_intrinsic_op): Call it. | |
856 | (resolve_typebound_user_op): Ditto. | |
857 | ||
b823d9eb JD |
858 | 2009-08-17 Jerry DeLisle <jvdelisle@gcc.gnu.org> |
859 | ||
860 | PR fortran/41075 | |
861 | * scanner.c (gfc_next_char_literal): Add comment to improve | |
862 | readability. | |
863 | * io.c (enum format_token): Add FMT_STAR. (format_lex): Add case | |
864 | for '*'. (check_format): Check for left paren after '*'. Change | |
865 | format checks to use %L to improve format string error locus. | |
866 | ||
b76e28c6 JW |
867 | 2009-08-17 Janus Weil <janus@gcc.gnu.org> |
868 | ||
869 | PR fortran/40877 | |
870 | * array.c (gfc_resolve_character_array_constructor): Add NULL argument | |
871 | to gfc_new_charlen. | |
872 | * decl.c (add_init_expr_to_sym,variable_decl,match_char_spec, | |
873 | gfc_match_implicit): Ditto. | |
874 | * expr.c (simplify_const_ref): Fix memory leak. | |
875 | (gfc_simplify_expr): Add NULL argument to gfc_new_charlen. | |
876 | * gfortran.h (gfc_new_charlen): Modified prototype. | |
877 | * iresolve.c (check_charlen_present,gfc_resolve_char_achar): Add NULL | |
878 | argument to gfc_new_charlen. | |
879 | * module.c (mio_charlen): Ditto. | |
880 | * resolve.c (gfc_resolve_substring_charlen, | |
881 | gfc_resolve_character_operator,fixup_charlen): Ditto. | |
882 | (resolve_fl_derived,resolve_symbol): Add argument to gfc_charlen. | |
883 | * symbol.c (gfc_new_charlen): Add argument 'old_cl' (to make a copy of | |
884 | an existing charlen). | |
885 | (gfc_set_default_type,generate_isocbinding_symbol): Fix memory leak. | |
886 | (gfc_copy_formal_args_intr): Add NULL argument to gfc_new_charlen. | |
887 | * trans-decl.c (create_function_arglist): Fix memory leak. | |
888 | ||
fbe7af45 RG |
889 | 2009-08-17 Richard Guenther <rguenther@suse.de> |
890 | ||
891 | * trans-expr.c (gfc_trans_scalar_assign): Replace hack with | |
892 | more proper hack. | |
893 | ||
3a1e8ed5 TB |
894 | 2009-08-15 Tobias Burnus <burnus@net-b.de> |
895 | ||
896 | PR fortran/41080 | |
897 | * gfortranspec.c (lookup_option): Remove gfortran-specific | |
898 | version of -dumpversion. | |
899 | ||
a2a0778d JW |
900 | 2009-08-14 Janus Weil <janus@gcc.gnu.org> |
901 | ||
902 | PR fortran/41070 | |
903 | * resolve.c (resolve_structure_cons): Make sure that ts.u.derived is | |
904 | only used if type is BT_DERIVED. | |
905 | ||
bc21d315 JW |
906 | 2009-08-13 Janus Weil <janus@gcc.gnu.org> |
907 | ||
908 | PR fortran/40941 | |
909 | * gfortran.h (gfc_typespec): Put 'derived' and 'cl' into union. | |
910 | * decl.c (build_struct): Make sure 'cl' is only used | |
911 | if type is BT_CHARACTER. | |
912 | * symbol.c (gfc_set_default_type): Ditto. | |
913 | * resolve.c (resolve_symbol, resolve_fl_derived): Ditto. | |
914 | (resolve_equivalence,resolve_equivalence_derived): Make sure 'derived' | |
915 | is only used if type is BT_DERIVED. | |
916 | * trans-io.c (transfer_expr): Make sure 'derived' is only used if type | |
917 | is BT_DERIVED or BT_INTEGER (special case: C_PTR/C_FUNPTR). | |
918 | * array.c: Mechanical replacements to accomodate union in gfc_typespec. | |
919 | * check.c: Ditto. | |
920 | * data.c: Ditto. | |
921 | * decl.c: Ditto. | |
922 | * dump-parse-tree.c: Ditto. | |
923 | * expr.c: Ditto. | |
924 | * interface.c: Ditto. | |
925 | * iresolve.c: Ditto. | |
926 | * match.c: Ditto. | |
927 | * misc.c: Ditto. | |
928 | * module.c: Ditto. | |
929 | * openmp.c: Ditto. | |
930 | * parse.c: Ditto. | |
931 | * primary.c: Ditto. | |
932 | * resolve.c: Ditto. | |
933 | * simplify.c: Ditto. | |
934 | * symbol.c: Ditto. | |
935 | * target-memory.c: Ditto. | |
936 | * trans-array.c: Ditto. | |
937 | * trans-common.c: Ditto. | |
938 | * trans-const.c: Ditto. | |
939 | * trans-decl.c: Ditto. | |
940 | * trans-expr.c: Ditto. | |
941 | * trans-intrinsic.c: Ditto. | |
942 | * trans-io.c: Ditto. | |
943 | * trans-stmt.c: Ditto. | |
944 | * trans-types.c: Ditto. | |
945 | ||
f6038131 JW |
946 | 2009-08-13 Janus Weil <janus@gcc.gnu.org> |
947 | ||
948 | PR fortran/40995 | |
949 | * resolve.c (resolve_symbol): Move some checking code to | |
950 | resolve_intrinsic, and call this from here. | |
951 | (resolve_intrinsic): Some checking code moved here from resolve_symbol. | |
952 | Make sure each intrinsic is only resolved once. | |
953 | ||
c0e18b82 TB |
954 | 2009-08-12 Tobias Burnus <burnus@net-b.de> |
955 | ||
956 | PR fortran/41034 | |
957 | * symbol.c (gfc_copy_attr): Merge bits instead of replace | |
958 | bits in gfc_copy_attr. | |
959 | * gfc_check_pointer_assign (gfc_check_pointer_assign): | |
960 | Initialize ext_attr bits by zero. | |
961 | ||
64754ed5 RG |
962 | 2009-08-11 Richard Guenther <rguenther@suse.de> |
963 | ||
964 | * trans-types.c (gfc_get_derived_type): Do not clear TYPE_CANONICAL. | |
965 | ||
4561cbd0 JW |
966 | 2009-08-11 Janus Weil <janus@gcc.gnu.org> |
967 | ||
968 | PR fortran/41022 | |
969 | * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointer | |
970 | components as actual arguments. | |
971 | ||
94747289 DK |
972 | 2009-08-10 Daniel Kraft <d@domob.eu> |
973 | ||
974 | PR fortran/37425 | |
975 | * gfortran.h (struct gfc_namespace): New fields tb_uop_root and tb_op. | |
976 | (gfc_find_typebound_user_op): New routine. | |
977 | (gfc_find_typebound_intrinsic_op): Ditto. | |
978 | (gfc_check_operator_interface): Now public routine. | |
979 | * decl.c (gfc_match_generic): Match OPERATOR(X) or ASSIGNMENT(=). | |
980 | * interface.c (check_operator_interface): Made public, renamed to | |
981 | `gfc_check_operator_interface' accordingly and hand in the interface | |
982 | as gfc_symbol rather than gfc_interface so it is useful for type-bound | |
983 | operators, too. Return boolean result. | |
984 | (gfc_check_interfaces): Adapt call to `check_operator_interface'. | |
985 | * symbol.c (gfc_get_namespace): Initialize new field `tb_op'. | |
986 | (gfc_free_namespace): Free `tb_uop_root'-based tree. | |
987 | (find_typebound_proc_uop): New helper function. | |
988 | (gfc_find_typebound_proc): Use it. | |
989 | (gfc_find_typebound_user_op): New method. | |
990 | (gfc_find_typebound_intrinsic_op): Ditto. | |
991 | * resolve.c (resolve_tb_generic_targets): New helper function. | |
992 | (resolve_typebound_generic): Use it. | |
993 | (resolve_typebound_intrinsic_op), (resolve_typebound_user_op): New. | |
994 | (resolve_typebound_procedures): Resolve operators, too. | |
995 | (check_uop_procedure): New, code from gfc_resolve_uops. | |
996 | (gfc_resolve_uops): Moved main code to new `check_uop_procedure'. | |
997 | ||
727e8544 JW |
998 | 2009-08-10 Janus Weil <janus@gcc.gnu.org> |
999 | ||
1000 | PR fortran/40940 | |
1001 | * decl.c (gfc_match_type_spec): Match CLASS statement and warn about | |
1002 | missing polymorphism. | |
1003 | * gfortran.h (gfc_typespec): Add field 'is_class'. | |
1004 | * misc.c (gfc_clear_ts): Initialize 'is_class' to zero. | |
1005 | * resolve.c (type_is_extensible): New function to check if a derived | |
1006 | type is extensible. | |
1007 | (resolve_fl_variable_derived): Add error checks for CLASS variables. | |
1008 | (resolve_typebound_procedure): Disallow non-polymorphic passed-object | |
1009 | dummy arguments, turning warning into error. | |
1010 | (resolve_fl_derived): Use 'type_is_extensible'. Disallow non-polymorphic | |
1011 | passed-object dummy arguments for procedure pointer components, | |
1012 | turning warning into error. Add error check for CLASS components. | |
1013 | ||
2b374f55 TB |
1014 | 2009-08-05 Tobias Burnus <burnus@net-b.de> |
1015 | ||
1016 | PR fortran/40955 | |
1017 | * gfortran.h (ext_attr_id_t): Add typedef for this enum. | |
1018 | (gfc_add_ext_attribute): Use it. | |
1019 | * decl.c (gfc_match_gcc_attributes): Ditto. | |
1020 | * expr.c (gfc_check_pointer_assign): Ditto. | |
1021 | * symbol.c (gfc_add_ext_attribute): Ditto. | |
1022 | (gfc_copy_attr): Copy also ext_attr. | |
1023 | * resolve.c (resolve_fl_derived,resolve_symbol): Ditto. | |
1024 | * module.c (mio_symbol_attribute): Save ext_attr in the mod file. | |
1025 | ||
a7b75755 TB |
1026 | 2009-08-05 Tobias Burnus <burnus@net-b.de> |
1027 | ||
1028 | PR fortran/40969 | |
1029 | Revert: | |
1030 | 2009-08-04 Tobias Burnus <burnus@net-b.de> | |
1031 | ||
1032 | PR fortran/40949 | |
1033 | * trans-types.c (gfc_get_function_type): Fix typelist of | |
1034 | functions without argument. | |
1035 | ||
fd1e840d PT |
1036 | 2009-08-05 Paul Thomas <pault@gcc.gnu.org> |
1037 | ||
1038 | PR fortran/40847 | |
1039 | * iresolve.c (gfc_resolve_transfer): Correct error in 'mold' | |
1040 | character length for case where length expresson is NULL. | |
1041 | ||
4eb0668e TB |
1042 | 2009-08-04 Tobias Burnus <burnus@net-b.de> |
1043 | ||
1044 | PR fortran/40949 | |
1045 | * trans-types.c (gfc_get_function_type): Fix typelist of | |
1046 | functions without argument. | |
1047 | ||
51b128a0 PT |
1048 | 2009-08-04 Paul Thomas <pault@gcc.gnu.org> |
1049 | ||
1050 | PR fortran/40875 | |
1051 | * decl.c (add_init_expr_to_sym): Character symbols can only be | |
1052 | initialized with character expressions. | |
1053 | ||
e2ab8b09 JW |
1054 | 2009-08-02 Janus Weil <janus@gcc.gnu.org> |
1055 | ||
1056 | PR fortran/40881 | |
1057 | * decl.c (match_char_length): Warn about old-style character length | |
1058 | declarations. | |
1059 | * match.c (match_arithmetic_if,gfc_match_if): Modify warning message | |
1060 | for arithmetic if. | |
1061 | (gfc_match_goto): Warn about computed gotos. | |
1062 | (gfc_match_return): Warn about alternate return. | |
1063 | (gfc_match_st_function): Warn about statement functions. | |
1064 | * resolve.c (resolve_fl_procedure): Modify warning message for | |
1065 | assumed-length character functions. | |
1066 | ||
3af8d8cb PT |
1067 | 2009-08-01 Paul Thomas <pault@gcc.gnu.org> |
1068 | ||
1069 | PR fortran/40011 | |
1070 | * error.c : Add static flag 'warnings_not_errors'. | |
1071 | (gfc_error): If 'warnings_not_errors' is set, branch to code | |
1072 | from gfc_warning. | |
1073 | (gfc_clear_error): Reset 'warnings_not_errors'. | |
1074 | (gfc_errors_to_warnings): New function. | |
1075 | * options.c (gfc_post_options): If pedantic and flag_whole_file | |
1076 | change the latter to a value of 2. | |
1077 | * parse.c (parse_module): Add module namespace to gsymbol. | |
1078 | (resolve_all_program_units): New function. | |
1079 | (clean_up_modules): New function. | |
1080 | (translate_all_program_units): New function. | |
1081 | (gfc_parse_file): If whole_file, do not clean up module right | |
1082 | away and add derived types to namespace derived types. In | |
1083 | addition, call the three new functions above. | |
1084 | * resolve.c (not_in_recursive): New function. | |
1085 | (not_entry_self_reference): New function. | |
1086 | (resolve_global_procedure): Symbol must not be IFSRC_UNKNOWN, | |
1087 | procedure must not be in the course of being resolved and | |
1088 | must return false for the two new functions. Pack away the | |
1089 | current derived type list before calling gfc_resolve for the | |
1090 | gsymbol namespace. It is unconditionally an error if the ranks | |
1091 | of the reference and ther procedure do not match. Convert | |
1092 | errors to warnings during call to gfc_procedure_use if not | |
1093 | pedantic or legacy. | |
1094 | (gfc_resolve): Set namespace resolved flag to -1 during | |
1095 | resolution and store current cs_base. | |
1096 | * trans-decl.c (gfc_get_symbol_decl): If whole_file compilation | |
1097 | substitute a use associated variable, if it is available in a | |
1098 | gsymbolnamespace. | |
1099 | (gfc_get_extern_function_decl): If the procedure is use assoc, | |
1100 | do not attempt to find it in a gsymbol because it could be an | |
1101 | interface. If the symbol exists in a module namespace, return | |
1102 | its backend_decl. | |
1103 | * trans-expr.c (gfc_trans_scalar_assign): If a derived type | |
1104 | assignment, set the rhs TYPE_MAIN_VARIANT to that of the rhs. | |
1105 | * trans-types.c (copy_dt_decls_ifequal): Add 'from_gsym' as a | |
1106 | boolean argument. Copy component backend_decls directly if the | |
1107 | components are derived types and from_gsym is true. | |
1108 | (gfc_get_derived_type): If whole_file copy the derived type from | |
1109 | the module if it is use associated, otherwise, if can be found | |
1110 | in another gsymbol namespace, use the existing derived type as | |
1111 | the TYPE_CANONICAL and build normally. | |
1112 | * gfortran.h : Add derived_types and resolved fields to | |
1113 | gfc_namespace. Include prototype for gfc_errors_to_warnings. | |
1114 | ||
33215bb3 TB |
1115 | 2009-07-29 Tobias Burnus <burnus@net-b.de> |
1116 | ||
1117 | PR fortran/40898 | |
1118 | * trans-types.c (gfc_get_function_type): Do not add hidden | |
1119 | string-length argument for BIND(C) procedures. | |
1120 | * trans-decl.c (create_function_arglist): Skip over nonexisting | |
1121 | string-length arguments for BIND(C) procedures. | |
1122 | ||
394a5b34 JJ |
1123 | 2009-07-28 Jakub Jelinek <jakub@redhat.com> |
1124 | ||
1125 | PR fortran/40878 | |
1126 | * openmp.c (gfc_match_omp_clauses): Use gfc_error_now instead of | |
1127 | gfc_error to diagnose invalid COLLAPSE arguments. | |
1128 | ||
c4984ab2 JW |
1129 | 2009-07-28 Janus Weil <janus@gcc.gnu.org> |
1130 | ||
1131 | PR fortran/40882 | |
1132 | * trans-types.c (gfc_get_ppc_type): For derived types, directly use the | |
1133 | backend_decl, instead of calling gfc_typenode_for_spec, to avoid | |
1134 | infinte loop. | |
1135 | (gfc_get_derived_type): Correctly handle PPCs returning derived types, | |
1136 | avoiding infinite recursion. | |
1137 | ||
e26f5548 JW |
1138 | 2009-07-27 Janus Weil <janus@gcc.gnu.org> |
1139 | ||
1140 | PR fortran/40848 | |
1141 | * interface.c (gfc_compare_interfaces): Call 'count_types_test' before | |
1142 | 'generic_correspondence', and only if checking a generic interface. | |
1143 | ||
758e12af TB |
1144 | 2009-07-27 Tobias Burnus <burnus@net-b.de> |
1145 | ||
1146 | PR fortran/40851 | |
1147 | * resolve.c (resolve_symbol): Do not initialize pointer derived-types. | |
1148 | * trans-decl.c (init_intent_out_dt): Ditto. | |
1149 | (generate_local_decl): No need to set attr.referenced for DT pointers. | |
1150 | ||
ddf67998 TB |
1151 | 2009-07-26 Tobias Burnus <burnus@net-b.de> |
1152 | ||
1153 | PR fortran/33197 | |
1154 | * intrinsic.c (make_generic): Remove assert as "atan" can be | |
1155 | both ISYM_ATAN and ISYM_ATAN2. | |
1156 | (add_functions): Add two-argument variant of ATAN. | |
1157 | * intrinsic.h (gfc_check_atan_2): Add check for it. | |
1158 | * intrinsic.texi (ATAN2): Correct and enhance description. | |
1159 | (ATAN): Describe two-argument variant of ATAN. | |
1160 | ||
504ed63a TB |
1161 | 2009-07-25 Tobias Burnus <burnus@net-b.de> |
1162 | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | |
1163 | ||
1164 | PR fortran/33197 | |
1165 | * intrinsic.c (add_functions): Support complex arguments for | |
1166 | acos,acosh,asin,asinh,atan,atanh. | |
1167 | * invoke.texi (ACOS,ACOSH,ASIN,ASINH,ATAN,ATANH): Support | |
1168 | complex arguments. | |
1169 | * simplify.c (gfc_simplify_acos,gfc_simplify_acosh, | |
1170 | gfc_simplify_asin,gfc_simplify_asinh,gfc_simplify_atan, | |
1171 | gfc_simplify_atanh,gfc_simplify_atan,gfc_simplify_asinh, | |
1172 | gfc_simplify_acosh,gfc_simplify_atanh): Support | |
1173 | complex arguments. | |
1174 | ||
9618fb3c RG |
1175 | 2009-07-25 Richard Guenther <rguenther@suse.de> |
1176 | ||
1177 | PR fortran/40005 | |
1178 | * trans-types.c (gfc_get_array_type_bounds): Use | |
1179 | build_distinct_type_copy with a proper TYPE_CANONICAL and | |
1180 | re-use the type-decl of the original type. | |
1181 | * trans-decl.c (build_entry_thunks): Signal cgraph we may not | |
1182 | garbage collect. | |
1183 | (create_main_function): Likewise. | |
1184 | (gfc_generate_function_code): Likewise. | |
1185 | * trans-expr.c (gfc_trans_subcomponent_assign): Do not use | |
1186 | fold_convert on record types. | |
1187 | ||
90661f26 JW |
1188 | 2009-07-25 Janus Weil <janus@gcc.gnu.org> |
1189 | ||
1190 | PR fortran/39630 | |
1191 | * decl.c (match_ppc_decl): Implement the PASS attribute for procedure | |
1192 | pointer components. | |
1193 | (match_binding_attributes): Ditto. | |
1194 | * gfortran.h (gfc_component): Add member 'tb'. | |
1195 | (gfc_typebound_proc): Add member 'ppc' and make 'pass_arg' const. | |
1196 | * module.c (MOD_VERSION): Bump module version. | |
1197 | (binding_ppc): New string constants. | |
1198 | (mio_component): Only use formal args if component is a procedure | |
1199 | pointer and add 'tb' member. | |
1200 | (mio_typebound_proc): Include pass_arg and take care of procedure | |
1201 | pointer components. | |
1202 | * resolve.c (update_arglist_pass): Add argument 'name' and take care of | |
1203 | optional arguments. | |
1204 | (extract_ppc_passed_object): New function, analogous to | |
1205 | extract_compcall_passed_object, but for procedure pointer components. | |
1206 | (update_ppc_arglist): New function, analogous to | |
1207 | update_compcall_arglist, but for procedure pointer components. | |
1208 | (resolve_typebound_generic_call): Added argument to update_arglist_pass. | |
1209 | (resolve_ppc_call, resolve_expr_ppc): Take care of PASS attribute. | |
1210 | (resolve_fl_derived): Check the PASS argument for procedure pointer | |
1211 | components. | |
1212 | * symbol.c (verify_bind_c_derived_type): Reject procedure pointer | |
1213 | components in BIND(C) types. | |
1214 | ||
bfce226c JW |
1215 | 2009-07-24 Janus Weil <janus@gcc.gnu.org> |
1216 | ||
1217 | PR fortran/40822 | |
1218 | * array.c (gfc_resolve_character_array_constructor): Use new function | |
1219 | gfc_new_charlen. | |
1220 | * decl.c (add_init_expr_to_sym,variable_decl,match_char_spec, | |
1221 | gfc_match_implicit): Ditto. | |
1222 | * expr.c (gfc_simplify_expr): Ditto. | |
1223 | * gfortran.h (gfc_new_charlen): New prototype. | |
1224 | * iresolve.c (check_charlen_present,gfc_resolve_char_achar): Use new | |
1225 | function gfc_new_charlen. | |
1226 | * module.c (mio_charlen): Ditto. | |
1227 | * resolve.c (gfc_resolve_substring_charlen, | |
1228 | gfc_resolve_character_operator,fixup_charlen,resolve_fl_derived, | |
1229 | resolve_symbol): Ditto. | |
1230 | * symbol.c (gfc_new_charlen): New function to create a new gfc_charlen | |
1231 | structure and add it to a namespace. | |
1232 | (gfc_copy_formal_args_intr): Make sure ts.cl is present | |
1233 | for CHARACTER variables. | |
1234 | ||
80927a56 JJ |
1235 | 2009-07-24 Jakub Jelinek <jakub@redhat.com> |
1236 | ||
1237 | PR fortran/40643 | |
1238 | PR fortran/31067 | |
1239 | * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc, | |
1240 | gfc_conv_intrinsic_minmaxval): Handle Infinities and NaNs properly, | |
1241 | optimize. | |
1242 | * trans-array.c (gfc_trans_scalarized_loop_end): No longer static. | |
1243 | * trans-array.h (gfc_trans_scalarized_loop_end): New prototype. | |
1244 | ||
88e18fed JJ |
1245 | 2009-07-23 Jakub Jelinek <jakub@redhat.com> |
1246 | ||
1247 | PR fortran/40839 | |
1248 | * io.c (gfc_resolve_dt): Add LOC argument. Fail if | |
1249 | dt->io_unit is NULL. Return FAILURE after issuing error about | |
1250 | negative UNIT number. | |
1251 | (match_io_element): Don't segfault if current_dt->io_unit is NULL. | |
1252 | * gfortran.h (gfc_resolve_dt): Adjust prototype. | |
1253 | * resolve.c (resolve_code): Adjust caller. | |
1254 | ||
5af2eace PT |
1255 | 2009-07-22 Paul Thomas <pault@gcc.gnu.org> |
1256 | ||
1257 | PR fortran/40796 | |
1258 | * trans-decl.c (generate_local_decl): Unreferenced result | |
1259 | variables with allocatable components should be treated like | |
1260 | INTENT_OUT dummy variables. | |
1261 | ||
43ce5e52 FXC |
1262 | 2009-07-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> |
1263 | ||
1264 | * trans.h (gfc_set_decl_assembler_name): New prototype. | |
1265 | * trans-decl.c (gfc_set_decl_assembler_name): New function. | |
1266 | (gfc_get_symbol_decl, gfc_get_extern_function_decl, | |
1267 | build_function_decl): Use gfc_set_decl_assembler_name instead of | |
1268 | SET_DECL_ASSEMBLER_NAME. | |
1269 | * trans-common.c (build_common_decl): Use | |
1270 | gfc_set_decl_assembler_name instead of SET_DECL_ASSEMBLER_NAME. | |
1271 | ||
5af2eace | 1272 | 2009-07-21 Richard Guenther <rguenther@suse.de> |
309e9930 PT |
1273 | |
1274 | PR fortran/40726 | |
1275 | * trans-decl.c (gfc_get_extern_function_decl): Do not set | |
1276 | DECL_IS_MALLOC for pointer valued functions. | |
1277 | (build_function_decl): The same. | |
1278 | ||
20562de4 SK |
1279 | 2009-07-19 Steven G. Kargl <kargl@gcc.gnu.org> |
1280 | ||
1281 | PR fortran/40727 | |
1282 | * fortran/check.c (gfc_check_cmplx, gfc_check_dcmplx): Add check that | |
1283 | the optional second argument isn't of COMPLEX type. | |
1284 | ||
a406865a RG |
1285 | 2009-07-17 Richard Guenther <rguenther@suse.de> |
1286 | ||
1287 | PR c/40401 | |
1288 | * f95-lang.c (gfc_be_parse_file): Do not finalize the CU here. | |
1289 | * trans-decl.c (gfc_gimplify_function): Remove. | |
1290 | (build_entry_thunks): Do not gimplify here. | |
1291 | (create_main_function): Likewise. | |
1292 | (gfc_generate_function_code): Likewise. | |
1293 | ||
db3927fb AH |
1294 | 2009-07-17 Aldy Hernandez <aldyh@redhat.com> |
1295 | Manuel López-Ibáñez <manu@gcc.gnu.org> | |
1296 | ||
1297 | PR 40435 | |
1298 | * trans-expr.c, trans-array.c, trans-openmp.c, trans-stmt.c, | |
1299 | trans.c, trans-io.c, trans-decl.c, trans-intrinsic.c: Add location | |
1300 | argument to fold_{unary,binary,ternary}, fold_build[123], | |
1301 | build_call_expr, build_size_arg, build_fold_addr_expr, | |
1302 | build_call_array, non_lvalue, size_diffop, | |
1303 | fold_build1_initializer, fold_build2_initializer, | |
1304 | fold_build3_initializer, fold_build_call_array, | |
1305 | fold_build_call_array_initializer, fold_single_bit_test, | |
1306 | omit_one_operand, omit_two_operands, invert_truthvalue, | |
1307 | fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref, | |
1308 | combine_comparisons, fold_builtin_*, fold_call_expr, | |
1309 | build_range_check, maybe_fold_offset_to_address, round_up, | |
1310 | round_down. | |
1311 | ||
f6ddbf11 JW |
1312 | 2009-07-15 Janus Weil <janus@gcc.gnu.org> |
1313 | ||
1314 | PR fortran/40743 | |
1315 | * resolve.c (resolve_symbol): Don't resolve the formal namespace of a | |
1316 | contained procedure. | |
1317 | ||
2a4c0366 TG |
1318 | 2009-07-14 Taras Glek <tglek@mozilla.com> |
1319 | Rafael Espindola <espindola@google.com> | |
1320 | ||
1321 | * Make-lang.in (fortran.install-plugin): New target for | |
1322 | installing plugin headers. | |
1323 | ||
2b78f78f L |
1324 | 2009-07-13 H.J. Lu <hongjiu.lu@intel.com> |
1325 | ||
1326 | * module.c (mio_symbol): Remove the unused variable, formal. | |
1327 | ||
acbdc378 JW |
1328 | 2009-07-13 Janus Weil <janus@gcc.gnu.org> |
1329 | ||
1330 | PR fortran/40646 | |
1331 | * module.c (mio_symbol): If the symbol has formal arguments, | |
1332 | the formal namespace will be present. | |
1333 | * resolve.c (resolve_actual_arglist): Correctly handle 'called' | |
1334 | procedure pointer components as actual arguments. | |
1335 | (resolve_fl_derived,resolve_symbol): Make sure the formal namespace | |
1336 | is present. | |
1337 | * trans-expr.c (gfc_conv_procedure_call): Correctly handle the formal | |
1338 | arguments of procedure pointer components. | |
1339 | ||
ffa61a5e TB |
1340 | 2009-07-12 Tobias Burnus <burnus@net-b.de> |
1341 | Philippe Marguinaud <philippe.marguinaud@meteo.fr> | |
1342 | ||
1343 | PR fortran/40588 | |
1344 | * primary.c (match_charkind_name): Fix condition for $ matching. | |
1345 | ||
1346 | PR libfortran/22423 | |
1347 | * libgfortran.h: Typedef the GFC_DTYPE_* enum. | |
1348 | ||
8d3681f9 TB |
1349 | 2009-07-11 Tobias Burnus <burnus@net-b.de> |
1350 | ||
1351 | PR fortran/33197 | |
1352 | * check.c (gfc_check_fn_rc2008): New function. | |
1353 | * intrinsic.h (gfc_check_fn_rc2008): New prototype. | |
1354 | * intrinsic.c (add_functions): Add complex tan, cosh, sinh, | |
1355 | and tanh. | |
1356 | ||
1d8e1d5d PT |
1357 | 2009-07-10 Paul Thomas <pault@gcc.gnu.org> |
1358 | ||
1359 | PR fortran/39334 | |
1360 | * primary.c (match_kind_param): Return MATCH_NO if the symbol | |
1361 | has no value. | |
1362 | ||
1aafbf99 PT |
1363 | 2008-07-09 Paul Thomas <pault@gcc.gnu.org> |
1364 | ||
1365 | PR fortran/40629 | |
1366 | * resolve.c (check_host_association): Use the existing | |
1367 | accessible symtree and treat function expressions with | |
1368 | symbols that have procedure flavor. | |
1369 | ||
f64edc8b JW |
1370 | 2009-07-09 Janus Weil <janus@gcc.gnu.org> |
1371 | ||
1372 | PR fortran/40646 | |
1373 | * dump-parse-tree.c (show_expr): Renamed 'is_proc_ptr_comp'. | |
1374 | * expr.c (is_proc_ptr_comp): Renamed to 'gfc_is_proc_ptr_comp'. | |
1375 | (gfc_check_pointer_assign): Renamed 'is_proc_ptr_comp'. | |
1376 | (replace_comp,gfc_expr_replace_comp): New functions, analogous | |
1377 | to 'replace_symbol' and 'gfc_expr_replace_symbol', just with components | |
1378 | instead of symbols. | |
1379 | * gfortran.h (gfc_expr_replace_comp): New prototype. | |
1380 | (is_proc_ptr_comp): Renamed to 'gfc_is_proc_ptr_comp'. | |
1381 | * interface.c (compare_actual_formal): Renamed 'is_proc_ptr_comp'. | |
1382 | * match.c (gfc_match_pointer_assignment): Ditto. | |
1383 | * primary.c (gfc_match_varspec): Handle array-valued procedure pointers | |
1384 | and procedure pointer components. Renamed 'is_proc_ptr_comp'. | |
1385 | * resolve.c (resolve_fl_derived): Correctly handle interfaces with | |
1386 | RESULT statement, and handle array-valued procedure pointer components. | |
1387 | (resolve_actual_arglist,resolve_ppc_call,resolve_expr_ppc): Renamed | |
1388 | 'is_proc_ptr_comp'. | |
1389 | * trans-array.c (gfc_walk_function_expr): Ditto. | |
1390 | * trans-decl.c (gfc_get_symbol_decl): Security check for presence of | |
1391 | ns->proc_name. | |
1392 | * trans-expr.c (gfc_conv_procedure_call): Handle array-valued procedure | |
1393 | pointer components. Renamed 'is_proc_ptr_comp'. | |
1394 | (conv_function_val,gfc_trans_arrayfunc_assign): Renamed | |
1395 | 'is_proc_ptr_comp'. | |
1396 | (gfc_get_proc_ptr_comp): Do not modify the argument 'e', but instead | |
1397 | make a copy of it. | |
1398 | * trans-io.c (gfc_trans_transfer): Handle array-valued procedure | |
1399 | pointer components. | |
1400 | ||
4b41f35e TB |
1401 | 2009-07-09 Tobias Burnus <burnus@net-b.de> |
1402 | ||
1403 | PR fortran/40604 | |
1404 | * intrinsic.c (gfc_convert_type_warn): Set sym->result. | |
1405 | * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer | |
1406 | for optional arguments. | |
1407 | ||
60d340ef TB |
1408 | 2009-07-08 Tobias Burnus <burnus@net-b.de> |
1409 | ||
1410 | PR fortran/40675 | |
1411 | * simplify.c (gfc_simplify_sign): Handle signed zero correctly. | |
1412 | * trans-intrinsic.c (gfc_conv_intrinsic_sign): Support | |
1413 | -fno-sign-zero. | |
1414 | * invoke.texi (-fno-sign-zero): Add text regarding SIGN intrinsic. | |
1415 | ||
3276e0b3 PT |
1416 | 2008-07-08 Paul Thomas <pault@gcc.gnu.org> |
1417 | ||
1418 | PR fortran/40591 | |
1419 | * decl.c (match_procedure_interface): Correct the association | |
1420 | or creation of the interface procedure's symbol. | |
1421 | ||
258bd5dc JJ |
1422 | 2009-07-04 Jakub Jelinek <jakub@redhat.com> |
1423 | ||
1424 | * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): For integer | |
1425 | maxloc initialize limit to -huge-1 rather than just -huge. | |
1426 | ||
a7c0b11d JW |
1427 | 2009-07-04 Janus Weil <janus@gcc.gnu.org> |
1428 | ||
1429 | PR fortran/40593 | |
1430 | * interface.c (compare_actual_formal): Take care of proc-pointer-valued | |
1431 | functions as actual arguments. | |
1432 | * trans-expr.c (gfc_conv_procedure_call): Ditto. | |
1433 | * resolve.c (resolve_specific_f0): Use the correct ts. | |
1434 | ||
a3788c44 MM |
1435 | 2009-07-02 Michael Matz <matz@suse.de> |
1436 | ||
1437 | PR fortran/32131 | |
1438 | * trans-array.c (gfc_conv_descriptor_stride_get): Return | |
1439 | constant one for strides in the first dimension of ALLOCATABLE | |
1440 | arrays. | |
1441 | ||
3e6d828d JW |
1442 | 2009-06-30 Janus Weil <janus@gcc.gnu.org> |
1443 | ||
1444 | PR fortran/40594 | |
1445 | * trans-types.c (gfc_get_derived_type): Bugfix, reverting one hunk from | |
1446 | r147206. | |
1447 | ||
20460eb9 TB |
1448 | 2009-06-29 Tobias Burnus <burnus@net-b.de> |
1449 | ||
1450 | PR fortran/40580 | |
1451 | * trans-expr.c (gfc_conv_procedure_call): Add -fcheck=pointer check. | |
1452 | * libgfortran.h: Add GFC_RTCHECK_POINTER. | |
1453 | * invoke.texi (-fcheck): Document new pointer option. | |
1454 | * options.c (gfc_handle_runtime_check_option): Handle pointer option. | |
1455 | ||
1456 | * gfortran.texi (C Binding): Improve wording. | |
1457 | * iso-c-binding.def: Remove obsolete comment. | |
1458 | ||
a61a36ab PT |
1459 | 2009-06-29 Paul Thomas <pault@gcc.gnu.org> |
1460 | ||
1461 | PR fortran/40551 | |
1462 | * dependency.h : Add second bool* argument to prototype of | |
1463 | gfc_full_array_ref_p. | |
1464 | * dependency.c (gfc_full_array_ref_p): If second argument is | |
1465 | present, return true if last dimension of reference is an | |
1466 | element or has unity stride. | |
1467 | * trans-array.c : Add NULL second argument to references to | |
1468 | gfc_full_array_ref_p. | |
1469 | * trans-expr.c : The same, except for; | |
1470 | (gfc_trans_arrayfunc_assign): Return fail if lhs reference | |
1471 | is not a full array or a contiguous section. | |
1472 | ||
08a6b8e0 TB |
1473 | 2009-06-28 Tobias Burnus <burnus@net-b.de> |
1474 | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | |
1475 | ||
1476 | PR fortran/34112 | |
1477 | * symbol.c (gfc_add_ext_attribute): New function. | |
1478 | (gfc_get_sym_tree): New argument allow_subroutine. | |
1479 | (gfc_get_symbol,gfc_get_ha_sym_tree,gen_cptr_param,gen_fptr_param | |
1480 | gen_shape_param,generate_isocbinding_symbol): Use it. | |
1481 | * decl.c (find_special): New argument allow_subroutine. | |
1482 | (add_init_expr_to_sym,add_hidden_procptr_result,attr_decl1, | |
1483 | match_procedure_in_type,gfc_match_final_decl): Use it. | |
1484 | (gfc_match_gcc_attributes): New function. | |
1485 | * gfortran.texi (Mixed-Language Programming): New section | |
1486 | "GNU Fortran Compiler Directives". | |
1487 | * gfortran.h (ext_attr_t): New struct. | |
1488 | (symbol_attributes): Use it. | |
1489 | (gfc_add_ext_attribute): New prototype. | |
1490 | (gfc_get_sym_tree): Update pototype. | |
1491 | * expr.c (gfc_check_pointer_assign): Check whether call | |
1492 | convention is the same. | |
1493 | * module.c (import_iso_c_binding_module, create_int_parameter, | |
1494 | use_iso_fortran_env_module): Update gfc_get_sym_tree call. | |
1495 | * scanner.c (skip_gcc_attribute): New function. | |
1496 | (skip_free_comments,skip_fixed_comments): Use it. | |
1497 | (gfc_next_char_literal): Support !GCC$ lines. | |
1498 | * resolve.c (check_host_association): Update | |
1499 | gfc_get_sym_tree call. | |
1500 | * match.c (gfc_match_sym_tree,gfc_match_call): Update | |
1501 | gfc_get_sym_tree call. | |
1502 | * trans-decl.c (add_attributes_to_decl): New function. | |
1503 | (gfc_get_symbol_decl,get_proc_pointer_decl, | |
1504 | gfc_get_extern_function_decl,build_function_decl: Use it. | |
1505 | * match.h (gfc_match_gcc_attributes): Add prototype. | |
1506 | * parse.c (decode_gcc_attribute): New function. | |
1507 | (next_free,next_fixed): Support !GCC$ lines. | |
1508 | * primary.c (match_actual_arg,check_for_implicit_index, | |
1509 | gfc_match_rvalue,gfc_match_rvalue): Update | |
1510 | gfc_get_sym_tree call. | |
1511 | ||
7991661b KG |
1512 | 2009-06-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> |
1513 | ||
1514 | * gfortran.h: Define HAVE_mpc_pow. | |
1515 | * arith.c (complex_reciprocal, complex_pow): If HAVE_mpc_pow, | |
1516 | don't define these functions. | |
1517 | (arith_power): If HAVE_mpc_pow, use mpc_pow. | |
1518 | ||
fc9c6e5d JW |
1519 | 2009-06-26 Janus Weil <janus@gcc.gnu.org> |
1520 | ||
1521 | PR fortran/39997 | |
1522 | PR fortran/40541 | |
1523 | * decl.c (add_hidden_procptr_result): Copy the typespec to the hidden | |
1524 | result. | |
1525 | * expr.c (gfc_check_pointer_assign): Enable interface check for | |
1526 | procedure pointer assignments where the rhs is a function returning a | |
1527 | procedure pointer. | |
1528 | * resolve.c (resolve_symbol): If an external procedure with unspecified | |
1529 | return type can not be implicitly typed, it must be a subroutine. | |
1530 | ||
7e196f89 JW |
1531 | 2009-06-24 Janus Weil <janus@gcc.gnu.org> |
1532 | ||
1533 | PR fortran/40427 | |
1534 | * gfortran.h (gfc_component): New member 'formal_ns'. | |
1535 | (gfc_copy_formal_args_ppc,void gfc_ppc_use): New. | |
1536 | * interface.c (gfc_ppc_use): New function, analogous to | |
1537 | gfc_procedure_use, but for procedure pointer components. | |
1538 | * module.c (MOD_VERSION): Bump module version. | |
1539 | (mio_component): Treat formal arguments. | |
1540 | (mio_formal_arglist): Changed argument from gfc_symbol to | |
1541 | gfc_formal_arglist. | |
1542 | (mio_symbol): Changed argument of mio_formal_arglist. | |
1543 | * resolve.c (resolve_ppc_call,resolve_expr_ppc): Call gfc_ppc_use, | |
1544 | to check actual arguments and treat formal args correctly. | |
1545 | (resolve_fl_derived): Copy formal args of procedure pointer components | |
1546 | from their interface. | |
1547 | * symbol.c (gfc_copy_formal_args_ppc): New function, analogous to | |
1548 | gfc_copy_formal_args, but for procedure pointer components. | |
1549 | ||
03bd096b JW |
1550 | 2009-06-22 Janus Weil <janus@gcc.gnu.org> |
1551 | ||
1552 | PR fortran/37254 | |
1553 | PR fortran/39850 | |
1554 | * interface.c (compare_parameter): Set implicit type for function | |
1555 | actual arguments with BT_UNKNOWN. | |
1556 | ||
e5e85f2b TB |
1557 | 2009-06-22 Tobias Burnus <burnus@net-b.de> |
1558 | ||
1559 | PR fortran/40472 | |
1560 | PR fortran/50520 | |
1561 | * simplify.c (gfc_simplify_spread): Fix the case that source= | |
1562 | is a scalar. | |
1563 | ||
79e9c4aa PT |
1564 | 2009-06-22 Paul Thomas <pault@gcc.gnu.org> |
1565 | ||
1566 | PR fortran/40443 | |
1567 | * interface.c (gfc_search_interface): Hold back a match to an | |
1568 | elementary procedure until all other possibilities are | |
1569 | exhausted. | |
1570 | ||
0e6640d8 PT |
1571 | 2009-06-22 Paul Thomas <pault@gcc.gnu.org> |
1572 | ||
1573 | PR fortran/40472 | |
1574 | * simplify.c (gfc_simplify_spread): Restrict the result size to | |
1575 | the limit for an array constructor. | |
1576 | ||
9b63f282 JW |
1577 | 2009-06-21 Janus Weil <janus@gcc.gnu.org> |
1578 | ||
1579 | PR fortran/39850 | |
1580 | * interface.c (gfc_compare_interfaces): Take care of implicit typing | |
1581 | when checking the function attribute. Plus another bugfix. | |
1582 | (compare_parameter): Set attr.function and attr.subroutine according | |
1583 | to the usage of a procedure as actual argument. | |
1584 | ||
cb7a8961 TB |
1585 | 2009-06-20 Tobias Burnus <burnus@net-b.de> |
1586 | ||
1587 | PR fortran/40452 | |
1588 | * trans-decl.c (add_argument_checking): Disable bounds check | |
1589 | for allowed argument storage association. | |
1590 | ||
47f71eb9 PT |
1591 | 2009-06-19 Paul Thomas <pault@gcc.gnu.org> |
1592 | ||
1593 | PR fortran/40440 | |
1594 | * trans-expr.c (gfc_conv_procedure_call): Do not deallocate | |
1595 | allocatable components if the argument is a pointer. | |
1596 | ||
eb6f9a86 KG |
1597 | 2009-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> |
1598 | ||
1599 | * gfortran.h (gfc_expr): Use mpc_t to represent complex numbers. | |
1600 | ||
1601 | * arith.c, dump-parse-tree.c, expr.c, module.c, resolve.c, | |
1602 | simplify.c, target-memory.c, target-memory.h, trans-const.c, | |
1603 | trans-expr.c: Convert to mpc_t throughout. | |
1604 | ||
88eeff6f ILT |
1605 | 2009-06-19 Ian Lance Taylor <iant@google.com> |
1606 | ||
1607 | * cpp.c (struct gfc_cpp_option_data): Give this struct, used for | |
1608 | the global variable gfc_cpp_option, a name. | |
1609 | ||
7e9c61e8 JW |
1610 | 2009-06-19 Janus Weil <janus@gcc.gnu.org> |
1611 | ||
1612 | PR fortran/40450 | |
1613 | * trans-expr.c (gfc_conv_procedure_call): Only add an extra addr_expr | |
1614 | to a procedure pointer actual argument, if it is not itself a | |
1615 | dummy arg. | |
1616 | ||
f9909823 JW |
1617 | 2009-06-18 Janus Weil <janus@gcc.gnu.org> |
1618 | ||
1619 | PR fortran/40451 | |
1620 | * resolve.c (resolve_contained_fntype): Prevent implicit typing for | |
1621 | procedures with explicit interface. | |
1622 | * symbol.c (gfc_check_function_type): Ditto. | |
1623 | ||
2f4d1994 ILT |
1624 | 2009-06-16 Ian Lance Taylor <iant@google.com> |
1625 | ||
1626 | * decl.c (build_struct): Rewrite loop over constructor elements. | |
1627 | ||
8ad15a0a JW |
1628 | 2009-06-16 Janus Weil <janus@gcc.gnu.org> |
1629 | ||
1630 | PR fortran/36947 | |
1631 | PR fortran/40039 | |
1632 | * expr.c (gfc_check_pointer_assign): Call 'gfc_compare_interfaces' with | |
1633 | error message. | |
1634 | * gfortran.h (gfc_compare_interfaces): Additional argument. | |
1635 | * interface.c (operator_correspondence): Removed. | |
1636 | (gfc_compare_interfaces): Additional argument to return error message. | |
1637 | Directly use the code from 'operator_correspondence' instead of calling | |
1638 | the function. Check for OPTIONAL. Some rearrangements. | |
1639 | (check_interface1): Call 'gfc_compare_interfaces' without error message. | |
1640 | (compare_parameter): Call 'gfc_compare_interfaces' with error message. | |
1641 | * resolve.c (check_generic_tbp_ambiguity): Call 'gfc_compare_interfaces' | |
1642 | without error message. | |
1643 | ||
3ba558db TB |
1644 | 2009-06-16 Tobias Burnus <burnus@net-b.de> |
1645 | ||
1646 | PR fortran/40383 | |
1647 | * trans-decl.c (create_function_arglist): Copy formal charlist to | |
1648 | have a proper passed_length for -fcheck=bounds. | |
1649 | ||
7333964b SK |
1650 | 2009-06-12 Steven G. Kargl <kargls@comcast.net> |
1651 | ||
1652 | * arith.c (gfc_enum_initializer): Move function ... | |
1653 | * decl.c: ... here. Remove gfc_ prefix and make static. | |
1654 | (enumerator_decl): Update function call. | |
1655 | * gfortran.h: Remove gfc_enum_initializer prototype. | |
1656 | ||
c2255bc4 AH |
1657 | 2009-06-12 Aldy Hernandez <aldyh@redhat.com> |
1658 | ||
1659 | * trans-array.c (gfc_trans_allocate_array_storage): Pass | |
1660 | location on down. | |
1661 | (gfc_trans_array_constructor_value): Same. | |
1662 | (gfc_trans_scalarized_loop_end): Same. | |
1663 | (gfc_conv_ss_startstride): Same. | |
1664 | (gfc_trans_g77_array): Same. | |
1665 | (gfc_trans_dummy_array_bias): Same. | |
1666 | (gfc_conv_array_parameter): Same. | |
1667 | (structure_alloc_comps): Same. | |
1668 | * trans-expr.c (gfc_conv_function_call): Same. | |
1669 | (fill_with_spaces): Same. | |
1670 | (gfc_trans_string_copy): Same. | |
1671 | (gfc_trans_scalar_assign): Same. | |
1672 | * trans-stmt.c (gfc_trans_goto): Same. | |
1673 | (gfc_trans_if_1): Same. | |
1674 | (gfc_trans_simple_do): Same. | |
1675 | (gfc_trans_do): Same. | |
1676 | (gfc_trans_do_while): Same. | |
1677 | (gfc_trans_logical_select): Same. | |
1678 | (gfc_trans_select): Same. | |
1679 | (gfc_trans_forall_loop): Same. | |
1680 | (gfc_trans_nested_forall_loop): Same. | |
1681 | (generate_loop_for_temp_to_lhs): Same. | |
1682 | (generate_loop_for_rhs_to_temp): Same. | |
1683 | (gfc_trans_forall_1): Same. | |
1684 | (gfc_trans_where_assign): Same. | |
1685 | (gfc_trans_where_3): Same. | |
1686 | (gfc_trans_allocate): Same. | |
1687 | * trans.c (gfc_finish_block): Same. | |
1688 | (gfc_trans_runtime_check): Same. | |
1689 | (gfc_call_malloc): Same. | |
1690 | (gfc_allocate_with_status): Same. | |
1691 | (gfc_call_free): Same. | |
1692 | (gfc_deallocate_with_status): Same. | |
1693 | (gfc_call_realloc): Same. | |
1694 | (gfc_trans_code): Same. | |
1695 | * trans-decl.c (gfc_init_default_dt): Same. | |
1696 | (gfc_generate_constructors): Same. | |
1697 | * trans-io.c (gfc_trans_io_runtime_check): Same. | |
1698 | * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same. | |
1699 | (gfc_conv_intrinsic_fdate): Same. | |
1700 | (gfc_conv_intrinsic_ttynam): Same. | |
1701 | (gfc_conv_intrinsic_minmax): Same. | |
1702 | (gfc_conv_intrinsic_minmax_char): Same. | |
1703 | (gfc_conv_intrinsic_anyall): Same. | |
1704 | (gfc_conv_intrinsic_count): Same. | |
1705 | (gfc_conv_intrinsic_arith): Same. | |
1706 | (gfc_conv_intrinsic_minmaxloc): Same. | |
1707 | (gfc_conv_intrinsic_minmaxval): Same. | |
1708 | (gfc_conv_intrinsic_rrspacing): Same. | |
1709 | (gfc_conv_intrinsic_array_transfer): Same. | |
1710 | (gfc_conv_intrinsic_trim): Same. | |
1711 | (gfc_conv_intrinsic_repeat): Same. | |
1712 | ||
d1d919c3 JW |
1713 | 2009-06-12 Janus Weil <janus@gcc.gnu.org> |
1714 | ||
1715 | PR fortran/40176 | |
1716 | * resolve.c (resolve_symbol): Additional error check, preventing an | |
1717 | infinite loop. | |
1718 | ||
abeab938 PT |
1719 | 2009-06-11 Paul Thomas <pault@gcc.gnu.org> |
1720 | ||
1721 | PR fortran/40402 | |
1722 | * resolve.c (next_data_value): It is an error if the value is | |
1723 | not constant. | |
1724 | ||
4ec80803 FXC |
1725 | 2009-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> |
1726 | ||
1727 | PR fortran/38718 | |
1728 | * intrinsic.c (add_functions): Add simplifiers for ISNAN, | |
1729 | IS_IOSTAT_END and IS_IOSTAT_EOR. | |
1730 | * intrinsic.h (gfc_simplify_is_iostat_end, gfc_simplify_is_iostat_eor, | |
1731 | gfc_simplify_isnan): New prototypes. | |
1732 | * intrinsic.c (gfc_simplify_is_iostat_end, gfc_simplify_is_iostat_eor, | |
1733 | gfc_simplify_isnan): New functions. | |
1734 | ||
e8d4f3fc JJ |
1735 | 2009-06-11 Jakub Jelinek <jakub@redhat.com> |
1736 | ||
1737 | * interface.c (fold_unary): Rename to... | |
1738 | (fold_unary_intrinsic): ... this. | |
1739 | (gfc_extend_expr): Adjust caller. | |
1740 | (gfc_match_generic_spec): Likewise. Initialize *op to INTRINSIC_NONE | |
1741 | to avoid warnings. | |
1742 | * expr.c (gfc_simplify_expr): Initialize start and end before calling | |
1743 | gfc_extract_int. | |
1744 | ||
f788ca89 DK |
1745 | 2009-06-10 Dave Korn <dave.korn.cygwin@gmail.com> |
1746 | ||
1747 | * trans-decl.c (create_main_function): Don't build main decl twice. | |
1748 | ||
ebcbc56d TB |
1749 | 2009-06-09 Tobias Burnus <burnus@net-b.de> |
1750 | ||
1751 | * trans-decl.c (gfc_generate_function_code): Use gfc_option.rtcheck | |
1752 | instead of flag_bounds_check. | |
1753 | * intrinsic.texi (ISO_FORTRAN_ENV): Document INT{8,16,32,64} and | |
1754 | REAL{32,64,128}. | |
1755 | ||
d7f26adf PT |
1756 | 2009-06-08 Paul Thomas <pault@gcc.gnu.org> |
1757 | ||
1758 | * trans-array.h : Replace prototypes for | |
1759 | gfc_conv_descriptor_offset, gfc_conv_descriptor_stride, | |
1760 | gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound with new | |
1761 | prototypes of the same names with _get or _set appended. | |
1762 | * trans-array.c : Make the originals of the above static and | |
1763 | new functions for the _get and _set functions. Update all the | |
1764 | references to these descriptor access functions. | |
1765 | * trans-expr.c : Update references to the above descriptor | |
1766 | access functions. | |
1767 | * trans-intrinsic.c : The same. | |
1768 | * trans-openmp.c : The same. | |
1769 | * trans-stmt.c : The same. | |
1770 | ||
2153915d AO |
1771 | 2009-06-08 Alexandre Oliva <aoliva@redhat.com> |
1772 | ||
1773 | * options.c (gfc_post_options): Disable dump_parse_tree | |
1774 | during -fcompare-debug-second. | |
1775 | ||
82aee543 | 1776 | 2009-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org> |
9ad55c33 JD |
1777 | |
1778 | PR fortran/40008 | |
1779 | * gfortran.h (gfc_open): Add newunit expression to structure. | |
1780 | * io.c (io_tag): Add new unit tag and fix whitespace. | |
1781 | (match_open_element): Add matching for newunit. | |
1782 | (gfc_free_open): Free the newunit expression. | |
1783 | (gfc_resolve_open): Add newunit to resolution and check constraints. | |
1784 | (gfc_resolve_close): Add check for non-negative unit. | |
1785 | (gfc_resolve_filepos): Likewise. | |
1786 | (gfc_resolve_dt): Likewise. | |
1787 | * trans-io.c (set_parameter_value): Build runtime checks for unit | |
1788 | numbers within range of kind=4 integer. (gfc_trans_open) Set the | |
1789 | newunit parameter. | |
1790 | * ioparm.def (IOPARM): Define the newunit parameter as a pointer | |
1791 | to GFC_INTEGER_4, pint4. | |
1792 | ||
c430a6f9 DF |
1793 | 2009-06-07 Daniel Franke <franke.daniel@gmail.com> |
1794 | ||
1795 | PR fortran/25104 | |
1796 | PR fortran/29962 | |
1797 | * array.c (gfc_append_constructor): Added NULL-check. | |
1798 | * check.c (gfc_check_spread): Check DIM. | |
1799 | (gfc_check_unpack): Check that the ARRAY arguments provides enough | |
1800 | values for MASK. | |
1801 | * intrinsic.h (gfc_simplify_spread): New prototype. | |
1802 | (gfc_simplify_unpack): Likewise. | |
1803 | * intrinsic.c (add_functions): Added new simplifier callbacks. | |
1804 | * simplify.c (gfc_simplify_spread): New. | |
1805 | (gfc_simplify_unpack): New. | |
1806 | * expr.c (check_transformational): Allow additional transformational | |
1807 | intrinsics in initialization expression. | |
1808 | ||
a16d978f DF |
1809 | 2009-06-07 Daniel Franke <franke.daniel@gmail.com> |
1810 | ||
1811 | PR fortran/25104 | |
1812 | PR fortran/29962 | |
1813 | * check.c (gfc_check_all_any): Check rank of DIM. | |
1814 | (gfc_check_count): Likewise. | |
1815 | * intrinsic.h (gfc_simplify_all): New prototype. | |
1816 | (gfc_simplify_any): Likewise. | |
1817 | (gfc_simplify_count): Likewise. | |
1818 | (gfc_simplify_sum): Likewise. | |
1819 | (gfc_simplify_product): Likewise. | |
1820 | * intrinsic.c (add_functions): Added new simplifier callbacks. | |
1821 | * simplify.c (transformational_result): New. | |
1822 | (simplify_transformation_to_scalar): New. | |
1823 | (simplify_transformation_to_array): New. | |
1824 | (gfc_count): New. | |
1825 | (gfc_simplify_all): New. | |
1826 | (gfc_simplify_any): New. | |
1827 | (gfc_simplify_count): New. | |
1828 | (gfc_simplify_sum): New. | |
1829 | (gfc_simplify_product): New. | |
1830 | * expr.c (check_transformational): Allow additional transformational | |
1831 | intrinsics in initialization expression. | |
1832 | ||
ca8a8795 DF |
1833 | 2009-06-07 Daniel Franke <franke.daniel@gmail.com> |
1834 | ||
1835 | * check.c (dim_rank_check): Return SUCCESS if DIM=NULL. | |
1836 | (gfc_check_lbound): Removed (now) redundant check for DIM=NULL. | |
1837 | (gfc_check_minloc_maxloc): Likewise. | |
1838 | (check_reduction): Likewise. | |
1839 | (gfc_check_size): Likewise. | |
1840 | (gfc_check_ubound): Likewise. | |
1841 | (gfc_check_cshift): Added missing shape-conformance checks. | |
1842 | (gfc_check_eoshift): Likewise. | |
1843 | * gfortran.h (gfc_check_conformance): Modified prototype to printf-style. | |
1844 | * expr.c (gfc_check_conformance): Accept error-message chunks in | |
1845 | printf-style. Changed all callers. | |
1846 | ||
1847 | ||
8ec259c1 DF |
1848 | 2009-06-07 Daniel Franke <franke.daniel@gmail.com> |
1849 | ||
1850 | PR fortran/25104 | |
1851 | PR fortran/29962 | |
1852 | * intrinsic.h (gfc_simplify_dot_product): New prototype. | |
1853 | (gfc_simplify_matmul): Likewise. | |
1854 | (gfc_simplify_transpose): Likewise. | |
1855 | * intrinsic.c (add_functions): Added new simplifier callbacks. | |
1856 | * simplify.c (init_result_expr): New. | |
1857 | (compute_dot_product): New. | |
1858 | (gfc_simplify_dot_product): New. | |
1859 | (gfc_simplify_matmul): New. | |
1860 | (gfc_simplify_transpose): New. | |
1861 | * expr.c (check_transformational): Allow transformational intrinsics | |
1862 | with simplifier in initialization expression. | |
1863 | ||
f7cfd28c DF |
1864 | 2009-06-06 Daniel Franke <franke.daniel@gmail.com> |
1865 | ||
1866 | PR fortran/37203 | |
1867 | * simplify.c (gfc_simplify_reshape): Fixed reshaping of empty arrays | |
1868 | without padding. | |
1869 | ||
7ba8c18c DF |
1870 | 2009-06-06 Daniel Franke <franke.daniel@gmail.com> |
1871 | ||
1872 | PR fortran/32890 | |
1873 | * intrinsic.h (gfc_simplify_pack): New prototype. | |
1874 | * intrinsic.c (add_functions): Added | |
1875 | simplifier-callback to PACK. | |
1876 | * simplify.c (is_constant_array_expr): Moved | |
1877 | to beginning of file. | |
1878 | (gfc_simplify_pack): New. | |
1879 | * check.c (gfc_check_pack): Check that VECTOR has enough elements. | |
1880 | Added safeguards for empty arrays. | |
1881 | ||
26a347c5 KG |
1882 | 2009-06-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> |
1883 | ||
1884 | * simplify.c (call_mpc_func): Use mpc_realref/mpc_imagref | |
1885 | instead of MPC_RE/MPC_IM. | |
1886 | ||
d560566a AO |
1887 | 2009-06-05 Alexandre Oliva <aoliva@redhat.com> |
1888 | ||
1889 | * trans-decl.c (gfc_build_qualified_array): Don't skip generation | |
1890 | of range types. | |
1891 | * trans.h (struct lang_type): Add base_decls. | |
1892 | (GFC_TYPE_ARRAY_BASE_DECL): New. | |
1893 | * trans-types.c (gfc_get_array_type_bounds): Initialize base decls | |
1894 | proactively and excessively. | |
1895 | (gfc_get_array_descr_info): Use existing base decls if available. | |
1896 | ||
535ff342 DF |
1897 | 2009-06-04 Daniel Franke <franke.daniel@gmail.com> |
1898 | ||
1899 | PR fortran/37203 | |
1900 | * check.c (gfc_check_reshape): Additional checks for the | |
1901 | SHAPE and ORDER arguments. | |
1902 | * simplify.c (gfc_simplify_reshape): Converted argument checks | |
1903 | to asserts. | |
1904 | ||
9e0667cd TB |
1905 | 2009-06-03 Tobias Burnus <burnus@net-b.de> |
1906 | ||
1907 | * gfortran.texi: Add mixed-language programming, mention | |
1908 | varying string lengths, some clean up of introduction parts. | |
1909 | * intrinsic.texi (instrinsic modules): Create @menu for subsections. | |
1910 | (ISO_C_BINDING): Support ISOCBINDING_INT_FAST128_T. | |
1911 | * libgfortran.h: Comment to rember to keep gfortran.texi in sync. | |
1912 | * iso-c-binding.def: Support ISOCBINDING_INT_FAST128_T. | |
1913 | ||
54f806c7 FXC |
1914 | 2009-06-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> |
1915 | Tobias Burnus <burnus@net-b.de> | |
1916 | ||
1917 | * iso-c-binding.def: Use INTMAX_TYPE instead of intmax_type_node. | |
1918 | * trans-types.c (init_c_interop_kinds): Remove intmax_type_node. | |
1919 | ||
c75b7ed7 AO |
1920 | 2009-06-03 Alexandre Oliva <aoliva@redhat.com> |
1921 | ||
1922 | * module.c (mio_f2k_derived): Initialize cur. | |
1923 | ||
a7ad6c2d TB |
1924 | 2009-06-01 Tobias Burnus <burnus@net-b.de> |
1925 | ||
1926 | PR fortran/40309 | |
1927 | * trans-decl.c (gfc_sym_identifier): Use "MAIN__" for PROGRAM "main". | |
1928 | (create_main_function): Set main_identifier_node. | |
1929 | ||
0a05c536 FXC |
1930 | 2009-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> |
1931 | ||
1932 | PR fortran/40019 | |
1933 | * trans-types.c (gfc_build_uint_type): Make nonstatic. | |
1934 | * trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): New prototypes. | |
1935 | * trans-types.h (gfc_build_uint_type): Add prototype. | |
1936 | * trans-decl.c (gfc_build_intrinsic_function_decls): Build | |
1937 | gfor_fndecl_clz128 and gfor_fndecl_ctz128. | |
1938 | * trans-intrinsic.c (gfc_conv_intrinsic_leadz, | |
1939 | gfc_conv_intrinsic_trailz): Call the right builtins or library | |
1940 | functions, and cast arguments to unsigned types first. | |
1941 | * simplify.c (gfc_simplify_leadz): Deal with negative arguments. | |
1942 | ||
c607156f ILT |
1943 | 2009-05-27 Ian Lance Taylor <iant@google.com> |
1944 | ||
1945 | * Make-lang.in (gfortran$(exeext)): Change $(COMPILER) to | |
1946 | $(LINKER). | |
1947 | (f951$(exeext)): Likewise. | |
1948 | ||
86c3c481 TB |
1949 | 2009-05-27 Tobias Burnus <burnus@net-b.de> |
1950 | ||
1951 | PR fortran/40270 | |
1952 | * trans-decl.c (create_main_function): Mark MAIN__ and | |
1953 | argc/argv as TREE_USED and push/pop function_decl context | |
1954 | if needed. | |
1955 | ||
092231a8 TB |
1956 | 2009-05-26 Tobias Burnus <burnus@net-b.de> |
1957 | ||
1958 | PR fortran/39178 | |
1959 | * gfortranspec.c (lang_specific_driver): Stop linking | |
1960 | libgfortranbegin. | |
1961 | * trans-decl.c (gfc_build_builtin_function_decls): Stop | |
1962 | making MAIN__ publicly visible. | |
1963 | (gfc_build_builtin_function_decls): Add | |
1964 | gfor_fndecl_set_args. | |
1965 | (create_main_function) New function. | |
1966 | (gfc_generate_function_code): Use it. | |
1967 | ||
9a0bab0b TB |
1968 | 2009-05-26 Tobias Burnus <burnus@net-b.de> |
1969 | ||
1970 | PR fortran/40246 | |
1971 | * match.c (gfc_match_nullify): NULLify freed pointer. | |
1972 | ||
7980bfb8 ILT |
1973 | 2009-05-26 Ian Lance Taylor <iant@google.com> |
1974 | ||
1975 | * Make-lang.in (gfortranspec.o): Use $(COMPILER). | |
1976 | (gfortran$(exeext), f951$(exeext), fortran/cpp.o): Likewise. | |
1977 | ||
f6b855df KG |
1978 | 2009-05-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> |
1979 | ||
1980 | * gfortran.h (GFC_MPC_RND_MODE): New. | |
1981 | * simplify.c (call_mpc_func): New helper function. | |
1982 | (gfc_simplify_cos, gfc_simplify_exp, gfc_simplify_log, | |
1983 | gfc_simplify_sin, gfc_simplify_sqrt): Add MPC support. | |
1984 | ||
c74b74a8 JW |
1985 | 2009-05-25 Janus Weil <janus@gcc.gnu.org> |
1986 | ||
1987 | PR fortran/40176 | |
1988 | * primary.c (gfc_match_varspec): Handle procedure pointer components | |
1989 | with array return value. | |
1990 | * resolve.c (resolve_expr_ppc): Ditto. | |
1991 | (resolve_symbol): Make sure the interface of a procedure pointer has | |
1992 | been resolved. | |
1993 | * trans-array.c (gfc_walk_function_expr): Handle procedure pointer | |
1994 | components with array return value. | |
1995 | * trans-expr.c (gfc_conv_component_ref,gfc_conv_procedure_call, | |
1996 | gfc_trans_arrayfunc_assign): Ditto. | |
1997 | (gfc_trans_pointer_assignment): Handle procedure pointer assignments, | |
1998 | where the rhs is a dummy argument. | |
1999 | * trans-types.c (gfc_get_ppc_type,gfc_get_derived_type): Handle | |
2000 | procedure pointer components with array return value. | |
2001 | ||
7ac61957 JD |
2002 | 2009-05-24 Jerry DeLisle <jvdelisle@gcc.gnu.org> |
2003 | Dominique Dhumieres | |
2004 | ||
2005 | PR fortran/35732 | |
2006 | PR fortran/39872 | |
2007 | * trans-array.c (gfc_conv_ss_startstride): Add one to index. | |
2008 | ||
eebc710d FXC |
2009 | 2009-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> |
2010 | ||
2011 | PR fortran/40195 | |
2012 | * module.c (read_md5_from_module_file): Close file before returning. | |
2013 | ||
e35bbb23 JW |
2014 | 2009-05-18 Janus Weil <janus@gcc.gnu.org> |
2015 | ||
2016 | PR fortran/40164 | |
2017 | * primary.c (gfc_match_rvalue): Handle procedure pointer components in | |
2018 | arrays. | |
2019 | * resolve.c (resolve_ppc_call,resolve_expr_ppc): Resolve component and | |
2020 | array references. | |
2021 | (resolve_fl_derived): Procedure pointer components are not required to | |
2022 | have constant array bounds in their return value. | |
2023 | ||
9b2db7be JW |
2024 | 2009-05-18 Janus Weil <janus@gcc.gnu.org> |
2025 | ||
2026 | * intrinsic.c (add_sym): Fix my last commit (r147655), | |
2027 | which broke bootstrap. | |
2028 | ||
bfa31dad RG |
2029 | 2009-05-18 Richard Guenther <rguenther@suse.de> |
2030 | ||
2031 | PR fortran/40168 | |
2032 | * trans-expr.c (gfc_trans_zero_assign): For local array | |
2033 | destinations use an assignment from an empty constructor. | |
2034 | ||
23e38561 JW |
2035 | 2009-05-18 Janus Weil <janus@gcc.gnu.org> |
2036 | ||
2037 | PR fortran/36947 | |
2038 | PR fortran/40039 | |
2039 | * expr.c (gfc_check_pointer_assign): Check intents when comparing | |
2040 | interfaces. | |
2041 | * gfortran.h (typedef struct gfc_intrinsic_arg): Add 'intent' member. | |
2042 | (gfc_compare_interfaces): Additional argument. | |
2043 | * interface.c (operator_correspondence): Add check for equality of | |
2044 | intents, and new argument 'intent_check'. | |
2045 | (gfc_compare_interfaces): New argument 'intent_check', which is passed | |
2046 | on to operator_correspondence. | |
2047 | (check_interface1): Don't check intents when comparing interfaces. | |
2048 | (compare_parameter): Do check intents when comparing interfaces. | |
2049 | * intrinsic.c (add_sym): Add intents for arguments of intrinsic | |
2050 | procedures. | |
2051 | (add_sym_1,add_sym_1s,add_sym_1m,add_sym_2,add_sym_2s,add_sym_3, | |
2052 | add_sym_3ml,add_sym_3red,add_sym_3s,add_sym_4): Use INTENT_IN by | |
2053 | default. | |
2054 | (add_sym_1_intent,add_sym_1s_intent,add_sym_2s_intent,add_sym_3s_intent) | |
2055 | : New functions to add intrinsic symbols, specifying custom intents. | |
2056 | (add_sym_4s,add_sym_5s): Add new arguments to specify intents. | |
2057 | (add_functions,add_subroutines): Add intents for various intrinsics. | |
2058 | * resolve.c (check_generic_tbp_ambiguity): Don't check intents when | |
2059 | comparing interfaces. | |
2060 | * symbol.c (gfc_copy_formal_args_intr): Copy intent. | |
2061 | ||
e0a6661b FXC |
2062 | 2009-05-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> |
2063 | ||
2064 | * iso-fortran-env.def: Define INT8, INT16, INT32, INT64, REAL32, | |
2065 | REAL64 and REAL128. | |
2066 | * gfortran.h (gfc_get_int_kind_from_width_isofortranenv, | |
2067 | gfc_get_real_kind_from_width_isofortranenv): New prototypes. | |
2068 | * iso-c-binding.def: Update definitions for the INT*_T, | |
2069 | INT_LEAST*_T and INT_FAST*_T named parameters. | |
2070 | * trans-types.c (get_typenode_from_name, get_int_kind_from_name, | |
2071 | gfc_get_real_kind_from_width_isofortranenv): New functions. | |
2072 | ||
2f8cce28 FXC |
2073 | 2009-05-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> |
2074 | ||
2075 | PR fortran/36260 | |
2076 | * intrinsic.c (add_functions, add_subroutines): Fix argument | |
2077 | names and wrap long lines. | |
2078 | * intrinsic.texi: Fix documentation and argument names of | |
2079 | LOG_GAMMA, DATAN2, DBESJN, DTIME, ETIME, FSTAT, STAT, LSTAT, | |
2080 | GET_COMMAND, IDATE, LTIME, MOVE_ALLOC, NINT, OR, PRODUCT, | |
2081 | SUM, RAND, RANDOM_SEED, REAL, SELECTED_INT_KIND, | |
2082 | SELECTED_REAL_KIND and XOR. | |
2083 | ||
9b33a6a1 FXC |
2084 | 2009-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> |
2085 | ||
2086 | PR fortran/33197 | |
2087 | * intrinsic.c (add_functions): Use ERFC_SCALED simplification. | |
2088 | * intrinsic.h (gfc_simplify_erfc_scaled): New prototype. | |
2089 | * simplify.c (fullprec_erfc_scaled, asympt_erfc_scaled, | |
2090 | gfc_simplify_erfc_scaled): New functions. | |
2091 | ||
b0c06816 FXC |
2092 | 2009-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> |
2093 | ||
2094 | PR fortran/31243 | |
2095 | * resolve.c (resolve_substring): Don't allow too large substring | |
2096 | indexes. | |
2097 | (gfc_resolve_substring_charlen): Fix typo. | |
2098 | (gfc_resolve_character_operator): Fix typo. | |
2099 | (resolve_charlen): Catch unreasonably large string lengths. | |
2100 | * simplify.c (gfc_simplify_len): Don't error out on LEN | |
2101 | range checks. | |
2102 | ||
24264cbb FXC |
2103 | 2009-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> |
2104 | ||
2105 | PR fortran/36031 | |
2106 | * decl.c (set_enum_kind): Use global short-enums flag. | |
2107 | * gfortran.h (gfc_option_t): Remove short_enums flag. | |
2108 | * lang.opt (-fshort-enums): Refer to C documentation. | |
2109 | * options.c (gfc_init_options, gfc_handle_option): Use global | |
2110 | short-enums flag. | |
2111 | ||
602b8523 TB |
2112 | 2009-05-15 Tobias Burnus <burnus@net-b.de> |
2113 | ||
2114 | PR fortran/39352 | |
2115 | * f95-lang.c: Add gfc_maybe_initialize_eh. | |
2116 | * gfortran.h: Add gfc_maybe_initialize_eh prototype. | |
2117 | * Make-lang.in: Add new .h dendencies for f95-lang.c | |
2118 | * openmp.c (resolve_omp_do): Call gfc_maybe_initialize_eh. | |
2119 | * misc.c (gfc_free): Avoid #define trickery for free. | |
2120 | ||
0511ddbb SK |
2121 | 2009-05-14 Steven G. Kargl <kargl@gcc.gnu.org> |
2122 | ||
2123 | * dump-parse-tree.c (show_code_node): Add ERRMSG to the dumping | |
2124 | of allocate and deallocate statements. | |
2125 | ||
09639a83 ILT |
2126 | 2009-05-14 Ian Lance Taylor <iant@google.com> |
2127 | ||
2128 | * decl.c (match_attr_spec): Change d to unsigned int. | |
2129 | * dump-parse-tree.c (show_namespace): Change op to int. Add cast. | |
2130 | * interface.c (gfc_check_interfaces): Change i to int. Add casts. | |
2131 | * module.c (read_module): Change i to int. Add cast. | |
2132 | (write_module): Change i to int. | |
2133 | * symbol.c (gfc_get_namespace): Change in to int. | |
2134 | (gfc_free_namespace): Change i to int. | |
2135 | * trans-io.c (gfc_build_io_library_fndecls): Change ptype to | |
2136 | unsigned int. Add cast. | |
2137 | * trans-types.c (gfc_init_kinds): Change mode to unsigned int. | |
2138 | Add casts. | |
2139 | ||
240f9e94 DK |
2140 | 2009-05-14 Daniel Kraft <d@domob.eu> |
2141 | ||
2142 | PR fortran/40045 | |
2143 | * dump-parse-tree.c (show_typebound): Fix missing adaption to new | |
2144 | type-bound procedure storage structure. | |
2145 | ||
6de7294f JW |
2146 | 2009-05-14 Janus Weil <janus@gcc.gnu.org> |
2147 | ||
2148 | PR fortran/39996 | |
2149 | * decl.c (gfc_match_function_decl): Use gfc_add_type. | |
2150 | * symbol.c (gfc_add_type): Better checking for duplicate types in | |
2151 | function declarations. And: Always give an error for duplicte types, | |
2152 | not just a warning with -std=gnu. | |
2153 | ||
7e279142 JJ |
2154 | 2009-05-14 Jakub Jelinek <jakub@redhat.com> |
2155 | ||
2156 | PR fortran/39865 | |
2157 | * io.c (resolve_tag_format): CHARACTER array in FMT= argument | |
2158 | isn't an extension. Reject non-CHARACTER array element of | |
2159 | assumed shape or pointer or assumed size array. | |
2160 | * trans-array.c (array_parameter_size): New function. | |
2161 | (gfc_conv_array_parameter): Add size argument. Call | |
2162 | array_parameter_size if it is non-NULL. | |
2163 | * trans-array.h (gfc_conv_array_parameter): Adjust prototype. | |
2164 | * trans-expr.c (gfc_conv_function_call, gfc_trans_arrayfunc_assign): | |
2165 | Adjust callers. | |
2166 | * trans-intrinsic.c (gfc_conv_intrinsic_loc): Likewise. | |
2167 | * trans-io.c (gfc_convert_array_to_string): Rewritten. | |
2168 | ||
a513927a SK |
2169 | 2009-05-13 Steven G. Kargl <kargl@gcc.gnu.org> |
2170 | ||
2171 | * gfortran.h (gfc_code): Rename struct member expr to expr1. | |
2172 | * openmp.c (resolve_omp_atomic): Update expr to expr1. | |
2173 | * interface.c (gfc_extend_assign): Ditto. | |
2174 | * trans-expr.c (gfc_conv_expr_reference, gfc_trans_assignment, | |
2175 | gfc_trans_init_assign): Ditto. | |
2176 | * dump-parse-tree.c (show_code_node): Ditto. | |
2177 | * trans-openmp.c (gfc_trans_omp_atomic): Ditto. | |
2178 | * trans-stmt.c ( gfc_trans_label_assign, gfc_trans_goto, gfc_trans_call, | |
2179 | gfc_trans_return, gfc_trans_pause, gfc_trans_stop, gfc_trans_if_1, | |
2180 | gfc_trans_arithmetic_if, gfc_trans_do_while, gfc_trans_integer_select, | |
2181 | gfc_trans_logical_select, gfc_trans_character_select | |
2182 | forall_make_variable_temp, check_forall_dependencies | |
2183 | gfc_trans_forall_1, gfc_trans_where_2, gfc_trans_where_3 | |
2184 | gfc_trans_where, gfc_trans_allocate, gfc_trans_deallocate): Ditto. | |
2185 | * io.c (match_io_element, gfc_match_inquire): Ditto. | |
2186 | * resolve.c (resolve_typebound_call, resolve_ppc_call, | |
2187 | resolve_allocate_expr, resolve_allocate_deallocate, resolve_select, | |
2188 | resolve_transfer, resolve_where, gfc_resolve_assign_in_forall, | |
2189 | gfc_resolve_blocks, resolve_code, build_init_assign): Ditto. | |
2190 | * st.c (gfc_free_statement): Ditto. | |
2191 | * match.c (gfc_match_assignment, gfc_match_pointer_assignment, | |
2192 | match_arithmetic_if, gfc_match_if, gfc_match_elseif | |
2193 | gfc_match_stopcode, gfc_match_assign, gfc_match_goto, | |
2194 | gfc_match_nullify, match_typebound_call, gfc_match_call | |
2195 | gfc_match_select, match_simple_where, gfc_match_where | |
2196 | gfc_match_elsewhere, match_simple_forall, gfc_match_forall): Ditto. | |
2197 | * trans-io.c (gfc_trans_transfer): Ditto. | |
2198 | * parse.c (parse_where_block, parse_if_block): Ditto. | |
2199 | ||
79bd1948 SK |
2200 | 2009-05-13 Steven G. Kargl <kargl@gcc.gnu.org> |
2201 | ||
2202 | * gfortran.h (gfc_code): Rename struct member label to label1. | |
2203 | * dump-parse-tree.c (show_code_node): Update symbol. | |
2204 | * trans-stmt.c (gfc_trans_label_assign, gfc_trans_goto, | |
eebc710d | 2205 | gfc_trans_arithmetic_if): Ditto. |
79bd1948 SK |
2206 | * resolve.c (gfc_resolve_blocks, resolve_code): Ditto. |
2207 | * match.c (match_arithmetic_if, gfc_match_if, gfc_reference_st_label, | |
2208 | gfc_match_assign, gfc_match_goto): Ditto. | |
2209 | * parse.c (parse_do_block): Ditto. | |
2210 | ||
5c71a5e0 TB |
2211 | 2009-05-13 Tobias Burnus <burnus@net-b.de> |
2212 | ||
2213 | PR fortran/34153 | |
2214 | * gfortran.h (gfc_exec_op): Add EXEC_END_PROCEDURE. | |
2215 | * dump-parse-tree.c (show_code_node): Use EXEC_END_PROCEDURE. | |
2216 | * trans.c (gfc_trans_code): Ditto. | |
2217 | * resolve.c (resolve_code): Ditto. | |
2218 | * st.c (gfc_free_statement): Ditto. | |
2219 | * parse.c (accept_statement): Ditto. | |
2220 | ||
2be51762 TB |
2221 | 2009-05-12 Tobias Burnus <burnus@net-b.de> |
2222 | ||
2223 | PR fortran/40110 | |
2224 | * decl.c (gfc_match_kind_spec): Turn C kind error into a warning. | |
2225 | ||
e4bf01a4 SE |
2226 | 2009-05-11 Steve Ellcey <sje@cup.hp.com> |
2227 | ||
2228 | * resolve.c (check_host_association): Initialize tail. | |
2229 | ||
cbb9a26e JW |
2230 | 2009-05-11 Janus Weil <janus@gcc.gnu.org> |
2231 | ||
2232 | PR fortran/40089 | |
2233 | * resolve.c (resolve_fl_derived): Only return FAILURE if | |
2234 | gfc_notify_std fails. | |
2235 | ||
24b97832 ILT |
2236 | 2009-05-10 Ian Lance Taylor <iant@google.com> |
2237 | ||
2238 | * gfortran.h (enum gfc_omp_sched_kind): New enum, broken out of | |
2239 | gfc_omp_clauses. | |
2240 | (enum gfc_omp_default_sharing): Likewise. | |
2241 | * module.c (enum gfc_rsym_state): New enum, broken out of | |
2242 | pointer_info. | |
2243 | (enum gfc_wsym_state): Likewise. | |
2244 | * parse.c (enum state_order): New enum, broken out of st_state. | |
2245 | ||
110ea21a PT |
2246 | 2009-05-10 Paul Thomas <pault@gcc.gnu.org> |
2247 | ||
2248 | PR fortran/40018 | |
2249 | * trans-array.c (gfc_trans_array_constructor_value): Fold | |
2250 | convert numeric constants. | |
2251 | (gfc_build_constant_array_constructor): The same. | |
2252 | ||
eb74e79b PT |
2253 | 2009-05-10 Paul Thomas <pault@gcc.gnu.org> |
2254 | ||
2255 | PR fortran/38863 | |
2256 | * trans-expr.c (gfc_conv_operator_assign): Remove function. | |
2257 | * trans.h : Remove prototype for gfc_conv_operator_assign. | |
2258 | * trans-stmt.c (gfc_conv_elemental_dependencies): Initialize | |
2259 | derivde types with intent(out). | |
2260 | (gfc_trans_call): Add mask, count1 and invert arguments. Add | |
2261 | code to use mask for WHERE assignments. | |
2262 | (gfc_trans_forall_1): Use new arguments for gfc_trans_call. | |
2263 | (gfc_trans_where_assign): The gfc_symbol argument is replaced | |
2264 | by the corresponding code. If this has a resolved_sym, then | |
2265 | gfc_trans_call is called. The call to gfc_conv_operator_assign | |
2266 | is removed. | |
2267 | (gfc_trans_where_2): Change the last argument in the call to | |
2268 | gfc_trans_where_assign. | |
2269 | * trans-stmt.h : Modify prototype for gfc_trans_call. | |
2270 | * trans.c (gfc_trans_code): Use new args for gfc_trans_call. | |
2271 | ||
cb8e4445 JW |
2272 | 2009-05-08 Janus Weil <janus@gcc.gnu.org> |
2273 | ||
2274 | PR fortran/39876 | |
2275 | * intrinsic.c (gfc_is_intrinsic): Do not add the EXTERNAL attribute if | |
2276 | the symbol is a module procedure. | |
2277 | ||
7e79080a TB |
2278 | 2009-05-08 Tobias Burnus <burnus@net-b.de> |
2279 | ||
2280 | * invoke.texi: Add do/recursion to the -fcheck= summary. | |
2281 | ||
2995ed9a FXC |
2282 | 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> |
2283 | ||
2284 | PR fortran/38830 | |
2285 | * gfortran.texi: Document that we don't support variable FORMAT | |
2286 | expressions. | |
2287 | ||
13c7a7e5 FXC |
2288 | 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> |
2289 | ||
2290 | PR fortran/39576 | |
2291 | * error.c (error_print): Add missing break statement. | |
2292 | ||
6e8cb9be FXC |
2293 | 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> |
2294 | ||
2295 | PR fortran/36382 | |
2296 | * invoke.texi: Document that -fdollar-ok does not allow $ to be | |
2297 | used in IMPLICIT statement. | |
2298 | ||
713485cc JW |
2299 | 2009-05-06 Janus Weil <janus@gcc.gnu.org> |
2300 | Paul Thomas <pault@gcc.gnu.org> | |
2301 | ||
2302 | PR fortran/39630 | |
2303 | * decl.c (match_procedure_interface): New function to match the | |
2304 | interface for a PROCEDURE statement. | |
2305 | (match_procedure_decl): Call match_procedure_interface. | |
2306 | (match_ppc_decl): New function to match the declaration of a | |
2307 | procedure pointer component. | |
2308 | (gfc_match_procedure): Call match_ppc_decl. | |
2309 | (match_binding_attributes): Add new argument 'ppc' and handle the | |
2310 | POINTER attribute for procedure pointer components. | |
2311 | (match_procedure_in_type,gfc_match_generic): Added new argument to | |
2312 | match_binding_attributes. | |
2313 | * dump-parse-tree.c (show_expr,show_components,show_code_node): Handle | |
2314 | procedure pointer components. | |
2315 | * expr.c (free_expr0,gfc_copy_expr,gfc_simplify_expr): Handle EXPR_PPC. | |
2316 | (gfc_check_pointer_assign): Handle procedure pointer components, but no | |
2317 | full checking yet. | |
2318 | (is_proc_ptr_comp): New function to determine if an expression is a | |
2319 | procedure pointer component. | |
2320 | * gfortran.h (expr_t): Add EXPR_PPC. | |
2321 | (symbol_attribute): Add new member 'proc_pointer_comp'. | |
2322 | (gfc_component): Add new member 'formal'. | |
2323 | (gfc_exec_op): Add EXEC_CALL_PPC. | |
2324 | (gfc_get_default_type): Changed first argument. | |
2325 | (is_proc_ptr_comp): Add prototype. | |
2326 | (gfc_match_varspec): Add new argument. | |
2327 | * interface.c (compare_actual_formal): Handle procedure pointer | |
2328 | components. | |
2329 | * match.c (gfc_match_pointer_assignment,match_typebound_call): Handle | |
2330 | procedure pointer components. | |
2331 | * module.c (mio_expr): Handle EXPR_PPC. | |
2332 | * parse.c (parse_derived): Handle procedure pointer components. | |
2333 | * primary.c (gfc_match_varspec): Add new argument 'ppc_arg' and handle | |
2334 | procedure pointer components. | |
2335 | (gfc_variable_attr): Handle procedure pointer components. | |
2336 | (gfc_match_rvalue): Added new argument to gfc_match_varspec and changed | |
2337 | first argument of gfc_get_default_type. | |
2338 | (match_variable): Added new argument to gfc_match_varspec. | |
2339 | * resolve.c (resolve_entries,set_type,resolve_fl_parameter): Changed | |
2340 | first argument of gfc_get_default_type. | |
2341 | (resolve_structure_cons,resolve_actual_arglist): Handle procedure | |
2342 | pointer components. | |
2343 | (resolve_ppc_call): New function to resolve a call to a procedure | |
2344 | pointer component (subroutine). | |
2345 | (resolve_expr_ppc): New function to resolve a call to a procedure | |
2346 | pointer component (function). | |
2347 | (gfc_resolve_expr): Handle EXPR_PPC. | |
2348 | (resolve_code): Handle EXEC_CALL_PPC. | |
2349 | (resolve_fl_derived): Copy the interface for a procedure pointer | |
2350 | component. | |
2351 | (resolve_symbol): Fix overlong line. | |
2352 | * st.c (gfc_free_statement): Handle EXEC_CALL_PPC. | |
2353 | * symbol.c (gfc_get_default_type): Changed first argument. | |
2354 | (gfc_set_default_type): Changed first argument of gfc_get_default_type. | |
2355 | (gfc_add_component): Initialize ts.type to BT_UNKNOWN. | |
2356 | * trans.h (gfc_conv_function_call): Renamed. | |
2357 | * trans.c (gfc_trans_code): Handle EXEC_CALL_PPC. | |
2358 | * trans-expr.c (gfc_conv_component_ref): Ditto. | |
2359 | (gfc_conv_function_val): Rename to 'conv_function_val', add new | |
2360 | argument 'expr' and handle procedure pointer components. | |
2361 | (gfc_conv_operator_assign): Renamed gfc_conv_function_val. | |
2362 | (gfc_apply_interface_mapping_to_expr): Handle EXPR_PPC. | |
2363 | (gfc_conv_function_call): Rename to 'gfc_conv_procedure_call', add new | |
2364 | argument 'expr' and handle procedure pointer components. | |
2365 | (gfc_get_proc_ptr_comp): New function to get the backend decl for a | |
2366 | procedure pointer component. | |
2367 | (gfc_conv_function_expr): Renamed gfc_conv_function_call. | |
2368 | (gfc_conv_structure): Handle procedure pointer components. | |
2369 | * trans-intrinsic.c (gfc_conv_intrinsic_funcall, | |
2370 | conv_generic_with_optional_char_arg): Renamed gfc_conv_function_call. | |
2371 | * trans-stmt.h (gfc_get_proc_ptr_comp): Add prototype. | |
2372 | * trans-stmt.c (gfc_trans_call): Renamed gfc_conv_function_call. | |
2373 | * trans-types.h (gfc_get_ppc_type): Add prototype. | |
2374 | * trans-types.c (gfc_get_ppc_type): New function to build a tree node | |
2375 | for a procedure pointer component. | |
2376 | (gfc_get_derived_type): Handle procedure pointer components. | |
2377 | ||
b050b2de TB |
2378 | 2009-05-06 Tobias Burnus <burnus@net-b.de> |
2379 | ||
2380 | PR fortran/40041 | |
2381 | * resolve.c (resolve_symbol): Print no warning for implicitly | |
2382 | typed intrinsic functions. | |
2383 | ||
210aee68 JW |
2384 | 2009-05-05 Janus Weil <janus@gcc.gnu.org> |
2385 | ||
2386 | PR fortran/39998 | |
2387 | * expr.c (gfc_check_pointer_assign): Check for statement functions and | |
2388 | internal procedures in procedure pointer assignments. | |
2389 | ||
e6a5e544 JW |
2390 | 2009-04-28 Janus Weil <janus@gcc.gnu.org> |
2391 | ||
2392 | PR fortran/39946 | |
2393 | * resolve.c (resolve_symbol): Correctly copy the interface of a | |
2394 | PROCEDURE statement if the interface involves a RESULT variable. | |
2395 | ||
6596e2fe JW |
2396 | 2009-04-28 Janus Weil <janus@gcc.gnu.org> |
2397 | ||
2398 | PR fortran/39930 | |
2399 | PR fortran/39931 | |
2400 | * expr.c (gfc_check_pointer_assign): Correctly detect if the left hand | |
2401 | side is a pointer. | |
2402 | * parse.c (gfc_fixup_sibling_symbols): Don't check for ambiguity. | |
2403 | ||
7d44f531 PT |
2404 | 2009-04-28 Paul Thomas <pault@gcc.gnu.org> |
2405 | ||
2406 | PR fortran/39879 | |
2407 | * trans_expr.c (gfc_conv_procedure_call): Deep copy a derived | |
2408 | type parentheses argument if it is a variable with allocatable | |
2409 | components. | |
2410 | ||
81f40b79 ILT |
2411 | 2009-04-27 Ian Lance Taylor <iant@google.com> |
2412 | ||
2413 | * trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to enum | |
2414 | type. | |
2415 | * trans-io.c (st_parameter_field): Add casts to enum type. | |
2416 | ||
5846213b SK |
2417 | 2009-04-26 Steven G. Kargl <kargl@gcc.gnu.org> |
2418 | ||
2419 | PR fortran/39893 | |
2420 | fortran/data.c (gfc_assign_data_value): If the lvalue is an | |
2421 | assumed character length entity in a data statement, then | |
2422 | return FAILURE to prevent segmentation fault. | |
2423 | ||
92061771 JJ |
2424 | 2009-04-26 Jakub Jelinek <jakub@redhat.com> |
2425 | ||
2426 | * trans-decl.c: Include pointer-set.h. | |
2427 | (nonlocal_dummy_decl_pset, tree nonlocal_dummy_decls): New variables. | |
2428 | (gfc_nonlocal_dummy_array_decl): New function. | |
2429 | (gfc_get_symbol_decl): Call it for non-local dummy args with saved | |
2430 | descriptor. | |
2431 | (gfc_get_symbol_decl): Set DECL_BY_REFERENCE when needed. | |
2432 | (gfc_generate_function_code): Initialize nonlocal_dummy_decl{s,_pset}, | |
2433 | chain it to outermost block's vars, destroy it afterwards. | |
2434 | * Make-lang.in (trans-decl.o): Depend on pointer-set.h. | |
2435 | ||
bc2a4733 JW |
2436 | 2009-04-25 Janus Weil <janus@gcc.gnu.org> |
2437 | ||
2438 | PR fortran/39688 | |
2439 | * decl.c (gfc_match_import): Use 'sym->name' instead of 'name'. | |
2440 | They differ if the symbol has been use-renamed. | |
2441 | ||
32e8bb8e ILT |
2442 | 2009-04-24 Ian Lance Taylor <iant@google.com> |
2443 | ||
2444 | * gfortran.h (enum gfc_symbol_type): New named enum type, broken | |
2445 | out of struct gfc_symbol. | |
2446 | (struct gfc_symbol): Use enum gfc_symbol_type. | |
2447 | (enum gfc_array_ref_dimen_type): New named enum type, broken out | |
2448 | of struct gfc_array_ref). | |
2449 | (struct gfc_array_ref): Use enum gfc_array_ref_dimen_type. | |
2450 | (mod_pointee_as): Update declaration. | |
2451 | * decl.c (add_global_entry): Change type to enum gfc_symbol_type. | |
2452 | (gfc_mod_pointee_as): Change return type to "match". | |
2453 | * module.c (mio_array_ref): Add cast to enum type. | |
2454 | (mio_symbol): Likewise. | |
2455 | * resolve.c (resolve_global_procedure): Change type to enum | |
2456 | gfc_symbol_type. | |
2457 | * trans-io.c (gfc_build_st_parameter): Change type to unsigned | |
2458 | int. | |
2459 | ||
e34ccb4c DK |
2460 | 2009-04-24 Daniel Kraft <d@domob.eu> |
2461 | ||
2462 | * gfortran.h (gfc_get_typebound_proc): Removed as macro, now a function. | |
eebc710d FXC |
2463 | (struct gfc_symtree): Moved "typebound" member inside union. |
2464 | (struct gfc_namespace): Add "tb_sym_root" as new symtree to sort out | |
e34ccb4c DK |
2465 | type-bound procedures there. |
2466 | (gfc_get_tbp_symtree): New procedure. | |
2467 | * symbol.c (tentative_tbp_list): New global. | |
eebc710d FXC |
2468 | (gfc_get_namespace): NULL new "tb_sym_root" member. |
2469 | (gfc_new_symtree): Removed initialization of "typebound" member. | |
e34ccb4c DK |
2470 | (gfc_undo_symbols): Process list of tentative tbp's. |
2471 | (gfc_commit_symbols): Ditto. | |
2472 | (free_tb_tree): New method. | |
2473 | (gfc_free_namespace): Call it. | |
2474 | (gfc_get_typebound_proc): New method. | |
2475 | (gfc_get_tbp_symtree): New method. | |
2476 | (gfc_find_typebound_proc): Adapt to structural changes of gfc_symtree | |
2477 | and gfc_namespace with regards to tbp's. | |
2478 | * dump-parse-tree.c (show_typebound): Ditto. | |
2479 | * primary.c (gfc_match_varspec): Ditto. Don't reference tbp-symbol | |
2480 | as it isn't a symbol any longer. | |
2481 | * module.c (mio_typebound_symtree): Adapt to changes. | |
eebc710d FXC |
2482 | (mio_typebound_proc): Ditto, create symtrees using "gfc_get_tbp_symtree" |
2483 | rather than "gfc_get_sym_tree". | |
e34ccb4c DK |
2484 | (mio_f2k_derived): Ditto. |
2485 | * decl.c (match_procedure_in_type): Ditto. | |
2486 | (gfc_match_generic): Ditto. Don't reference tbp-symbol. | |
2487 | * resolve.c (check_typebound_override): Adapt to changes. | |
2488 | (resolve_typebound_generic): Ditto. | |
2489 | (resolve_typebound_procedures): Ditto. | |
2490 | (ensure_not_abstract_walker): Ditto. | |
2491 | (ensure_not_abstract): Ditto. | |
2492 | (resolve_typebound_procedure): Ditto, ignore erraneous symbols (for | |
2493 | instance, through removed tentative ones). | |
2494 | * gfc-internals.texi (Type-bound procedures): Document changes. | |
2495 | ||
87526ff1 JW |
2496 | 2009-04-24 Janus Weil <janus@gcc.gnu.org> |
2497 | ||
2498 | PR fortran/39861 | |
2499 | PR fortran/39864 | |
2500 | * symbol.c (gfc_copy_formal_args_intr): Set attr.flavor and attr.dummy | |
2501 | for the formal arguments. | |
2502 | ||
d1b38208 TG |
2503 | 2009-04-21 Taras Glek <tglek@mozilla.com> |
2504 | ||
2505 | * f95-lang.c: Update GTY annotations to new syntax. | |
2506 | * trans-intrinsic.c: Likewise. | |
2507 | * trans-io.c: Likewise. | |
2508 | * trans.h: Likewise. | |
2509 | ||
c73b6478 JW |
2510 | 2009-04-22 Janus Weil <janus@gcc.gnu.org> |
2511 | ||
2512 | PR fortran/39735 | |
2513 | * decl.c (add_hidden_procptr_result): Bugfix for procptr results. | |
2514 | (match_procedure_decl): Set if_source. | |
2515 | * expr.c (gfc_check_pointer_assign): Bugfix: Return after error. | |
2516 | And: Check interface also for IFSRC_UNKNOWN (return type may be known). | |
2517 | * gfortran.h (typedef enum ifsrc): Remove IFSRC_USAGE, | |
2518 | add documentation. Rename copy_formal_args and copy_formal_args_intr. | |
2519 | * interface.c (gfc_compare_interfaces): Check for return types, | |
2520 | handle IFSRC_UNKNOWN. | |
2521 | (compare_intr_interfaces,compare_actual_formal_intr): Obsolete, removed. | |
2522 | (gfc_procedure_use): Modified handling of intrinsics. | |
2523 | * intrinsic.c (add_functions): Bugfix for "dim". | |
2524 | * resolve.c (resolve_intrinsic): New function to resolve intrinsics, | |
2525 | which copies the interface from isym to sym. | |
2526 | (resolve_procedure_expression,resolve_function): Use new function | |
2527 | 'resolve_intrinsic'. | |
2528 | (resolve_symbol): Add function attribute for externals with return type | |
2529 | and use new function 'resolve_intrinsic'. | |
2530 | * symbol.c (ifsrc_types): Remove string for IFSRC_USAGE. | |
2531 | (copy_formal_args): Renamed to gfc_copy_formal_args. | |
2532 | (copy_formal_args_intr): Renamed to gfc_copy_formal_args_intr. | |
2533 | * trans-const.c (gfc_conv_const_charlen): Handle cl==NULL. | |
2534 | ||
ad41bd84 JM |
2535 | 2009-04-21 Joseph Myers <joseph@codesourcery.com> |
2536 | ||
2537 | * ChangeLog, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004, | |
2538 | ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008, | |
2539 | ChangeLog.ptr, config-lang.in, ioparm.def, mathbuiltins.def: Add | |
2540 | copyright and license notices. | |
2541 | * ChangeLog, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, | |
2542 | ChangeLog-2008: Correct dates. | |
2543 | ||
47b0b4fa TB |
2544 | 2009-04-20 Tobias Burnus <burnus@net-b.de> |
2545 | ||
2546 | PR fortran/39811 | |
2547 | * scanner.c (load_line): Fix bogus "&" compile-time diagnostic. | |
2548 | ||
c867b7b6 PT |
2549 | 2009-04-20 Paul Thomas <pault@gcc.gnu.org> |
2550 | ||
2551 | PR fortran/39800 | |
2552 | * resolve.c (is_sym_host_assoc): New function. | |
2553 | (resolve_fl_derived): Call it when checking PRIVATE components | |
2554 | of PUBLIC derived types. Change gfc_error to a gfc_notify_std | |
2555 | with std=f2003. | |
2556 | (resolve_fl_namelist): Call it twice to check for host | |
2557 | association. | |
2558 | ||
8fa2df72 ILT |
2559 | 2009-04-20 Ian Lance Taylor <iant@google.com> |
2560 | ||
2561 | * module.c (import_iso_c_binding_module): Add casts to enum type. | |
2562 | * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Change op to enum | |
2563 | tree_code. | |
2564 | (gfc_conv_intrinsic_anyall): Likewise. | |
2565 | (gfc_conv_intrinsic_arith): Likewise. | |
2566 | (gfc_conv_intrinsic_minmaxloc): Likewise. | |
2567 | (gfc_conv_intrinsic_minmaxval): Likewise. | |
2568 | (gfc_conv_intrinsic_bitop): Likewise. | |
2569 | (gfc_conv_intrinsic_singlebitop): Likewise. | |
2570 | (gfc_conv_intrinsic_strcmp): Likewise. | |
2571 | ||
34d01e1d VL |
2572 | 2009-04-20 Vasilis Liaskovitis <vliaskov@gmail.com> |
2573 | Jakub Jelinek <jakub@redhat.com> | |
2574 | ||
2575 | PR fortran/35423 | |
2576 | * trans.h (OMPWS_WORKSHARE_FLAG, OMPWS_CURR_SINGLEUNIT, | |
2577 | OMPWS_SCALARIZER_WS, OMPWS_NOWAIT): Define. | |
2578 | (ompws_flags): New extern decl. | |
2579 | * trans-array.c (gfc_trans_scalarized_loop_end): Build OMP_FOR | |
2580 | for the outer dimension if ompws_flags allow it. | |
2581 | * trans.c (gfc_generate_code): Clear ompws_flags. | |
2582 | * trans-expr.c (gfc_trans_assignment_1): Allow worksharing | |
2583 | array assignments inside of !$omp workshare. | |
2584 | * trans-stmt.c (gfc_trans_where_3): Similarly for where statements | |
2585 | and constructs. | |
2586 | * trans-openmp.c (ompws_flags): New variable. | |
2587 | (gfc_trans_omp_workshare): Rewritten. | |
2588 | ||
cadb8f42 DK |
2589 | 2009-04-11 Daniel Kraft <d@domob.eu> |
2590 | ||
2591 | PR fortran/37746 | |
eebc710d | 2592 | * gfortran.h (struct gfc_charlen): New field "passed_length" to store |
cadb8f42 DK |
2593 | the actual passed string length for dummy arguments. |
2594 | * trans-decl.c (gfc_create_string_length): Formatting fixes and added | |
2595 | assertion, moved a local variable into the innermost block it is needed. | |
2596 | (create_function_arglist): Removed TODO about the check being | |
2597 | implemented and initialize cl->passed_length here. | |
2598 | (add_argument_checking): New method. | |
2599 | (gfc_generate_function_code): Call the argument checking method. | |
2600 | ||
d1e49db4 JW |
2601 | 2009-04-11 Janus Weil <janus@gcc.gnu.org> |
2602 | ||
2603 | PR fortran/39692 | |
2604 | * symbol.c (check_conflict): Reject procedure pointers for -std=f95. | |
2605 | ||
2606 | 2009-04-11 Daniel Franke <franke.daniel@gmail.com> | |
568eecad DF |
2607 | |
2608 | * resolve.c (resolve_global_procedure): Enable whole-file checking for | |
2609 | procedures that are declared later in the file. | |
2610 | ||
a862775d PB |
2611 | 2009-04-10 Paolo Bonzini <bonzini@gnu.org> |
2612 | ||
2613 | PR middle-end/39701 | |
2614 | * trans.c (gfc_allocate_with_status): Fix type mismatches | |
2615 | on "pstat == 0". | |
2616 | ||
045ac367 DF |
2617 | 2009-04-10 Daniel Franke <franke.daniel@gmail.com> |
2618 | ||
2619 | PR fortran/38709 | |
2620 | * expr.c (find_array_section): Leave early on zero-sized arrays. | |
2621 | ||
3070bab4 JW |
2622 | 2009-04-09 Janus Weil <janus@gcc.gnu.org> |
2623 | ||
2624 | PR fortran/36704 | |
2625 | * decl.c (add_hidden_procptr_result): New function for handling | |
2626 | procedure pointer return values by adding a hidden result variable. | |
2627 | (variable_decl,match_procedure_decl,gfc_match_function_decl, | |
2628 | gfc_match_subroutine,gfc_match_end,attr_decl1): Handle procedure pointer | |
2629 | return values. | |
2630 | * parse.c (parse_interface): Add EXTERNAL attribute only after | |
2631 | FUNCTION/SUBROUTINE declaration is complete. | |
2632 | * primary.c (replace_hidden_procptr_result): New function for replacing | |
2633 | function symbol by hidden result variable. | |
2634 | (gfc_match_rvalue,match_variable): Replace symbol by hidden result | |
2635 | variable. | |
2636 | * resolve.c (resolve_contained_fntype,resolve_function,resolve_variable, | |
2637 | resolve_symbol): Allow for procedure pointer function results. | |
2638 | (resolve_fl_procedure): Conflict detection moved here from | |
2639 | 'check_conflict'. | |
2640 | * symbol.c (gfc_check_function_type): Allow for procedure pointer | |
2641 | function results. | |
2642 | (check_conflict): Move some conflict detection to resolution stage. | |
2643 | * trans-types.c (gfc_sym_type,gfc_get_function_type): Handle hidden | |
2644 | result variables. | |
2645 | ||
dead0bae JJ |
2646 | 2009-04-08 Jakub Jelinek <jakub@redhat.com> |
2647 | ||
2648 | * trans-types.c (gfc_init_types): Ensure gfc_integer_types doesn't | |
2649 | contain TYPE_STRING_FLAG types. | |
2650 | ||
cba2a54e JB |
2651 | 2009-04-08 Janne Blomqvist <jb@gcc.gnu.org> |
2652 | ||
2653 | PR fortran/39670 | |
2654 | * invoke.texi (fdollar-ok): Fix typo. | |
2655 | ||
f4a55802 DF |
2656 | 2009-04-08 Daniel Franke <franke.daniel@gmail.com> |
2657 | ||
2658 | PR fortran/39670 | |
2659 | * invoke.texi (fdollar-ok): Clarify limitations. | |
2660 | ||
bafc96b4 PT |
2661 | 2009-04-08 Paul Thomas <pault@gcc.gnu.org> |
2662 | ||
2663 | PR fortran/38863 | |
2664 | * trans-array.c (gfc_trans_deferred_array): Return if this | |
2665 | is a result variable. | |
2666 | ||
13d138bf JW |
2667 | 2009-04-07 Janus Weil <janus@gcc.gnu.org> |
2668 | ||
2669 | PR fortran/38152 | |
2670 | * trans-decl.c (gfc_get_symbol_decl): Correctly set decl location for | |
2671 | procedure pointer decls. | |
2672 | ||
3afadac3 JW |
2673 | 2009-04-07 Janus Weil <janus@gcc.gnu.org> |
2674 | ||
c22ba5ff | 2675 | PR fortran/38290 |
3afadac3 JW |
2676 | * expr.c (gfc_check_pointer_assign): Enable interface check for |
2677 | procedure pointers. | |
2678 | * gfortran.h: Add copy_formal_args_intr. | |
2679 | * interface.c (gfc_compare_interfaces): Call gfc_compare_intr_interfaces | |
2680 | if second argument is an intrinsic. | |
2681 | (compare_intr_interfaces): Correctly set attr.function, attr.subroutine | |
2682 | and ts. | |
2683 | (compare_parameter): Call gfc_compare_interfaces also for intrinsics. | |
2684 | * resolve.c (resolve_specific_f0,resolve_specific_s0): Don't resolve | |
2685 | intrinsic interfaces here. Must happen earlier. | |
2686 | (resolve_symbol): Resolution of intrinsic interfaces moved here from | |
2687 | resolve_specific_..., and formal args are now copied from intrinsic | |
2688 | interfaces. | |
2689 | * symbol.c (copy_formal_args_intr): New function to copy the formal | |
2690 | arguments from an intinsic procedure. | |
2691 | ||
ea0a374b PT |
2692 | 2009-04-06 Paul Thomas <pault@gcc.gnu.org> |
2693 | ||
2694 | PR fortran/38863 | |
2695 | * dependency.c (ref_same_as_full_array): New function. | |
2696 | (gfc_dep_resolver): Call it. | |
2697 | ||
1d146030 JW |
2698 | 2009-04-06 Janus Weil <janus@gcc.gnu.org> |
2699 | ||
eebc710d FXC |
2700 | PR fortran/39414 |
2701 | * decl.c (match_procedure_decl): Fix double declaration problems with | |
2702 | PROCEDURE statements. | |
2703 | * symbol.c (gfc_add_type): Ditto. | |
1d146030 | 2704 | |
59e36b72 PT |
2705 | 2009-04-06 Paul Thomas <pault@gcc.gnu.org> |
2706 | ||
eebc710d FXC |
2707 | PR fortran/36091 |
2708 | * trans-array.c (gfc_conv_array_ref): If the symbol has the | |
59e36b72 PT |
2709 | temporary attribute use the array_spec for the bounds. |
2710 | * gfortran.h : Add the temporary field to the structure | |
2711 | 'symbol_attribute'. | |
2712 | * trans-stmt.c (forall_make_variable_temp): Set the symbol's | |
2713 | temporary attribute. | |
2714 | ||
beb64b4a DF |
2715 | 2009-04-05 Daniel Franke <franke.daniel@gmail.com> |
2716 | ||
2717 | PR fortran/29458 | |
2718 | * trans-array.c (gfc_trans_array_constructor_value): Shadow | |
2719 | implied do-loop variable to avoid spurious middle-end warnings. | |
2720 | ||
cf7d2eb0 TB |
2721 | 2009-04-04 Tobias Burnus <burnus@net-b.de> |
2722 | ||
2723 | PR fortran/39577 | |
2724 | * trans-decl.c (gfc_generate_function_code): Move recursive | |
2725 | check to the right position. | |
2726 | ||
6f85546f PT |
2727 | 2009-04-04 Paul Thomas <pault@gcc.gnu.org> |
2728 | ||
2729 | PR fortran/37614 | |
2730 | * trans-common.c (translate_common): Do not offset the whole | |
2731 | coomon block. | |
2732 | ||
6f9c9d6d TB |
2733 | 2009-04-03 Tobias Burnus <burnus@net-b.de> |
2734 | ||
2735 | PR fortran/39594 | |
2736 | * resolve.c (resolve_common_vars): Add FL_VARIABLE to symbol | |
2737 | if it is not a procedure pointer. | |
2738 | * primary.c (match_actual_arg): Ditto. | |
2739 | ||
47580d22 JM |
2740 | 2009-03-31 Joseph Myers <joseph@codesourcery.com> |
2741 | ||
2742 | PR preprocessor/15638 | |
2743 | * cpp.c (cb_cpp_error): Handle CPP_DL_FATAL. | |
2744 | ||
3759634f SK |
2745 | 2009-03-30 Steven G. Kargl <kargls@comcast.net> |
2746 | ||
2747 | PR fortran/38389 | |
2748 | * trans-stmt.c(gfc_trans_allocate): Add translation of ERRMSG. | |
2749 | (gfc_trans_deallocate): Add translation of ERRMSG. Remove stale | |
2750 | comments. Minor whitespace cleanup. | |
2751 | * resolve.c(is_scalar_expr_ptr): Whitespace cleanup. | |
2752 | (resolve_deallocate_expr (gfc_expr *e): Update error message. | |
2753 | (resolve_allocate_expr): Remove dead code. Update error message. | |
2754 | Move error checking to ... | |
2755 | (resolve_allocate_deallocate): ... here. Add additional error | |
2756 | checking for STAT, ERRMSG, and allocate-objects. | |
2757 | * match.c(gfc_match_allocate,gfc_match_deallocate): Parse ERRMSG. | |
2758 | Check for redundant uses of STAT and ERRMSG. Reword error message | |
2759 | and add checking for pointer, allocatable, and proc_pointer attributes. | |
2760 | ||
71a7778c PT |
2761 | 2009-03-30 Paul Thomas <pault@gcc.gnu.org> |
2762 | ||
2763 | PR fortran/22571 | |
2764 | PR fortran/26227 | |
2765 | PR fortran/24886 | |
2766 | * symbol.c : Add gfc_global_ns_list. | |
2767 | * decl.c (add_global_entry): Set the namespace ('ns') field. | |
2768 | * gfortran.h : Add the resolved field to gfc_namespace. Add the | |
2769 | namespace ('ns') field to gfc_gsymbol. Add flag_whole_file to | |
2770 | gfc_option_t. Add the prototype for gfc_free_dt_list. | |
2771 | * lang.opt : Add the whole-file option. | |
2772 | * invoke.texi : Document the whole-file option. | |
2773 | * resolve.c (resolve_global_procedure): If the fwhole-file | |
2774 | option is set, reorder gsymbols to ensure that translation is | |
2775 | in the right order. Resolve the gsymbol's namespace if that | |
2776 | has not occurred and then check interfaces. | |
2777 | (resolve_function): Move call to resolve_global_procedure. | |
2778 | (resolve_call): The same. | |
2779 | (resolve_codes): Store the current labels_obstack. | |
2780 | (gfc_resolve) : Return if the namespace is already resolved. | |
2781 | trans-decl.c (gfc_get_extern_function_decl): If the whole_file | |
2782 | option is selected, use the backend_decl of a gsymbol, if it is | |
2783 | available. | |
2784 | parse.c (add_global_procedure, add_global_program): If the flag | |
2785 | whole-file is set, add the namespace to the gsymbol. | |
2786 | (gfc_parse_file): On -fwhole-file, put procedure namespaces on | |
2787 | the global namespace list. Rearrange to do resolution of all | |
2788 | the procedures in a file, followed by their translation. | |
2789 | * options.c (gfc_init_options): Add -fwhole-file. | |
2790 | (gfc_handle_option): The same. | |
2791 | ||
f6d53468 UW |
2792 | 2009-03-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> |
2793 | ||
2794 | * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_HUGE_VAL | |
2795 | family of intrinsics instead of BUILT_IN_INF family. | |
2796 | * trans-intrinsics.c (gfc_conv_intrinsic_nearest): Use | |
2797 | BUILT_IN_HUGE_VAL instead of BUILT_IN_INF. | |
2798 | ||
665733c1 JJ |
2799 | 2009-03-30 Jakub Jelinek <jakub@redhat.com> |
2800 | ||
2801 | * trans-types.c (gfc_sym_type, gfc_return_by_reference): For | |
2802 | sym->attr.result check sym->ns->proc_name->attr.is_bind_c. | |
2803 | ||
8ce94e44 JM |
2804 | 2009-03-30 Joseph Myers <joseph@codesourcery.com> |
2805 | ||
2806 | PR rtl-optimization/323 | |
2807 | * options.c (gfc_post_options): Set | |
2808 | flag_excess_precision_cmdline. Give an error for | |
2809 | -fexcess-precision=standard for processors where the option is | |
2810 | significant. | |
2811 | ||
148e4216 JM |
2812 | 2009-03-29 Joseph Myers <joseph@codesourcery.com> |
2813 | ||
2814 | PR preprocessor/34695 | |
2815 | * cpp.c (cb_cpp_error): New. | |
2816 | (gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings. | |
2817 | Don't check cpp_errors (cpp_in). | |
2818 | (gfc_cpp_init_0): Set cb->error. | |
2819 | ||
6bb62671 SK |
2820 | 2009-03-29 Steven G. Kargl <kargl@gcc.gnu.org> |
2821 | ||
2822 | PR fortran/38823 | |
2823 | * gfortran.h: Add ARITH_PROHIBIT to arith enum. | |
2824 | expr.c (gfc_match_init_expr): Add global variable init_flag to | |
2825 | flag matching an initialization expression. | |
2826 | (check_intrinsic_op): Move no longer reachable error message to ... | |
2827 | * arith.c (arith_power): ... here. Remove gfc_ prefix in | |
2828 | gfc_arith_power. Use init_flag. Allow constant folding of x**y | |
2829 | when y is REAL or COMPLEX. | |
2830 | (eval_intrinsic): Remove restriction that y in x**y must be INTEGER | |
2831 | for constant folding. | |
2832 | * gfc_power: Update gfc_arith_power to arith_power | |
2833 | ||
b0e5fa94 DK |
2834 | 2009-03-29 Daniel Kraft <d@domob.eu> |
2835 | ||
2836 | PR fortran/37423 | |
eebc710d | 2837 | * gfortran.h (struct gfc_typebound_proc): Added new flag "deferred" and |
b0e5fa94 DK |
2838 | added a comment explaining DEFERRED binding handling. |
2839 | * decl.c (match_binding_attributes): Really match DEFERRED attribute. | |
2840 | (match_procedure_in_type): Really match PROCEDURE(interface) syntax | |
2841 | and do some validity checks for DEFERRED and this construct. | |
2842 | * module.c (binding_overriding): New string constant for DEFERRED. | |
2843 | (mio_typebound_proc): Module-IO DEFERRED flag. | |
2844 | * resolve.c (check_typebound_override): Ensure that a non-DEFERRED | |
2845 | binding is not overridden by a DEFERRED one. | |
2846 | (resolve_typebound_procedure): Allow abstract interfaces as targets | |
2847 | for DEFERRED bindings. | |
2848 | (ensure_not_abstract_walker), (ensure_not_abstract): New methods. | |
eebc710d | 2849 | (resolve_fl_derived): Use new "ensure_not_abstract" method for |
b0e5fa94 DK |
2850 | non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED |
2851 | binding is overridden. | |
2852 | (check_typebound_baseobject): New method. | |
2853 | (resolve_compcall), (resolve_typebound_call): Check base-object of | |
2854 | the type-bound procedure call. | |
2855 | * gfc-internals.texi (Type-bound procedures): Document a little bit | |
2856 | about internal handling of DEFERRED bindings. | |
2857 | ||
3f0a1331 | 2858 | 2009-03-29 Tobias Schlüter <tobi@gcc.gnu.org> |
d80c695f TS |
2859 | |
2860 | PR fortran/38507 | |
2861 | * gfortran.h (gfc_st_label): Fix comment. | |
2862 | (gfc_exec_op): Add statement code EXEC_END_BLOCK for end of block. | |
2863 | * parse.c (accept_statement): Use EXEC_END_BLOCK for END IF and | |
2864 | END SELECT with labels. | |
2865 | (check_do_closure): Fix formatting. | |
2866 | (parse_do_block): Fix typo in error message. | |
2867 | * resolve.c (code_stack): Remove tail member. Update comment to | |
2868 | new use of reachable_labels. | |
2869 | (reachable_labels): Rename to ... | |
2870 | (find_reachable_labels): ... this. Overhaul. Update preceding | |
2871 | comment. | |
2872 | (resolve_branch): Fix comment preceding function. Rewrite. | |
2873 | (resolve_code): Update call to find_reachable_labels. Add code to | |
2874 | deal with EXEC_END_BLOCK. | |
2875 | * st.c (gfc_free_statement): Add code to deal with EXEC_END_BLOCK. | |
2876 | Add 2009 to copyright years. | |
2877 | * trans.c (gfc_trans_code): Likewise on both counts. | |
2878 | ||
e49be8f7 PT |
2879 | 2009-03-31 Paul Thomas <pault@gcc.gnu.org> |
2880 | ||
2881 | PR fortran/38917 | |
2882 | * expr.c (gfc_check_assign): Allow pointer components when | |
2883 | checking for NULL. | |
2884 | ||
2885 | PR fortran/38918 | |
2886 | * resolve.c (check_data_variable): Treat pointer arrays with | |
2887 | scalars. | |
2888 | ||
bf0d171a PT |
2889 | 2009-03-31 Paul Thomas <pault@gcc.gnu.org> |
2890 | ||
2891 | PR fortran/38915 | |
2892 | * trans-expr.c (gfc_trans_assignment_1): Ensure temporaries | |
2893 | have a string_length. | |
2894 | ||
33abc845 TB |
2895 | 2009-03-28 Tobias Burnus <burnus@net-b.de> |
2896 | ||
2897 | PR fortran/34656 | |
2898 | * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do): | |
2899 | Add GFC_RTCHECK_DO support. | |
2900 | * option.c (gfc_handle_runtime_check_option): Enable GFC_RTCHECK_DO. | |
2901 | * invoke.texi (-fcheck): Document "do" option. | |
2902 | ||
5d63a35f PT |
2903 | 2009-03-28 Paul Thomas <pault@gcc.gnu.org> |
2904 | ||
33abc845 TB |
2905 | PR fortran/38538 |
2906 | * trans-array.c (get_elemental_fcn_charlen): Remove. | |
5d63a35f PT |
2907 | (get_array_charlen): New function to replace previous. |
2908 | ||
6b02d5f7 PT |
2909 | 2009-03-28 Paul Thomas <pault@gcc.gnu.org> |
2910 | ||
2911 | PR fortran/38765 | |
2912 | * parse.c (parse_derived): Do not break on finding pointer, | |
2913 | allocatable or private components. | |
2914 | ||
43998ed9 TB |
2915 | 2009-03-28 Tobias Burnus <burnus@net-b.de> |
2916 | ||
2917 | PR fortran/32626 | |
2918 | * option.c (gfc_handle_runtime_check_option): Enable recursion check. | |
2919 | * trans-decl.c (gfc_generate_function_code): Add recursion check. | |
2920 | * invoke.texi (-fcheck): Add recursive option. | |
2921 | ||
dc186969 TB |
2922 | 2009-03-28 Tobias Burnus <burnus@net-b.de> |
2923 | ||
2924 | PR fortran/38432 | |
2925 | * resolve.c (gfc_resolve_iterator): Add zero-loop warning. | |
2926 | ||
d3d3011f FXC |
2927 | 2009-03-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> |
2928 | Paul Thomas <pault@gcc.gnu.org> | |
2929 | Tobias Burnus <burnus@net-b.de> | |
2930 | ||
2931 | * gfortran.h (gfc_option_t): Add rtcheck. | |
43998ed9 | 2932 | * lang.opt: New option -fcheck. |
d3d3011f | 2933 | * libgfortran.h: Add GFC_RTCHECK_* constants. |
43998ed9 | 2934 | * invoke.texi: Document -fcheck. |
d3d3011f FXC |
2935 | * options.c (gfc_handle_runtime_check_option): New function. |
2936 | (gfc_init_options,gfc_post_options,gfc_handle_option): | |
43998ed9 | 2937 | Add -fcheck option. |
d3d3011f | 2938 | |
628c189e RG |
2939 | 2009-03-27 Richard Guenther <rguenther@suse.de> |
2940 | ||
2941 | * trans-array.c (gfc_conv_descriptor_data_addr): Use | |
2942 | gfc_build_addr_expr instead of build_fold_addr_expr. | |
2943 | (gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value, | |
2944 | gfc_trans_constant_array_constructor, gfc_conv_array_data, | |
2945 | gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise. | |
2946 | * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable, | |
2947 | gfc_conv_function_val, gfc_conv_operator_assign, | |
2948 | gfc_conv_subref_array_arg, gfc_conv_function_call, | |
2949 | gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise. | |
2950 | * trans-intrinsic.c (gfc_conv_intrinsic_exponent, | |
2951 | gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate, | |
2952 | gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char, | |
2953 | gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing, | |
2954 | gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent, | |
2955 | gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer, | |
2956 | gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise. | |
2957 | * trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref, | |
2958 | gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close, | |
2959 | build_filepos, gfc_trans_inquire, gfc_trans_wait, | |
2960 | nml_get_addr_expr, transfer_namelist_element, build_dt, | |
2961 | gfc_trans_dt_end, transfer_array_component, transfer_expr, | |
2962 | transfer_array_desc, gfc_trans_transfer): Likewise. | |
2963 | * trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise. | |
2964 | * trans.c (gfc_build_addr_expr): Mark the base of the address | |
2965 | TREE_ADDRESSABLE. | |
2966 | ||
346a77d1 TB |
2967 | 2009-03-27 Tobias Burnus <burnus@net-b.de> |
2968 | ||
2969 | * gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN. | |
2970 | (gfc_expr): Add is_snan. | |
2971 | * trans-const.c (gfc_conv_mpfr_to_tree): Support SNaN. | |
2972 | (gfc_conv_constant_to_tree): Update call to gfc_conv_mpfr_to_tree. | |
2973 | * trans-const.h (gfc_conv_mpfr_to_tree): Update prototype. | |
2974 | * resolve.c (build_default_init_expr): Update call. | |
2975 | * target-memory.c (encode_float): Ditto. | |
2976 | * trans-intrinsic.c (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod, | |
2977 | ||
9a0f3e86 RW |
2978 | 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> |
2979 | ||
2980 | * lang.opt: Unify help texts for -I, -Wconversion, -d, -fopenmp, | |
2981 | and -fpreprocessed. | |
2982 | ||
47ed69db AO |
2983 | 2009-03-06 Alexandre Oliva <aoliva@redhat.com> |
2984 | ||
2985 | * simplify.c (gfc_simplify_transfer): Zero-initialize the | |
2986 | buffer. | |
2987 | ||
30929a13 TB |
2988 | 2009-02-27 Tobias Burnus <burnus@net-b.de> |
2989 | ||
2990 | PR fortran/39309 | |
2991 | * module.c (read_md5_from_module_file): Add missing quote. | |
2992 | ||
99b54b33 TB |
2993 | 2009-02-27 Tobias Burnus <burnus@net-b.de> |
2994 | ||
2995 | PR fortran/39309 | |
2996 | * module.c (read_md5_from_module_file): Include mod version | |
2997 | in had-changed test. | |
2998 | ||
489ec4e3 PT |
2999 | 2009-02-26 Paul Thomas <pault@gcc.gnu.org> |
3000 | ||
3001 | PR fortran/39295 | |
3002 | * interface.c (compare_type_rank_if): Return 1 if the symbols | |
3003 | are the same and deal with external procedures where one is | |
3004 | identified to be a function or subroutine by usage but the | |
3005 | other is not. | |
3006 | ||
c1cfed03 PT |
3007 | 2009-02-26 Paul Thomas <pault@gcc.gnu.org> |
3008 | ||
3009 | PR fortran/39292 | |
3010 | * trans-array.c (gfc_conv_array_initializer): Convert all | |
3011 | expressions rather than ICEing. | |
3012 | ||
38432148 | 3013 | 2009-02-21 Thomas Koenig <tkoenig@gcc.gnu.org> |
543af7ab TK |
3014 | |
3015 | PR fortran/38914 | |
3016 | * array.c (ref_dimen_size): Rename to gfc_ref_dimen_size, | |
3017 | make global. Change function name in error messages. | |
3018 | (ref_size): Change ref_dimen_size to gfc_ref_dimen_size. | |
3019 | (gfc_array_ref_shape): Likewise. | |
3020 | * gfortran.h: Add prototype for gfc_ref_dimen_size. | |
3021 | * simplify.c (simplify_bound_dim): Add ref argument. | |
3022 | If the reference isn't a full array, return one for | |
3023 | the lower bound and the extent for the upper bound. | |
3024 | (simplify_bound): For array sections, take as from the | |
3025 | argument. Add reference to all to simplify_bound_dim. | |
3026 | ||
9c747b97 DF |
3027 | 2009-02-19 Daniel Franke <franke.daniel@gmail.com> |
3028 | ||
3029 | * scanner.c (load_line): At end of line, skip '\r' without setting | |
3030 | the truncation flag. | |
3031 | ||
71810d0e DK |
3032 | 2009-02-18 Daniel Kraft <d@domob.eu> |
3033 | ||
3034 | * gfortran.texi: New chapter about compiler characteristics. | |
3035 | (Compiler Characteristics): Document KIND type parameters here. | |
3036 | ||
8c685e61 TB |
3037 | 2009-02-18 Tobias Burnus <burnus@net-b.de> |
3038 | ||
3039 | * intrinsic.texi (MALLOC): Make example more portable. | |
3040 | ||
2d05f84d MM |
3041 | 2009-02-13 Mikael Morin <mikael.morin@tele2.fr> |
3042 | ||
3043 | PR fortran/38259 | |
3044 | * module.c (gfc_dump_module,gfc_use_module): Add module | |
3045 | version number. | |
3046 | ||
686c82b5 PT |
3047 | 2009-02-13 Paul Thomas <pault@gcc.gnu.org> |
3048 | ||
3049 | PR fortran/36703 | |
3050 | PR fortran/36528 | |
3051 | * trans-expr.c (gfc_conv_function_val): Stabilize Cray-pointer | |
3052 | function references to ensure that a valid expression is used. | |
3053 | (gfc_conv_function_call): Pass Cray pointers to procedures. | |
3054 | ||
d4f4bc84 JJ |
3055 | 2009-02-03 Jakub Jelinek <jakub@redhat.com> |
3056 | ||
3057 | * gfortranspec.c (lang_specific_driver): Update copyright notice | |
3058 | dates. | |
3059 | ||
61a39615 PT |
3060 | 2009-01-28 Paul Thomas <pault@gcc.gnu.org> |
3061 | ||
3062 | PR fortran/38852 | |
3063 | PR fortran/39006 | |
3064 | * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use the array | |
3065 | descriptor ubound for UBOUND, when the array lbound == 1. | |
3066 | ||
79e5286c DK |
3067 | 2009-01-27 Daniel Kraft <d@domob.eu> |
3068 | ||
3069 | PR fortran/38883 | |
3070 | * trans-stmt.c (gfc_conv_elemental_dependencies): Create temporary | |
3071 | for the real type needed to make it work for subcomponent-references. | |
3072 | ||
210879b8 DK |
3073 | 2009-01-21 Daniel Kraft <d@domob.eu> |
3074 | ||
3075 | * trans-stmt.c (gfc_conv_elemental_dependencies): Cleaned up comment. | |
3076 | ||
5b3b1d09 PT |
3077 | 2009-01-20 Paul Thomas <pault@gcc.gnu.org> |
3078 | ||
3079 | PR fortran/38907 | |
3080 | * resolve.c (check_host_association): Remove the matching to | |
3081 | correct an incorrect host association and use manipulation of | |
3082 | the expression instead. | |
3083 | ||
872fbc1a TB |
3084 | 2009-01-20 Tobias Burnus <burnus@net-b.de> |
3085 | ||
3086 | * invoke.texi (RANGE): RANGE also takes INTEGER arguments. | |
3087 | ||
9295d9ed MM |
3088 | 2009-01-19 Mikael Morin <mikael.morin@tele2.fr> |
3089 | ||
3090 | PR fortran/38859 | |
3091 | * simplify.c (simplify_bound): Don't use array specification | |
3092 | if variable or component has subsequent references. | |
3093 | ||
e775e6b6 PT |
3094 | 2009-01-17 Paul Thomas <pault@gcc.gnu.org> |
3095 | ||
3096 | PR fortran/38657 | |
3097 | * module.c (write_common_0): Add argument 'this_module' and | |
3098 | check that non-use associated common blocks are written first. | |
3099 | (write_common): Call write_common_0 twice, once with true and | |
3100 | then with false. | |
3101 | ||
c41fea4a PT |
3102 | 2009-01-17 Paul Thomas <pault@gcc.gnu.org> |
3103 | ||
3104 | PR fortran/34955 | |
3105 | * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Has | |
3106 | been absorbed into gfc_conv_intrinsic_transfer. All | |
3107 | references to it in trans-intrinsic.c have been changed | |
3108 | accordingly. PR fixed by using a temporary for scalar | |
3109 | character transfer, when the source is shorter than the | |
3110 | destination. | |
3111 | ||
6e7ff326 PT |
3112 | 2009-01-17 Paul Thomas <pault@gcc.gnu.org> |
3113 | ||
3114 | PR fortran/38657 | |
3115 | * module.c (write_common_0): Revert patch of 2009-01-05. | |
3116 | ||
6e0d2de7 JW |
3117 | 2009-01-16 Janus Weil <janus@gcc.gnu.org> |
3118 | ||
3119 | PR fortran/38152 | |
3120 | * expr.c (gfc_check_pointer_assign): Allow use-associated procedure | |
3121 | pointers as lvalue. | |
3122 | * trans-decl.c (get_proc_pointer_decl,gfc_create_module_variable): | |
3123 | Enable procedure pointers as module variables. | |
3124 | ||
3e55cc6f SK |
3125 | 2009-01-14 Steven G. Kargl <kargl@gcc.gnu.org> |
3126 | ||
3127 | * ChangeLog-2007: Clean out svn merge droppings. | |
3128 | ||
51df93ba PT |
3129 | 2009-01-10 Paul Thomas <pault@gcc.gnu.org> |
3130 | ||
3131 | PR fortran/38763 | |
3132 | * target-memory.c (encode_derived): Encode NULL. | |
3133 | ||
9be3684b PT |
3134 | 2009-01-10 Paul Thomas <pault@gcc.gnu.org> |
3135 | ||
3136 | PR fortran/38765 | |
3137 | * resolve.c (check_host_association): Use the symtree name to | |
3138 | search for a potential contained procedure, since this is the | |
3139 | name by which it would be referenced. | |
3140 | ||
a9c5fe7e TK |
3141 | 2009-01-06 Thomas Koenig <tkoenig@gcc.gnu.org> |
3142 | ||
3143 | PR fortran/38220 | |
3144 | * interface.c (gfc_procedure_use): Don't warn about functions | |
3145 | from ISO_C_BINDING. | |
3146 | * symbol.c (generate_isocbinding_symbol): Mark c_loc and | |
3147 | c_funloc as pure. | |
3148 | ||
c7314077 PT |
3149 | 2009-01-05 Paul Thomas <pault@gcc.gnu.org> |
3150 | ||
3151 | PR fortran/38657 | |
3152 | * module.c (write_common_0): Use the name of the symtree rather | |
3153 | than the common block, to determine if the common has been | |
3154 | written. | |
3155 | ||
b55c4f04 DF |
3156 | 2009-01-05 Daniel Franke <franke.daniel@gmail.com> |
3157 | ||
3158 | PR fortran/37159 | |
3159 | * check.c (gfc_check_random_seed): Added size check for GET | |
3160 | dummy argument, reworded error messages to follow common pattern. | |
3161 | ||
96ffc6cd TK |
3162 | 2009-01-05 Thomas Koenig <tkoenig@gcc.gnu.org> |
3163 | ||
3164 | PR fortran/38672 | |
3165 | * trans-types.c (gfc_get_derived_type): Check for the | |
3166 | presence of derived->ns->proc_name before | |
3167 | accessing derived->ns->proc_name->attr.flavor . | |
3168 | * resolve.c (resolve_symbol): Likewise. | |
3169 | ||
a1ab6660 PT |
3170 | 2009-01-05 Paul Thomas <pault@gcc.gnu.org> |
3171 | ||
3172 | PR fortran/38665 | |
3173 | * gfortran.h : Add bit to gfc_expr 'user_operator' | |
3174 | * interface.c (gfc_extend_expr): Set the above if the operator | |
3175 | is substituted by a function. | |
3176 | * resolve.c (check_host_association): Return if above is set. | |
3177 | ||
70e72065 MM |
3178 | 2009-01-04 Mikael Morin <mikael.morin@tele2.fr> |
3179 | ||
3180 | PR fortran/35681 | |
3181 | * ChangeLog-2008: Fix function name. | |
3182 | ||
3183 | PR fortran/38487 | |
3184 | * dependency.c (gfc_check_argument_var_dependency): | |
3185 | Move the check for pointerness inside the if block | |
3186 | so that it doesn't affect the return value. | |
3187 | ||
3188 | PR fortran/38669 | |
3189 | * trans-stmt.c (gfc_trans_call): | |
3190 | Add the dependency code after the loop bounds calculation one. | |
3191 | ||
dcc31d11 DF |
3192 | 2009-01-04 Daniel Franke <franke.daniel@gmail.com> |
3193 | ||
3194 | * intrinsic.c (do_simplify): Removed already implemented TODO. | |
3195 | ||
8f2b565d DF |
3196 | 2009-01-04 Daniel Franke <franke.daniel@gmail.com> |
3197 | ||
3198 | PR fortran/38718 | |
3199 | * simplify.c (gfc_simplify_merge): New. | |
3200 | * intrinsic.h (gfc_simplify_merge): New prototype. | |
3201 | * intrinsic.c (add_functions): Added simplification for MERGE. | |
3202 | ||
23f2d017 MM |
3203 | 2009-01-04 Mikael Morin <mikael.morin@tele2.fr> |
3204 | ||
3205 | PR fortran/38536 | |
3206 | * gfortran.h (gfc_is_data_pointer): Added prototype | |
3207 | * resolve.c (gfc_iso_c_func_interface): | |
3208 | Use gfc_is_data_pointer to test for pointer attribute. | |
3209 | * dependency.c (gfc_is_data_pointer): | |
3210 | Support pointer-returning functions. | |
3211 | ||
5a47fc2f DF |
3212 | 2009-01-03 Daniel Franke <franke.daniel@gmail.com> |
3213 | ||
3214 | * symbol.c (save_symbol): Don't SAVE function results. | |
3215 | ||
79b1d36c | 3216 | 2009-01-03 Paul Thomas <pault@gcc.gnu.org> |
f8df0eb8 | 3217 | |
79b1d36c PT |
3218 | PR fortran/38594 |
3219 | * resolve.c (resolve_call): When searching for proper host | |
3220 | association, use symtree rather than symbol. For everything | |
3221 | except generic subroutines, substitute the symtree in the call | |
3222 | rather than the symbol. | |
ad41bd84 JM |
3223 | |
3224 | \f | |
3225 | Copyright (C) 2009 Free Software Foundation, Inc. | |
3226 | ||
3227 | Copying and distribution of this file, with or without modification, | |
3228 | are permitted in any medium without royalty provided the copyright | |
3229 | notice and this notice are preserved. |