8b4f63f6097a264727de1e06193b8413324a8f20
[gcc.git] / gcc / fortran / ChangeLog
1 2011-02-14 Janus Weil <janus@gcc.gnu.org>
2
3 PR fortran/47730
4 * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
5
6 2011-02-14 Janus Weil <janus@gcc.gnu.org>
7
8 PR fortran/47728
9 * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
10 arrays.
11 * primary.c (gfc_match_varspec): Avoid ICE for invalid class
12 declaration.
13
14 2011-02-14 Janus Weil <janus@gcc.gnu.org>
15
16 PR fortran/47349
17 * interface.c (get_expr_storage_size): Handle derived-type components.
18
19 2011-02-13 Tobias Burnus <burnus@net-b.de>
20
21 PR fortran/47569
22 * interface.c (compare_parameter): Avoid ICE with
23 character components.
24
25 2011-02-12 Janus Weil <janus@gcc.gnu.org>
26
27 * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
28 * decl.c (build_sym,build_struct,attr_decl1): Use return value of
29 'gfc_build_class_symbol'.
30
31 2011-02-12 Michael Matz <matz@suse.de>
32 Janus Weil <janus@gcc.gnu.org>
33 Tobias Burnus <burnus@net-b.de>
34
35 PR fortran/45586
36 * trans-expr.c (conv_parent_component_references): Avoid unintendent
37 skipping of parent compounds.
38
39 2011-02-11 Tobias Burnus <burnus@net-b.de>
40
41 PR fortran/47550
42 * resolve.c (resolve_formal_arglist): PURE with VALUE
43 and no INTENT: Add -std= diagnostics.
44
45 2011-02-09 Janus Weil <janus@gcc.gnu.org>
46
47 PR fortran/47352
48 * resolve.c (resolve_procedure_interface): If interface has a result
49 variable, copy the typespec and set result pointer to self.
50
51 2011-02-09 Janus Weil <janus@gcc.gnu.org>
52
53 PR fortran/47463
54 * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
55
56 2011-02-09 Janus Weil <janus@gcc.gnu.org>
57
58 PR fortran/47637
59 * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
60
61 2011-02-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
62
63 * io.c (match_io_element): Do not set dt if not inquire.
64
65 2011-02-08 Janus Weil <janus@gcc.gnu.org>
66
67 PR fortran/45290
68 * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
69 initialization target.
70
71 2011-02-07 Janne Blomqvist <jb@gcc.gnu.org>
72 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
73
74 * gfortran.texi (Thread-safety): texinfo styling fixes.
75 * intrinsic.texi: Likewise.
76
77 2011-02-06 Janne Blomqvist <jb@gcc.gnu.org>
78
79 * gfortran.texi (Compiler Characteristics): Add reference to
80 thread-safety section.
81
82 2011-02-06 Janne Blomqvist <jb@gcc.gnu.org>
83
84 * gfortran.texi (Thread-safety): New section.
85 * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
86 (GETENV): Likewise.
87 (GET_ENVIRONMENT_VARIABLE): Likewise.
88 (SYSTEM): Likewise.
89
90 2011-02-06 Paul Thomas <pault@gcc.gnu.org>
91
92 PR fortran/47592
93 * trans-stmt.c (gfc_trans_allocate): For deferred character
94 length allocations with SOURCE, store to the values and string
95 length to avoid calculating twice. Replace gfc_start_block
96 with gfc_init_block to avoid unnecessary contexts and to keep
97 declarations of temporaries where they should be. Tidy up the
98 code a bit.
99
100 2011-02-05 Janne Blomqvist <jb@gcc.gnu.org>
101
102 PR fortran/42434
103 * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
104
105 2011-02-02 Janus Weil <janus@gcc.gnu.org>
106 Paul Thomas <pault@gcc.gnu.org>
107
108 PR fortran/47082
109 * trans-expr.c (gfc_trans_class_init_assign): Add call to
110 gfc_get_derived_type.
111 * module.c (read_cleanup): Do not use unique_symtrees for vtabs
112 or vtypes.
113
114 2011-02-02 Janus Weil <janus@gcc.gnu.org>
115
116 PR fortran/47572
117 * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
118
119 2011-02-01 Janus Weil <janus@gcc.gnu.org>
120
121 PR fortran/47565
122 * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
123 pointer components with allocatable result.
124
125 2011-01-31 Janus Weil <janus@gcc.gnu.org>
126
127 PR fortran/47455
128 * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
129 with pointer or allocatable result.
130
131 2011-01-31 Paul Thomas <pault@gcc.gnu.org>
132
133 PR fortran/47519
134 * trans-stmt.c (gfc_trans_allocate): Improve handling of
135 deferred character lengths with SOURCE.
136 * iresolve.c (gfc_resolve_repeat): Calculate character
137 length from source length and ncopies.
138 * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
139 expressions for ALLOCATE.
140
141 2011-01-31 Janus Weil <janus@gcc.gnu.org>
142
143 PR fortran/47463
144 * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
145 an argument of a typebound assignment being a component.
146
147 2011-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
148
149 * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
150 LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
151
152 2011-01-31 Tobias Burnus <burnus@net-b.de>
153
154 PR fortran/47042
155 * resolve.c (resolve_fl_procedure): Reject stmt functions
156 with pointer/allocatable attribute.
157
158 2011-01-31 Tobias Burnus <burnus@net-b.de>
159
160 PR fortran/47042
161 * interface.c (gfc_procedure_use): Add explicit interface check for
162 pointer/allocatable functions.
163
164 2011-01-30 Paul Thomas <pault@gcc.gnu.org>
165
166 PR fortran/47523
167 * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
168 expr and is assigned to a deferred character length scalar,
169 make sure that the function is called before reallocation,
170 so that the length is available. Include procedure pointer
171 and procedure pointer component rhs as well.
172
173 PR fortran/45170
174 PR fortran/35810
175 PR fortran/47350
176 * gfortran.dg/allocatable_function_5.f90: New test not added by
177 mistake on 2011-01-28.
178
179 2011-01-29 Tobias Burnus <burnus@net-b.de>
180
181 PR fortran/47531
182 * check.c (gfc_check_shape): Support kind argument in SHAPE.
183 * intrinsic.c (add_functions): Ditto.
184 * resolve.c (gfc_resolve_shape): Ditto.
185 * simplify.c (gfc_simplify_shape): Ditto.
186 * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
187 gfc_simplify_shape): Update prototypes.
188 * intrinisc.text (SHAPE): Document kind argument.
189
190 2011-01-28 Tobias Burnus <burnus@net-b.de>
191
192 PR fortran/47507
193 * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
194 attribute also without INTENT.
195
196 2011-01-28 Tobias Burnus <burnus@net-b.de>
197
198 * gfortran.texi (Fortran 2003 status): Mention support for
199 nonconstant namelist variables.
200
201 2011-01-28 Paul Thomas <pault@gcc.gnu.org>
202 Tobias Burnus <burnus@gcc.gnu.org>
203
204 PR fortran/45170
205 PR fortran/35810
206 PR fortran/47350
207 * interface.c (compare_actual_formal): An allocatable or pointer
208 deferred length actual is only allowed if the formal argument
209 is also deferred length. Clean up whitespace.
210 * trans-expr.c (gfc_conv_procedure_call): Pass string length for
211 deferred character length formal arguments by reference. Do the
212 same for function results.
213 (gfc_trans_pointer_assignment): Do not do runtime check of lhs
214 and rhs character lengths, if deferred length lhs. In this case
215 set the lhs character length to that of the rhs.
216 (gfc_conv_string_parameter): Remove assert that string length is
217 an integer type.
218 (is_scalar_reallocatable_lhs): New function.
219 (alloc_scalar_allocatable_for_assignment): New function.
220 (gfc_trans_assignment_1): Call above new function. If the rhs is
221 a deferred character length itself, makes ure that the function
222 is called before reallocation, so that the length is available.
223 (gfc_trans_asssignment): Remove error about assignment to
224 deferred length character variables.
225 * gfortran.texi : Update entry about (re)allocation on
226 assignment.
227 * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
228 length character variables.
229 * module.c (mio_typespec): Transfer deferred characteristic.
230 * trans-types.c (gfc_get_function_type): New code to generate
231 hidden typelist, so that those character lengths that are
232 passed by reference get the right type.
233 * resolve.c (resolve_contained_fntype): Supress error for
234 deferred character length functions.
235 (resolve_function, resolve_fl_procedure) The same.
236 (check_symbols): Remove the error that support for
237 entity with deferred type parameter is not yet implemented.
238 (resolve_fl_derived): The same.
239 match.c (alloc_opt_list): Allow MOLD for deferred length object.
240 * trans-decl.c (gfc_get_symbol_decl): For deferred character
241 length dummies, generate a local variable for string length.
242 (create_function_arglist): Hidden length can be a pointer.
243 (gfc_trans_deferred_vars): For deferred character length
244 results and dummies, assign the string length to the local
245 variable from the hidden argument on entry and the other way
246 round on exit, as appropriate.
247
248 2011-01-27 Tobias Burnus <burnus@net-b.de>
249
250 PR fortran/47474
251 * trans-decl.c (gfc_generate_function_code): Fix init
252 of allocatable result variable with allocatable components.
253
254 2011-01-27 Tobias Burnus <burnus@net-b.de>
255
256 PR fortran/47472
257 * options.c (gfc_handle_module_path_options): Save
258 module path without trailing slash as include path.
259
260 2011-01-25 Tobias Burnus <burnus@net-b.de>
261
262 PR fortran/47448
263 * interface.c (gfc_check_operator_interface): Fix
264 defined-assignment check.
265
266 2011-01-23 Tobias Burnus <burnus@net-b.de>
267
268 PR fortran/47421
269 * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
270 scalar allocatable dummy arguments.
271
272 2011-01-22 Thomas Koenig <tkoenig@gcc.gnu.org>
273
274 PR fortran/38536
275 * resolve.c (gfc_iso_c_func_interface): For C_LOC,
276 check for array sections followed by component references
277 which are illegal. Also check for coindexed arguments.
278
279 2011-01-22 Tobias Burnus <burnus@net-b.de>
280
281 PR fortran/47399
282 * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
283 PARAMETER TBP.
284
285 2011-01-21 Tobias Burnus <burnus@net-b.de>
286
287 PR fortran/47394
288 * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
289 Use defined instead of magic number exit status codes.
290 * scanner.c (include_line, gfc_new_file): Ditto.
291
292 2011-01-21 Tobias Burnus <burnus@net-b.de>
293
294 PR fortran/47377
295 * expr.c (gfc_check_pointer_assign): Reject expr data-targets
296 without pointer attribute.
297
298 2011-01-18 Janus Weil <janus@gcc.gnu.org>
299
300 PR fortran/47240
301 * resolve.c (expression_rank): Fix rank of procedure poiner components.
302 * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
303 pointer components as actual arguments.
304
305 2011-01-17 Jakub Jelinek <jakub@redhat.com>
306
307 PR fortran/47331
308 * gfortran.h (struct gfc_omp_saved_state): New type.
309 (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
310 * resolve.c (resolve_global_procedure): Call it around gfc_resolve
311 call.
312 * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
313 functions.
314
315 2011-01-17 Tobias Burnus <burnus@net-b.de>
316
317 PR fortran/47327
318 * invoke.texi (Options to request or suppress errors
319 and warnings): Fix cross link.
320
321 2011-01-15 Tobias Burnus <burnus@net-b.de>
322
323 * gfortran.texi: Update Fortran 2003 Status section.
324
325 PR fortran/47177
326 * invoke.texi: Add missing "-E" to the -dM example.
327
328 2011-01-13 Tobias Burnus <burnus@net-b.de>
329
330 PR fortran/47268
331 * intrinsic.texi (get_command_argument, get_environment_variable):
332 Mark arguments as optional in the Arguments section.
333
334 2011-01-13 Kai Tietz <kai.tietz@onevision.com>
335 Tobias Burnus <burnus@net-b.de>
336
337 PR fortran/47260
338 * trans-decl.c (gfc_get_extern_function_decl,
339 build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
340 calling decl_attributes.
341
342 2011-01-13 Tobias Burnus <burnus@net-b.de>
343 Mikael Morin <mikael@gcc.gnu.org>
344
345 PR fortran/45848
346 PR fortran/47204
347 * gfortran.h (gfc_code): Move union ext's case_list into
348 the struct block.
349 * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
350 by "block.".
351 * frontend-passes.c (gfc_code_walker): Ditto.
352 * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
353 gfc_match_type_is, gfc_match_class_is): Ditto.
354 * resolve.c (resolve_select, resolve_select_type): Ditto.
355 * st.c (gfc_free_statement): Ditto.
356 * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
357 gfc_trans_character_select): Ditto.
358 * parse.c (resolve_all_program_units): For error recovery, avoid
359 segfault is proc_name is NULL.
360
361 2011-01-11 Paul Thomas <pault@gcc.gnu.org>
362
363 PR fortran/47051
364 * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
365 to be standard compliant by testing for shape rather than size
366 before skipping reallocation. Improve comments.
367
368 2011-01-09 Janus Weil <janus@gcc.gnu.org>
369
370 PR fortran/47224
371 * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
372 of code.
373
374 2011-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
375
376 PR fortran/38536
377 * resolve.c (is_scalar_expr_ptr): For a substring reference,
378 use gfc_dep_compare_expr to compare start and end expession.
379 Add FIXME for using gfc_deb_compare_expr elsewhere.
380
381 2011-01-09 Janus Weil <janus@gcc.gnu.org>
382
383 PR fortran/46313
384 * class.c (get_unique_type_string): Make type name start with upper
385 case letter.
386
387 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
388
389 PR fortran/46405
390 * invoke.texi: Mention -ffree-line-length-none and
391 -ffixed-line-length-none for preprocessing.
392
393 2011-01-08 Paul Thomas <pault@gcc.gnu.org>
394
395 PR fortran/46896
396 * trans-expr.c (gfc_conv_procedure_call): With a non-copying
397 procedure argument (eg TRANSPOSE) use a temporary if there is
398 any chance of aliasing due to host or use association.
399 (arrayfunc_assign_needs_temporary): Correct logic for function
400 results and do not use a temporary for implicitly PURE
401 variables. Use a temporary for Cray pointees.
402 * symbol.c (gfc_add_save): Explicit SAVE not compatible with
403 implicit pureness of containing procedure.
404 * decl.c (match_old_style_init, gfc_match_data): Where decl
405 would fail in PURE procedure, set implicit_pure to zero.
406 * gfortran.h : Add implicit_pure to structure symbol_attr and
407 add prototype for function gfc_implicit_pure.
408 * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
409 Where decl would fail in PURE procedure, reset implicit_pure.
410 * io.c (match_vtag, gfc_match_open, gfc_match_close,
411 gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
412 * match.c (gfc_match_critical, gfc_match_stopcode,
413 sync_statement, gfc_match_allocate, gfc_match_deallocate): The
414 same.
415 * parse.c (decode_omp_directive): The same.
416 (parse_contained): If not PURE, set implicit pure attribute.
417 * resolve.c (resolve_formal_arglist, resolve_structure_cons,
418 resolve_function, resolve_ordinary_assign) : The same.
419 (gfc_implicit_pure): New function.
420 * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
421 to ab_attribute enum and use it in this function.
422
423 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
424
425 PR fortran/45777
426 * symbol.c (gfc_symbols_could_alias): Strip gfc_ prefix,
427 make static and move in front of its only caller, to ...
428 * trans-array.c (symbols_could_alias): ... here.
429 Pass information about pointer and target status as
430 arguments. Allocatable arrays don't alias anything
431 unless they have the POINTER attribute.
432 (gfc_could_be_alias): Keep track of pointer and target
433 status when following references. Also check if typespecs
434 of components match those of other components or symbols.
435
436 2011-01-07 Tobias Burnus <burnus@net-b.de>
437
438 PR fortran/41580
439 * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
440 * intrinsic.c (add_functions): Use simplify functions for
441 EXTENDS_TYPE_OF and SAME_TYPE_AS.
442 * intrinsic.h (gfc_simplify_extends_type_of,
443 gfc_simplify_same_type_as): New prototypes.
444 * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
445 gfc_simplify_same_type_as): New functions.
446
447 2011-01-07 Janus Weil <janus@gcc.gnu.org>
448
449 PR fortran/47189
450 PR fortran/47194
451 * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
452 * class.c (gfc_class_null_initializer): Initialize _vptr to declared
453 type.
454 * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
455 * resolve.c (resolve_deallocate_expr): _data component will be added
456 at translation stage.
457 * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
458 * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
459
460 2011-01-06 Daniel Franke <franke.daniel@gmail.com>
461
462 PR fortran/33117
463 PR fortran/46478
464 * parse.c (parse_interface): Remove check for procedure types.
465 * interface.c (check_interface0): Verify that procedures are
466 either all SUBROUTINEs or all FUNCTIONs.
467
468 2011-01-05 Janus Weil <janus@gcc.gnu.org>
469
470 PR fortran/47180
471 * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
472 'vtab' is initialized).
473
474 2011-01-05 Janus Weil <janus@gcc.gnu.org>
475
476 PR fortran/47180
477 * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
478 assignment, set the _vptr component to the declared type.
479
480 2011-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
481
482 PR fortran/46017
483 * resolve.c (resolve_allocate_deallocate): Follow references to
484 check for duplicate occurence of allocation/deallocation objects.
485
486 2011-01-05 Janus Weil <janus@gcc.gnu.org>
487
488 PR fortran/47024
489 * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
490 of polymorphic allocatables according to their declared type.
491
492 2011-01-04 Janus Weil <janus@gcc.gnu.org>
493
494 PR fortran/46448
495 * class.c (gfc_find_derived_vtab): Set the module field for the copying
496 routine to make sure it receives module name mangling.
497
498 2011-01-03 Jakub Jelinek <jakub@redhat.com>
499
500 * gfortranspec.c (lang_specific_driver): Update copyright notice
501 dates.
502
503 2011-01-03 Janus Weil <janus@gcc.gnu.org>
504
505 * intrinsic.texi (LEADZ): Fix example.
506
507 2011-01-02 Janus Weil <janus@gcc.gnu.org>
508
509 PR fortran/46408
510 * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
511 routine.
512
513 \f
514 Copyright (C) 2011 Free Software Foundation, Inc.
515
516 Copying and distribution of this file, with or without modification,
517 are permitted in any medium without royalty provided the copyright
518 notice and this notice are preserved.