]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/ChangeLog
re PR fortran/31822 (Missing run-time bound checks for character pointer => target)
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
CommitLineData
fb5bc08b
DK
12008-12-18 Daniel Kraft <d@domob.eu>
2
3 PR fortran/31822
4 * gfortran.h (gfc_check_same_strlen): Made public.
5 * trans.h (gfc_trans_same_strlen_check): Made public.
6 * check.c (gfc_check_same_strlen): Made public and adapted error
7 message output to be useful not only for intrinsics.
8 (gfc_check_merge): Adapt to gfc_check_same_strlen change.
9 * expr.c (gfc_check_pointer_assign): Use gfc_check_same_strlen for
10 string length compile-time check.
11 * trans-expr.c (gfc_trans_pointer_assignment): Add runtime-check for
12 equal string lengths using gfc_trans_same_strlen_check.
13 * trans-intrinsic.c (gfc_trans_same_strlen_check): Renamed and made
14 public from conv_same_strlen_check.
15 (gfc_conv_intrinsic_merge): Adapted accordingly.
16
8c13133c
DK
172008-12-17 Daniel Kraft <d@domob.eu>
18
19 PR fortran/38137
20 * trans-intrinsic.c (conv_same_strlen_check): New method.
21 (gfc_conv_intrinsic_merge): Call it here to actually do the check.
22
ea4547bb
MM
232008-12-15 Mikael Morin <mikael.morin@tele2.fr>
24
25 PR fortran/38487
26 * dependency.c (gfc_is_data_pointer): New function.
27 (gfc_check_argument_var_dependency): Disable the warning
28 in the pointer case.
29 (gfc_check_dependency): Use gfc_is_data_pointer.
30
618f4f46
MM
312008-12-15 Mikael Morin <mikael.morin@tele2.fr>
32
33 PR fortran/38113
34 * error.c (show_locus): Start counting columns at 0.
35 * primary.c (match_actual_arg): Eat spaces
36 before copying the current locus.
37 (match_variable): Copy the locus before matching.
38
18dd272d
PT
392008-12-14 Paul Thomas <pault@gcc.gnu.org>
40
41 PR fortran/35937
42 * trans-expr.c (gfc_finish_interface_mapping): Fold convert the
43 character length to gfc_charlen_type_node.
44
bf4f96e6
DF
452008-12-12 Daniel Franke <franke.daniel@gmail.com>
46
47 PR fortran/36355
48 * check.c (gfc_check_matmul): Fixed error message for invalid
49 types to correctly identify the offending argument, added check
50 for mismatching types.
51
150da9f4
RG
522008-12-11 Richard Guenther <rguenther@suse.de>
53
54 * Make-lang.in (install-finclude-dir): Use correct mode argument
55 for mkinstalldirs.
56
c9071863
DF
572008-12-09 Daniel Franke <franke.daniel@gmail.com>
58
59 PR fortran/36376
60 PR fortran/37468
61 * lang-specs.h: Pass on -i* options to f951 to (probably) report
62 them as unknown. Duplicate gcc.c (cpp_options), but omit
63 -fpch-preprocess on -save-temps.
64
c3280643
DF
652008-12-09 Daniel Franke <franke.daniel@gmail.com>
66
67 PR fortran/36457
68 * lang.opt: Added option idirafter.
69 * cpp.h (gfc_cpp_add_include_path_after): New prototype.
70 * cpp.c (gfc_cpp_handle_option): Recognize and handle OPT_dirafter.
71 (gfc_cpp_add_include_path_after): New, adds user-defined search path
72 after any other paths.
73 * invoke.texi (idirafter): New.
74 (no-range-check): Fixed entry in option-index.
75
138b3340
MM
762008-12-09 Mikael Morin <mikael.morin@tele2.fr>
77
78 PR fortran/37469
79 * expr.c (find_array_element): Simplify array bounds.
80 Assert that both bounds are constant expressions.
81
fe7a047c
MM
822008-12-09 Mikael Morin <mikael.morin@tele2.fr>
83
84 PR fortran/35983
85 * trans-expr.c (gfc_trans_subcomponent_assign):
86 Add se's pre and post blocks to current block.
87 (gfc_trans_structure_assign): Remove specific handling
88 of C_NULL_PTR and C_NULL_FUNPTR.
89
f5c64803
JD
902008-12-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
91
92 PR fortran/38425
93 * io.c (check_io_constraints): Check constraints on REC=, POS=, and
94 internal unit with POS=. Fix punctuation on a few error messages.
95
fb7ca5a7
JW
962008-12-06 Janus Weil <janus@gcc.gnu.org>
97
98 PR fortran/38415
99 * expr.c (gfc_check_pointer_assign): Added a check for abstract
100 interfaces in procedure pointer assignments, removed check involving
101 gfc_compare_interfaces until PR38290 is fixed completely.
102
4c934d41
JD
1032008-12-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
104
105 PR fortran/38291
106 * io.c (match_dt_element): Use dt->pos in matcher.
107 (gfc_free_dt): Free dt->pos after use.
108 (gfc_resolve_dt): Use dt->pos in resolution of stream position tag.
109
9ff4a9da 1102008-12-05 Sebastian Pop <sebastian.pop@amd.com>
250d2fb5
JJ
111
112 PR bootstrap/38262
113 * Make-lang.in (f951): Add BACKENDLIBS, remove GMPLIBS.
114
f2830e80
JJ
1152008-12-02 Jakub Jelinek <jakub@redhat.com>
116 Diego Novillo <dnovillo@google.com>
117
118 * Make-lang.in (install-finclude-dir): Use mkinstalldirs
119 and don't remove the finclude directory beforehand.
120
726d8566
JW
1212008-12-02 Janus Weil <janus@gcc.gnu.org>
122
123 PR fortran/36704
124 PR fortran/38290
125 * decl.c (match_result): Result may be a standard variable or a
126 procedure pointer.
127 * expr.c (gfc_check_pointer_assign): Additional checks for procedure
128 pointer assignments.
129 * primary.c (gfc_match_rvalue): Bugfix for procedure pointer
130 assignments.
131 * resolve.c (resolve_function): Check for attr.subroutine.
132 * symbol.c (check_conflict): Addtional checks for RESULT statements.
133 * trans-types.c (gfc_sym_type,gfc_get_function_type): Support procedure
134 pointers as function result.
135
34d5d958
MM
1362008-12-01 Mikael Morin <mikael.morin@tele2.fr>
137
138 PR fortran/38252
139 * parse.c (parse_spec): Skip statement order check in case
140 of a CONTAINS statement.
141
1933ba0f
DK
1422008-11-30 Daniel Kraft <d@domob.eu>
143
144 PR fortran/37779
145 * gfortran.h (struct gfc_entry_list): Fixed typo in comment.
146 * resolve.c (is_illegal_recursion): New method.
147 (resolve_procedure_expression): Use new is_illegal_recursion instead of
148 direct check and handle function symbols correctly.
149 (resolve_actual_arglist): Removed useless recursion check.
150 (resolve_function): Use is_illegal_recursion instead of direct check.
151 (resolve_call): Ditto.
152
71690b03
EB
1532008-11-29 Eric Botcazou <ebotcazou@adacore.com>
154
155 * trans-array.c (gfc_conv_array_parameter): Guard union access.
156
f4256439
JW
1572008-11-29 Janus Weil <janus@gcc.gnu.org>
158 Mikael Morin <mikael@gcc.gnu.org>
159
160 PR fortran/38289
161 PR fortran/38290
162 * decl.c (match_procedure_decl): Handle whitespaces.
163 * resolve.c (resolve_specific_s0): Bugfix in check for intrinsic
164 interface.
165
5308fd74
L
1662008-11-25 H.J. Lu <hongjiu.lu@intel.com>
167
168 * module.c (gfc_dump_module): Report error on unlink only if
169 errno != ENOENT.
170
bc0f8bd4
MM
1712008-11-25 Mikael Morin <mikael.morin@tele2.fr>
172
173 PR fortran/36463
174 * expr.c (replace_symbol): Don't replace the symtree
175 if the expresion is an intrinsic function. Don't create
176 non-existent symtrees. Use symbol's name instead of symtree's,
177 different in case of module procedure dummy arguments.
178
056c1652
JK
1792008-11-25 Jan Kratochvil <jan.kratochvil@redhat.com>
180
181 PR fortran/38248
182 * module.c (gfc_dump_module): Check rename/unlink syscalls errors.
183
abb370e4
EB
1842008-11-25 Eric Botcazou <ebotcazou@adacore.com>
185
186 PR fortran/37319
187 * parse.c (match_deferred_characteristics): Make sure 'name' is
188 initialized before reading it.
189
ca430085
JD
1902008-11-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
191
192 PR fortran/37803
193 * arith.c (gfc_check_real_range): Add mpfr_check_range.
194 * simplify.c (gfc_simplify_nearest): Add mpfr_check_range.
195
6e7cc036
MM
1962008-11-24 Mikael Morin <mikael.morin@tele2.fr>
197
198 PR fortran/38184
199 * simplify.c (is_constant_array_expr): Return true instead of false
200 if the array constructor is empty.
201
a03826d1
DK
2022008-11-24 Daniel Kraft <d@domob.eu>
203
204 PR fortran/37779
205 * resolve.c (resolve_procedure_expression): New method.
206 (resolve_variable): Call it.
207 (resolve_actual_arglist): Call gfc_resolve_expr for procedure arguments.
208
2c69d527
PT
2092008-11-24 Paul Thomas <pault@gcc.gnu.org>
210
211 PR fortran/34820
212 * trans-expr.c (gfc_conv_function_call): Remove all code to
213 deallocate intent out derived types with allocatable
214 components.
215 (gfc_trans_assignment_1): An assignment from a scalar to an
216 array of derived types with allocatable components, requires
217 a deep copy to each array element and deallocation of the
218 converted rhs expression afterwards.
219 * trans-array.c : Minor whitespace.
220 * trans-decl.c (init_intent_out_dt): Add code to deallocate
221 allocatable components of derived types with intent out.
222 (generate_local_decl): If these types are unused, set them
223 referenced anyway but allow the uninitialized warning.
224
225 PR fortran/34143
226 * trans-expr.c (gfc_trans_subcomponent_assign): If a conversion
227 expression has a null data pointer argument, nullify the
228 allocatable component.
229
230 PR fortran/32795
231 * trans-expr.c (gfc_trans_subcomponent_assign): Only nullify
232 the data pointer if the source is not a variable.
233
b945f9f3
PT
2342008-11-23 Paul Thomas <pault@gcc.gnu.org>
235
236 PR fortran/37735
237 * trans-array.c (structure_alloc_comps): Do not duplicate the
238 descriptor if this is a descriptorless array!
239
2ec855f1
TB
2402008-11-12 Tobias Burnus <burnus@net-b.de>
241
242 PR fortran/38160
243 * trans-types.c (gfc_validate_c_kind): Remove function.
244 * decl.c (gfc_match_kind_spec): Add C kind parameter check.
245 (verify_bind_c_derived_type): Remove gfc_validate_c_kind call.
246 (verify_c_interop_param): Update call.
247 * gfortran.h (verify_bind_c_derived_type): Update prototype.
248 (gfc_validate_c_kind): Remove.
249 * symbol.c (verify_bind_c_derived_type): Update verify_c_interop call.
250 * resolve.c (gfc_iso_c_func_interface): Ditto.
251
e1456843
JJ
2522008-11-22 Jakub Jelinek <jakub@redhat.com>
253
254 PR libfortran/37839
255 * trans-io.c (gfc_build_io_library_fndecls): Decrease pad size back
256 to 16 pointers plus 32 integers. Don't use max integer kind
257 alignment, only gfc_intio_kind's alignment.
258 (gfc_trans_inquire): Only set flags2 if mask2 is non-zero.
259 * ioparm.def: Fix order, bitmasks and types of inquire round, sign
260 and pending fields. Move u in dt before id.
261 * io.c (gfc_free_inquire): Free decimal and size exprs.
262 (match_inquire_element): Match size instead of matching blank twice.
263 (gfc_resolve_inquire): Resolve size.
264
b41b10e5
JJ
2652008-11-20 Jakub Jelinek <jakub@redhat.com>
266
81f5094d
JJ
267 PR middle-end/29215
268 * trans-array.c (trans_array_constructor_value,
269 gfc_build_constant_array_constructor): Fill in TREE_PURPOSE.
270
8c3ed71e
JJ
271 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use
272 gfc_index_one_node.
273 (gfc_conv_intrinsic_size): Use gfc_index_{zero,one}_node.
274
b41b10e5
JJ
275 PR fortran/38181
276 * trans-intrinsic.c (gfc_conv_intrinsic_size): Inline 2 argument
277 size if the second argument is not optional and one argument size
278 for rank 1 arrays.
279
81a7154e
PT
2802008-11-19 Paul Thomas <pault@gcc.gnu.org>
281
cfdf8f1a 282 PR fortran/38171
81a7154e
PT
283 * module.c (load_equiv): Regression fix; check that equivalence
284 members come from the same module only.
285
2b0bd714
MM
2862008-11-16 Mikael Morin <mikael.morin@tele2.fr>
287
288 PR fortran/35681
289 * dependency.c (gfc_check_argument_var_dependency): Add
290 elemental check flag. Issue a warning if we find a dependency
291 but don't generate a temporary. Add the case of an elemental
292 function call as actual argument to an elemental procedure.
293 Add the case of an operator expression as actual argument
294 to an elemental procedure.
295 (gfc_check_argument_dependency): Add elemental check flag.
296 Update calls to gfc_check_argument_var_dependency.
297 (gfc_check_fncall_dependency): Add elemental check flag.
298 Update call to gfc_check_argument_dependency.
299 * trans-stmt.c (gfc_trans_call): Make call to
300 gfc_conv_elemental_dependency unconditional, but with a flag
301 whether we should check dependencies between variables.
302 (gfc_conv_elemental_dependency): Add elemental check flag.
303 Update call to gfc_check_fncall_dependency.
304 * trans-expr.c (gfc_trans_arrayfunc_assign): Update call to
305 gfc_check_fncall_dependency.
306 * resolve.c (find_noncopying_intrinsics): Update call to
307 gfc_check_fncall_dependency.
308 * dependency.h (enum gfc_dep_check): New enum.
309 (gfc_check_fncall_dependency): Update prototype.
310
27f31e39
MM
3112008-11-16 Mikael Morin <mikael.morin@tele2.fr>
312
313 PR fortran/37992
314 * gfortran.h (gfc_namespace): Added member old_cl_list,
315 backup of cl_list.
316 (gfc_free_charlen): Added prototype.
317 * symbol.c (gfc_free_charlen): New function.
318 (gfc_free_namespace): Use gfc_free_charlen.
319 * parse.c (next_statement): Backup gfc_current_ns->cl_list.
320 (reject_statement): Restore gfc_current_ns->cl_list.
321 Free cl_list's elements before dropping them.
322
06919226
TB
3232008-11-16 Tobias Burnus <burnus@net-b.de>
324
325 PR fortran/38095
326 * trans-expr.c (gfc_map_intrinsic_function): Fix pointer access.
327
22089905
PT
3282008-11-16 Paul Thomas <pault@gcc.gnu.org>
329
330 PR fortran/38119
331 * trans-array.c (gfc_trans_create_temp_array): Set the
332 loop->from to zero and the renormalisation of loop->to for all
333 dimensions.
334
b800fd64
PT
3352008-11-16 Paul Thomas <pault@gcc.gnu.org>
336
337 PR fortran/37926
338 * trans-expr.c (gfc_free_interface_mapping): Null sym->formal
339 (gfc_add_interface_mapping): Copy the pointer to the formal
340 arglist, rather than using copy_formal_args - fixes regression.
341
4d45d495
PT
3422008-11-15 Paul Thomas <pault@gcc.gnu.org>
343
06919226
TB
344 PR fortran/37926
345 * trans-expr.c (gfc_add_interface_mapping): Transfer the formal
4d45d495
PT
346 arglist and the always_explicit attribute if the dummy arg is a
347 procedure.
348
74657812
JD
3492008-11-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
350
351 PR fortran/37988
352 * io.c (enum format_token): For readability replace FMT_POS with FMT_T,
353 FMT_TL, and FMT_TR. (format_lex): Use new enumerators. (check_format):
354 Add check for missing positive integer.
355
993ac38b
PT
3562008-10-14 Paul Thomas <pault@gcc.gnu.org>
357
358 PR fortran/38033
359 * trans-array.c (gfc_trans_create_temp_array): Stabilize the
360 'to' expression.
361 (gfc_conv_loop_setup): Use the end expression for the loop 'to'
362 if it is available.
363
27a4e072
JJ
3642008-11-12 Jakub Jelinek <jakub@redhat.com>
365
366 PR target/35366
367 PR fortran/33759
368 * trans-const.c (gfc_conv_constant_to_tree): Warn when
369 converting an integer outside of LOGICAL's range to
370 LOGICAL.
371 * trans-intrinsic.c (gfc_conv_intrinsic_function,
372 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer):
373 Use INTEGER_TYPE instead of BOOLEAN_TYPE for TRANSFER as
374 argument of another TRANSFER.
375
0d6872cb
TB
3762008-11-12 Tobias Burnus <burnus@net-b.de>
377
378 PR fortran/38065
379 * resolve.c (resolve_fntype): Fix private derived type checking.
380
5a0193ee
PT
3812008-11-09 Paul Thomas <pault@gcc.gnu.org>
382
0d6872cb
TB
383 PR fortran/37836
384 * intrinsic.c (add_functions): Reference gfc_simplify._minval
5a0193ee
PT
385 and gfc_simplify_maxval.
386 * intrinsic.h : Add prototypes for gfc_simplify._minval and
387 gfc_simplify_maxval.
388 * simplify.c (min_max_choose): New function extracted from
389 simplify_min_max.
390 (simplify_min_max): Call it.
391 (simplify_minval_maxval, gfc_simplify_minval,
392 gfc_simplify_maxval): New functions.
393
50d6ceda
PT
3942008-11-04 Paul Thomas <pault@gcc.gnu.org>
395
0d6872cb
TB
396 PR fortran/37597
397 * parse.c (gfc_fixup_sibling_symbols ): Fixup contained, even
50d6ceda
PT
398 when symbol not found.
399
0ee1b105
TB
4002008-11-03 Tobias Burnus <burnus@net-b.de>
401
402 PR fortran/37821
403 * cpp.c (gfc_cpp_add_include_path): Use BRACKET.
404 * scanner.c (add_path_to_list): Argument to add at head.
405 (gfc_add_include_path): Add new argument.
406 (gfc_add_intrinsic_modules_path) Update call.
407 (load_file): Print filename/line in the error message.
408 * gfortran.h (gfc_add_include_path): Update prototype.
409 * options.c (gfc_post_options,gfc_handle_module_path_options,
410 gfc_handle_option): Update call.
411 * lang-spec.h (F951_OPTIONS): Don't insert include path twice.
412
413 * arith.c (arith_error): Add -fno-range-error to the message.
414
67cec813
PT
4152008-11-03 Paul Thomas <pault@gcc.gnu.org>
416
417 PR fortran/37445
418 * resolve.c (resolve_actual_arglist ): Correct comparison of
419 FL_VARIABLE with e->expr_type.
420 (resolve_call): Check that host association is correct.
421 (resolve_actual_arglist ): Remove return is old_sym is use
422 associated. Only reparse expression if old and new symbols
423 have different types.
424
425 PR fortran/PR35769
426 * resolve.c (gfc_resolve_assign_in_forall): Change error to a
427 warning.
428
6f6e26a8
JW
4292008-11-01 Janus Weil <janus@gcc.gnu.org>
430
431 PR fortran/36426
432 * expr.c (replace_symbol): Replace all symbols which lie in the
433 formal namespace of the interface and copy their attributes.
434 * resolve.c (resolve_symbol): Add charlen to namespace.
435
63346ddb
SK
4362008-11-01 Steven G. Kargl <kargls@comcast.net>
437
438 PR fortran/19925
439 * trans-array.c (gfc_trans_array_constructor_value): Fix comment.
440 (gfc_conv_array_initializer): Convert internal_error() to gfc_error_now.
441 * array.c: Remove GFC_MAX_AC_EXPAND macro.
442 (gfc_expand_constructor): Use gfc_option.flag_max_array_constructor.
443 * gfortran.h (gfc_option): Add flag_max_array_constructor member.
444 * lang.opt: Add -fmax-array-constructor option.
445 * expr.c (gfc_match_init_expr): Fix error message to mention new option.
446 * invoke.texi: Document new option.
447 * options.c (gfc_init_options): Set default value for new option.
448 (gfc_handle_option): Deal with commandline.
449
12f681a0
DK
4502008-11-01 Daniel Kraft <d@domob.eu>
451
452 PR fortran/35681
453 * gfortran.h (struct gfc_code): New field `resolved_isym'.
454 * trans.h (gfc_build_memcpy_call): Made public.
455 * trans-array.h (gfc_trans_create_temp_array): New argument `initial'.
456 * intrinsic.c (gfc_intrinsic_sub_interface): Set resolved_isym.
457 * iresolve.c (create_formal_for_intents): New helper method.
458 (gfc_resolve_mvbits): Put dummy formal arglist on resolved_sym.
459 * resolve.c (resolve_call): Initialize resolved_isym to NULL.
460 * trans-array.c (gfc_trans_allocate_array_storage): New argument
461 `initial' to allow initializing the allocated storage to some initial
462 value copied from another array.
463 (gfc_trans_create_temp_array): Allow initialization of the temporary
464 with a copy of some other array by using the new extension.
465 (gfc_trans_array_constructor): Pass NULL_TREE for initial argument.
466 (gfc_conv_loop_setup): Ditto.
467 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Ditto.
468 * trans-expr.c (gfc_conv_function_call): Ditto.
469 (gfc_build_memcpy_call): Made public.
470 * trans-stmt.c (gfc_conv_elemental_dependencies): Initialize created
471 temporary for INTENT(INOUT) arguments to the value of the mirrored
472 array and clean up the temporary as very last intructions in the created
473 block.
474 * trans.c (gfc_trans_code): For EXEC_CALL, see if we have a MVBITS call
475 and enable elemental dependency checking if we have.
476
c6acea9d
JW
4772008-11-01 Janus Weil <janus@gcc.gnu.org>
478
479 PR fortran/36322
480 PR fortran/36463
481 * gfortran.h: New function gfc_expr_replace_symbols.
482 * decl.c (match_procedure_decl): Increase reference count for interface.
483 * expr.c: New functions replace_symbol and gfc_expr_replace_symbols.
484 * resolve.c (resolve_symbol): Correctly copy array spec and char len
485 of PROCEDURE declarations from their interface.
486 * symbol.c (gfc_get_default_type): Enhanced error message.
487 (copy_formal_args): Call copy_formal_args recursively for arguments.
488 * trans-expr.c (gfc_conv_function_call): Bugfix.
489
1b867ae7
DW
4902008-11-01 Dennis Wassel <dennis.wassel@gmail.com>
491
492 PR fortran/37159
493 * fortran/check.c (gfc_check_random_seed): Check PUT size
494 at compile time.
495
d3d0b9e0
MM
4962008-10-31 Mikael Morin <mikael.morin@tele2.fr>
497
498 PR fortran/35840
499 * expr.c (gfc_reduce_init_expr): New function, containing checking code
500 from gfc_match_init_expr, so that checking can be deferred.
501 (gfc_match_init_expr): Use gfc_reduce_init_expr.
502 * io.c (check_io_constraints): Use gfc_reduce_init_expr instead of
503 checking that the expression is a constant.
504 * match.h (gfc_reduce_init_expr): Prototype added.
505
0e6834af
MM
5062008-10-31 Mikael Morin <mikael.morin@tele2.fr>
507
508 PR fortran/35820
509 * resolve.c (gfc_count_forall_iterators): New function.
510 (gfc_resolve_forall): Use gfc_count_forall_iterators to evaluate
511 the needed memory amount to allocate. Don't forget to free allocated
512 memory. Add an assertion to check for memory leaks.
513
7278e4dc
SK
5142008-10-30 Steven G. Kargl <kargls@comcast.net>
515
516 PR fortran/37930
517 * fortran/arith.c (gfc_mpfr_to_mpz): Test for NaN and Inf values.
518 Remove stale comment and kludge code for MPFR 2.0.1 and older.
519 (gfc_real2int): Error on conversion of NaN or Inf.
520 (gfc_complex2int): Ditto.
521 * fortran/arith.h: Update mpfr_to_mpz prototype.
522 * fortran/simplify.c (gfc_simplify_ceiling, gfc_simplify_floor,
523 gfc_simplify_ifix, gfc_simplify_idint, simplify_nint): Update function
63346ddb 524 calls to include locus.
7278e4dc 525
45bc572c
MM
5262008-10-30 Mikael Morin <mikael.morin@tele2.fr>
527
528 PR fortran/37903
529 * trans-array.c (gfc_trans_create_temp_array): If n is less
530 than the temporary dimension, assert that loop->from is
531 zero (reverts to earlier versions). If there is at least one
532 null loop->to[n], it is a callee allocated array so set the
533 size to NULL and break.
534 (gfc_trans_constant_array_constructor): Set the offset to zero.
535 (gfc_trans_array_constructor): Remove loop shifting around the
536 temporary creation.
537 (gfc_conv_loop_setup): Prefer zero-based descriptors if
538 possible. Calculate the translation from loop variables to
539 array indices if an array constructor.
540
5412008-10-30 Mikael Morin <mikael.morin@tele2.fr>
542
543 PR fortran/37749
544 * trans-array.c (gfc_trans_create_temp_array): If size is NULL
545 use the array bounds for loop->to.
546
e18f73cd
TB
5472008-10-28 Tobias Burnus <burnus@net-b.de>
548
549 * intrinsic.texi: Update OpenMP section for OMPv3.
550
7134e605
JJ
5512008-10-24 Jakub Jelinek <jakub@redhat.com>
552
553 * Make-lang.in (check-f95-subtargets, check-fortran-subtargets): New
554 aliases for check-gfortran-subtargets.
555 (lang_checks_parallelized): Add check-gfortran.
556 (check_gfortran_parallelize): New variable.
557
18c87fd5
PT
5582008-10-19 Paul Thomas <pault@gcc.gnu.org>
559
e18f73cd
TB
560 PR fortran/37723
561 * dependency.c (gfc_dep_resolver ): If we find equal array
18c87fd5
PT
562 element references, go on to the next reference.
563
dd9315de
DK
5642008-10-16 Daniel Kraft <d@domob.eu>
565
566 * resolve.c (resolve_elemental_actual): Handle calls to intrinsic
567 subroutines correctly.
568
36c713e0
KG
5692008-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
570
571 * simplify.c: Remove MPFR_VERSION_NUM(2,3,0) conditionals.
572
ed42adef
DK
5732008-10-12 Daniel Kraft <d@domob.eu>
574
575 PR fortran/37688
576 * expr.c (gfc_expr_check_typed): Extend permission of untyped
577 expressions to both top-level variable and basic arithmetic expressions.
578
b803690a
PT
5792008-10-12 Paul Thomas <pault@gcc.gnu.org>
580
581 PR fortran/37787
582 * dependency.c (gfc_are_equivalenced_arrays): Look in symbol
583 namespace rather than current namespace, if it is available.
584
7a99defe
SK
5852008-10-12 Steven G. Kargl <kargls@comcast.net>
586
587 PR fortran/37792
588 * fortran/resolve.c (resolve_fl_variable): Simplify the
589 initializer if there is one.
590
91a9632c
PT
5912008-10-11 Paul Thomas <pault@gcc.gnu.org>
592
593 PR fortran/37794
594 * module.c (check_for_ambiguous): Remove redundant code.
595
a3d3c0f5
DK
5962008-10-09 Daniel Kraft <d@domob.eu>
597
598 PR fortran/35723
599 * gfortran.h (gfc_suppress_error): Removed from header.
600 (gfc_push_suppress_errors), (gfc_pop_suppress_errors): New methods.
601 * array.c (gfc_array_size): Use new gfc_push/pop_suppress_errors
602 instead of directly changing gfc_suppress_error.
603 * intrinsic.c (gfc_intrinsic_func_interface): Ditto.
604 (gfc_intrinsic_sub_interface): Ditto.
605 * error.c (suppress_errors): Made static from `gfc_suppress_error'.
606 (gfc_push_suppress_errors), (gfc_pop_suppress_errors): New methods.
607 (gfc_notify_std), (gfc_error): Use new static name of global.
608 * expr.c (check_arglist), (check_references): New methods.
609 (check_restricted): Check arglists and references of EXPR_FUNCTIONs
610 and EXPR_VARAIBALEs, respectively. Allow PARAMETER symbols.
611
c7c79a09
JJ
6122008-10-07 Jakub Jelinek <jakub@redhat.com>
613
614 * f95-lang.c (poplevel): Don't clear BLOCK_VARS if functionbody.
615 * trans-decl.c (gfc_build_qualified_array): Build accurate debug type
616 even if nest.
617 (build_entry_thunks, gfc_generate_function_code,
618 gfc_generate_constructors): Ensure DECL_SAVED_TREE is a BIND_EXPR
619 with DECL_INITIAL as its BLOCK.
620
ebb479cd
PT
6212008-10-05 Paul Thomas <pault@gcc.gnu.org>
622
623 PR fortran/35680
624 * gfortran.h : Add 'error' bit field to gfc_expr structure.
625 * expr.c (check_inquiry): When checking a restricted expression
626 check that arguments are either variables or restricted.
627 (check_restricted): Do not emit error if the expression has
628 'error' set. Clean up detection of host-associated variable.
629
b82657f4
DK
6302008-10-05 Daniel Kraft <d@domob.eu>
631
632 PR fortran/37638
633 * gfortran.h (struct gfc_typebound_proc): New flag `error'.
634 * resolve.c (update_arglist_pass): Added assertion.
635 (update_compcall_arglist): Fail early for erraneous procedures to avoid
636 confusion later.
637 (resolve_typebound_generic_call): Ignore erraneous specific targets
638 and added assertions.
639 (resolve_typebound_procedure): Set new `error' flag.
640
ee9ef103
PT
6412008-10-04 Paul Thomas <pault@gcc.gnu.org>
642
643 PR fortran/37706
644 * module.c (load_equiv): Check the module before negating the
645 unused flag.
646
414f00e9
SB
6472008-10-02 Steven Bosscher <steven@gcc.gnu.org>
648
649 PR fortran/37635
650 * intrinsic.c (add_functions): Add LEADZ and TRAILZ as generics.
651 * intrinsic.h (gfc_simplify_leadz, gfc_simplify_trailz): New protos.
652 * gfortran.h <enum gfc_isym_id>: (GFC_ISYM_LEADZ, GFC_ISYM_TRAILZ): New.
653 * f95-lang (gfc_init_builtin_functions): Add BUILT_IN_CLZ,
654 BUILT_IN_CLZL, BUILT_IN_CLZLL, BUILT_IN_CTZ, BUILT_IN_CTZL, and
655 BUILT_IN_CTZLL.
656 * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
657 gfc_conv_intrinsic_trails): New code-generation functions for LEADZ
658 and TRAILZ intrinsics.
659 (gfc_conv_intrinsic_function): Use them
660 * intrinsic.texi: Add documentation for LEADZ and TRAILZ.
661 * simplify.c (gfc_simplify_leadz, gfc_simplify_trailz): New functions.
662
00625fae
JW
6632008-09-30 Janus Weil <janus@gcc.gnu.org>
664
665 PR fortran/36592
666 * symbol.c (check_conflict): If a symbol in a COMMON block is a
667 procedure, it must be a procedure pointer.
668 (gfc_add_in_common): Symbols in COMMON blocks may be variables or
669 procedure pointers.
670 * trans-types.c (gfc_sym_type): Make procedure pointers in COMMON
671 blocks work.
672
5e1bdeb7
JD
6732008-09-25 Jerry DeLisle <jvdelisle@gcc.gnu.org
674
675 PR fortran/37498
676 * trans-io.c (build_dt): Revert previous patch..
677 * ioparm.def: Delete IOPARM_dt_f2003.
678
3dcc3ef2
TB
6792008-09-25 Tobias Burnus <burnus@net-b.de>
680
681 PR fortran/37504
682 * expr.c (gfc_check_pointer_assign): Allow assignment of
683 protected pointers.
684 * match.c (gfc_match_assignment,gfc_match_pointer_assignment):
685 Remove unreachable code.
686
5fb41e29
TB
6872008-09-24 Tobias Burnus <burnus@net-b.de>
688
689 * options.c (set_default_std_flags,gfc_init_options):
690 Add comment: keep in sync with libgfortran.
691
a9b98c2c
TB
6922008-09-24 Tobias Burnus <burnus@net-b.de>
693
694 PR fortran/37626
695 * trans-array.c (gfc_trans_deferred_array): Don't auto-deallocate
696 result variables.
697
f0ac18b7
DK
6982008-09-23 Daniel Kraft <d@domob.eu>
699
700 PR fortran/37588
701 * gfortran.h (gfc_compare_actual_formal): Removed, made private.
702 (gfc_arglist_matches_symbol): New method.
703 * interface.c (compare_actual_formal): Made static.
704 (gfc_procedure_use): Use new name of compare_actual_formal.
705 (gfc_arglist_matches_symbol): New method.
706 (gfc_search_interface): Moved code partially to new
707 gfc_arglist_matches_symbol.
708 * resolve.c (resolve_typebound_generic_call): Resolve actual arglist
709 before checking against formal and use new gfc_arglist_matches_symbol
710 for checking.
711 (resolve_compcall): Set type-spec of generated expression.
712
54799fcd
TB
7132008-09-23 Tobias Burnus <burnus@net-b.de>
714
715 PR fortran/37580
716 * expr.c (gfc_check_pointer_assign): Add checks for pointer
717 remapping.
718
d7445152
JD
7192008-09-22 Jerry DeLisle <jvdelisle@gcc.gnu.org
720
721 PR fortran/37498
722 * trans-io.c (gfc_build_io_library_fndecls): Bump pad size.
723 (build_dt): Set mask bit for IOPARM_dt_f2003.
724 * ioparm.def: Add IOPARM_dt_f2003.
725
f613cea7
JW
7262008-09-22 Janus Weil <janus@gcc.gnu.org>
727
728 PR fortran/37486
729 * gfortran.h (gfc_option_t): New members flag_align_commons and
730 warn_align_commons.
731 * lang.opt: New options falign-commons and Walign-commons.
732 * invoke.texi: Documentation for new options.
733 * options.c (gfc_init_options): Initialize new options.
734 (gfc_handle_options): Handle new options.
735 * trans-common.c (translate_common): Implement new options.
736 (gfc_trans_common): Set correct locus.
737
ecd3b73c
PT
7382008-09-21 Paul Thomas <pault@gcc.gnu.org>
739
740 PR fortran/37583
741 * decl.c (scalarize_intrinsic_call): Both subroutines and
742 functions can give a true for get_proc_mame's last argument so
743 remove the &&gfc_current_ns->proc_name->attr.function.
744 resolve.c (resolve_actual_arglist): Add check for recursion by
745 reference to procedure as actual argument.
746
4b7f8314
DK
7472008-09-21 Daniel Kraft <d@domob.eu>
748
749 PR fortran/35846
750 * trans.h (gfc_conv_string_length): New argument `expr'.
751 * trans-expr.c (flatten_array_ctors_without_strlen): New method.
752 (gfc_conv_string_length): New argument `expr' that is used in a new
753 special case handling if cl->length is NULL.
754 (gfc_conv_subref_array_arg): Pass expr to gfc_conv_string_length.
755 * trans-array.c (gfc_conv_expr_descriptor): Ditto.
756 (gfc_trans_auto_array_allocation): Pass NULL as new expr.
757 (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
758 (gfc_trans_deferred_array): Ditto.
759 (gfc_trans_array_constructor): Save and restore old values of globals
760 used for bounds checking.
761 * trans-decl.c (gfc_trans_dummy_character): Ditto.
762 (gfc_trans_auto_character_variable): Ditto.
763
74a9b897
DK
7642008-09-21 Daniel Kraft <d@domob.eu>
765
766 * decl.c (match_procedure_in_type): Changed misleading error message
767 for not yet implemented PROCEDURE(interface) syntax.
768
334e912a
PT
7692008-09-18 Paul Thomas <pault@gcc.gnu.org>
770
771 PR fortran/35945
772 * resolve.c (resolve_fl_variable_derived): Remove derived type
773 comparison for use associated derived types. Host association
774 of a derived type will not arise if there is a local derived type
775 whose use name is the same.
776
777 PR fortran/36700
778 * match.c (gfc_match_call): Use the existing symbol even if
779 it is a function.
780
f25a62a5
DK
7812008-09-18 Daniel Kraft <d@domob.eu>
782
783 PR fortran/37507
784 * trans.h (gfc_trans_runtime_error): New method.
785 (gfc_trans_runtime_error_vararg): New method.
786 (gfc_allocate_array_with_status): New argument `expr' for locus/varname.
787 (gfc_deallocate_array_with_status): Ditto.
788 * trans-array.h (gfc_array_deallocate): Ditto.
789 * trans.c (gfc_trans_runtime_error): New method.
790 (gfc_trans_runtime_error_vararg): New method, moved parts of the code
791 from gfc_trans_runtime_check here.
792 (gfc_trans_runtime_error_check): Moved code partly to new method.
793 (gfc_call_malloc): Fix tab-indentation.
794 (gfc_allocate_array_with_status): New argument `expr' and call
795 gfc_trans_runtime_error for error reporting to include locus.
796 (gfc_deallocate_with_status): Ditto.
797 * trans-stmt.c (gfc_trans_deallocate): Pass expr as new argument.
798 * trans-array.c (gfc_array_allocate): Ditto.
799 (gfc_array_deallocate): New argument `expr', passed on.
800 (gfc_trans_dealloc_allocated): Pass NULL for expr.
801 * trans-openmp.c (gfc_omp_clause_default): Ditto.
802
0b4e2af7
PT
8032008-09-18 Paul Thomas <pault@gcc.gnu.org>
804
805 PR fortran/37274
806 PR fortran/36374
807 * module.c (check_for_ambiguous): New function to test loaded
808 symbol for ambiguity with fixup symbol.
809 (read_module): Call check_for_ambiguous.
810 (write_symtree): Do not write the symtree for symbols coming
811 from an interface body.
812
813 PR fortran/36374
814 * resolve.c (count_specific_procs ): New function to count the
815 number of specific procedures with the same name as the generic
816 and emit appropriate errors for and actual argument reference.
817 (resolve_assumed_size_actual): Add new argument no_formal_args.
818 Correct logic around passing generic procedures as arguments.
819 Call count_specific_procs from two locations.
820 (resolve_function): Evaluate and pass no_formal_args.
821 (resolve call): The same and clean up a bit by using csym more
822 widely.
823
824 PR fortran/36454
825 * symbol.c (gfc_add_access): Access can be updated if use
826 associated and not private.
827
c0b29099
JJ
8282008-09-17 Jakub Jelinek <jakub@redhat.com>
829
830 PR fortran/37536
831 * trans-stmt.c (gfc_trans_do): Optimize integer type non-simple
832 do loop initialization.
833
3446fc50
JD
8342008-09-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
835 Tobias Burnus <burnus@net.b.de>
836
837 PR fortran/35840
838 * io.c (match_vtag): Add tag name to error message.
839 (match_out_tag): Cleanup whitespace.
840 (gfc_resolve_dt): Resolve id and async tags.
841
858f1fa2
DK
8422008-09-13 Daniel Kraft <d@domob.eu>
843
844 PR fortran/35770
845 * primary.c (gfc_match_varspec): Added missing type-spec clearing
846 after wrong implicit character typing.
847
29442589
RG
8482008-09-12 Richard Guenther <rguenther@suse.de>
849
850 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Use
851 build_fold_addr_expr to properly mark the argument
852 addressable.
853
ace428e3
DK
8542008-09-11 Daniel Kraft <d@domob.eu>
855
856 PR fortran/36214
857 * simplify.c (simplify_cmplx): Added linebreak to long line.
858 * target-memory.c (gfc_convert_boz): Fix indentation.
859 (gfc_interpret_float): Set mpfr precision to right value before
860 calling mpfr_init.
861
5bcb0cc3
L
8622008-09-10 H.J. Lu <hongjiu.lu@intel.com>
863
864 * expr.c (find_array_element): Reformat comment.
865
3b35a6f8
L
8662008-09-10 H.J. Lu <hongjiu.lu@intel.com>
867
868 * expr.c (find_array_element): Reformat.
869
06c7153f
TB
8702008-09-10 Tobias Burnus <burnus@net-b.de>
871
872 PR fortran/37420
873 * trans-decl.c (get_proc_pointer_decl): Fix -Wunused-variable.
874
00ca6640
DK
8752008-09-09 Daniel Kraft <d@domob.eu>
876
877 PR fortran/37429
878 * resolve.c (expression_rank): Added assertion to guard against
879 EXPR_COMPCALL expressions.
880 (resolve_compcall): Set expression's rank from the target procedure's.
881
18b0679f
DK
8822008-09-09 Daniel Kraft <d@domob.eu>
883
884 PR fortran/37411
885 * trans-array.c (gfc_conv_array_parameter): Added assertion that the
886 symbol has an array spec.
887
0a991dec
DK
8882008-09-08 Daniel Kraft <d@domob.eu>
889
890 PR fortran/37199
891 * trans-expr.c (gfc_add_interface_mapping): Set new_sym->as.
892 (gfc_map_intrinsic_function): Added checks against NULL bounds in
893 array specs.
894
10c17e8f
TB
8952008-09-08 Tobias Burnus <burnus@net.b.de>
896
897 PR fortran/37400
898 * symbol.c (gfc_set_default_type): Copy char len.
899
7a687b22
TB
9002008-09-06 Steven G. Kargl <kargls@comcast.net>
901
902 PR fortran/36153
903 * fortran/resolve.c (resolve_function): Shortcircuit for SIZE and
904 UBOUND if 2nd argument is KIND.
905
2c68bc89
SK
9062008-09-06 Steven G. Kargl <kargls@comcast.net>
907
908 PR fortran/33229
909 * resolve.c (resolve_function): An intrinsic subroutine should not be
910 called as a function.
911
a82f1f2e
DK
9122008-09-05 Daniel Kraft <d@domob.eu>
913
914 PR fortran/35837
915 * resolve.c (resolve_types): Restore gfc_current_ns on exit.
916 * symbol.c (gfc_save_all): Removed blank line.
917
ebac6d9c
DK
9182008-09-05 Daniel Kraft <d@domob.eu>
919
920 PR fortran/36746
921 * primary.c (gfc_match_rvalue): Removed logic to handle implicit
922 typing to a derived-type if a component reference is found.
923 (gfc_match_varspec): Moved it here.
924
6e1b67b3
RG
9252008-09-04 Richard Guenther <rguenther@suse.de>
926
927 * trans-array.c (gfc_conv_array_parameter): Use correct types
928 in building COND_EXPRs.
929 * trans-expr.c (gfc_conv_missing_dummy): Likewise.
930 * trans-intrinsics.c (gfc_conv_intrinsic_merge): Likewise.
931
d5551618
DK
9322008-09-04 Daniel Kraft <d@domob.eu>
933
934 * PR fortran/37099
935 * expr.c (simplify_const_ref): Update expression's character length
936 when pulling out a substring reference.
937
e0c68ce9
ILT
9382008-09-04 Ian Lance Taylor <iant@google.com>
939
940 * symbol.c (generate_isocbinding_symbol): Compare
941 gfc_notification_std with ERROR rather than FAILURE.
942 * resolve.c (check_assumed_size_reference): Compare array type
943 with AR_FULL rather than DIMEN_ELEMENT.
944 (resolve_actual_arglist): Compare with EXPR_VARIABLE rather than
945 FL_VARIABLE.
946
900e887f
JD
9472008-09-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
948
949 PR fortran/37228
950 * io.c (check_format): Allow specifying precision with g0 format.
951
52f49934
DK
9522008-09-02 Daniel Kraft <d@domob.eu>
953
954 * gfortran.h (struct gfc_namespace): New member `implicit_loc'.
955 (gfc_add_abstract): New method.
956 * decl.c (gfc_get_type_attr_spec): Match ABSTRACT attribute.
957 (gfc_match_derived_decl): Copy abstract attribute in derived symbol.
958 * dump-parse-tree.c (show_attr): Show ABSTRACT attribute as `ABSTRACT'
959 only to allow for ABSTRACT types.
960 * parse.c (parse_interface): Use new gfc_add_abstract.
961 * primary.c (gfc_match_structure_constructor): Check that no ABSTRACT
962 type is constructed.
963 * resolve.c (resolve_typespec_used): New method.
964 (resolve_fl_derived): Check type in respect to ABSTRACT attribute and
965 check that no component is of an ABSTRACT type.
966 (resolve_symbol): Check that no symbol is of an ABSTRACT type.
967 (resolve_types): Check IMPLICIT declarations for ABSTRACT types.
968 * symbol.c (gfc_merge_new_implicit): Remember loci of IMPLICIT's.
969 (gfc_add_abstract): New method.
970
3e1e5626
DK
9712008-09-01 Daniel Kraft <d@domob.eu>
972
973 PR fortran/37193
974 * module.c (read_module): Initialize use_only flag on used symbols.
975
a64a8f2f
DK
9762008-09-01 Daniel Kraft <d@domob.eu>
977
978 * gfc-internals.texi (F2003 OOP), (Type-bound Procedures): New chapter
979 and section to document the internals of type-bound procedures.
980 (gfc_expr): Document EXPR_COMPCALL.
981 * gfortran.h (struct gfc_expr): Remove unused `derived' from compcall.
982 * dump-parse-tree.c (show_compcall): New method.
983 (show_expr): Call it for EXPR_COMPCALL.
984 (show_typebound), (show_f2k_derived): New methods.
985 (show_symbol): Call show_f2k_derived.
986 (show_code_node): Handle EXEC_COMPCALL.
987 * primary.c (gfc_match_varspec): Don't initialize removed `derived' in
988 primary->value.compcall.
989
eb829078
RG
9902008-08-31 Richard Guenther <rguenther@suse.de>
991
992 * trans-expr.c (gfc_trans_string_copy): Use the correct types
993 to compute slen and dlen.
994
e157f736
DK
9952008-08-31 Daniel Kraft <d@domob.eu>
996
997 * gfortran.h (enum gfc_statement): New entry `ST_GENERIC'.
998 (struct gfc_tbp_generic): New type.
999 (struct gfc_typebound_proc): Removed `target' and added union with
1000 `specific' and `generic' members; new members `overridden',
1001 `subroutine', `function' and `is_generic'.
1002 (struct gfc_expr): New members `derived' and `name' in compcall union
1003 member and changed type of `tbp' to gfc_typebound_proc.
1004 (gfc_compare_interfaces), (gfc_compare_actual_formal): Made public.
1005 * match.h (gfc_typebound_default_access): New global.
1006 (gfc_match_generic): New method.
1007 * decl.c (gfc_match_generic): New method.
1008 (match_binding_attributes): New argument `generic' and handle it.
1009 (match_procedure_in_type): Mark matched binding as non-generic.
1010 * interface.c (gfc_compare_interfaces): Made public.
1011 (gfc_compare_actual_formal): Ditto.
1012 (check_interface_1), (compare_parameter): Use new public names.
1013 (gfc_procedure_use), (gfc_search_interface): Ditto.
1014 * match.c (match_typebound_call): Set base-symbol referenced.
1015 * module.c (binding_generic): New global array.
1016 (current_f2k_derived): New global.
1017 (mio_typebound_proc): Handle IO of GENERIC bindings.
1018 (mio_f2k_derived): Record current f2k-namespace in current_f2k_derived.
1019 * parse.c (decode_statement): Handle GENERIC statement.
1020 (gfc_ascii_statement): Ditto.
1021 (typebound_default_access), (set_typebound_default_access): Removed.
1022 (gfc_typebound_default_access): New global.
1023 (parse_derived_contains): New default-access implementation and handle
1024 GENERIC statements encountered.
1025 * primary.c (gfc_match_varspec): Adapted to new gfc_typebound_proc
1026 structure and removed check for SUBROUTINE/FUNCTION from here.
1027 * resolve.c (extract_compcall_passed_object): New method.
1028 (update_compcall_arglist): Use it.
1029 (resolve_typebound_static): Adapted to new gfc_typebound_proc structure.
1030 (resolve_typebound_generic_call): New method.
1031 (resolve_typebound_call): Check target is a SUBROUTINE and handle calls
1032 to GENERIC bindings.
1033 (resolve_compcall): Ditto (check for target being FUNCTION).
1034 (check_typebound_override): Handle GENERIC bindings.
1035 (check_generic_tbp_ambiguity), (resolve_typebound_generic): New methods.
1036 (resolve_typebound_procedure): Handle GENERIC bindings and set new
1037 attributes subroutine, function and overridden in gfc_typebound_proc.
1038 (resolve_fl_derived): Ensure extended type is resolved before the
1039 extending one is.
1040 * st.c (gfc_free_statement): Fix bug with free'ing EXEC_COMPCALL's.
1041 * symbol.c (gfc_find_typebound_proc): Adapt for GENERIC changes.
1042
041f300d
JH
10432008-08-29 Jan Hubicka <jh@suse.cz>
1044
8bcf15f6 1045 * parse.c (parse_interface): Silence uninitialized var warning.
041f300d 1046
a64f5186
JJ
10472008-08-29 Jakub Jelinek <jakub@redhat.com>
1048
de870512
JJ
1049 * trans.h (struct lang_type): Add span.
1050 (GFC_TYPE_ARRAY_SPAN): Define.
1051 * trans-decl.c (gfc_get_symbol_decl): For subref array pointers,
1052 copy TREE_STATIC from decl to span instead of setting it
1053 unconditionally, set DECL_ARTIFICIAL, fix type of initializer
1054 and set GFC_TYPE_ARRAY_SPAN on decl's type.
1055 * trans-types.c (gfc_get_array_descr_info): If
1056 GFC_TYPE_ARRAY_SPAN is non-NULL, use it as element size.
1057
bd11e37d
JJ
1058 * trans-decl.c (check_constant_initializer,
1059 gfc_emit_parameter_debug_info): New functions.
1060 (gfc_generate_module_vars, gfc_generate_function_code): Emit
1061 PARAMETERs and unreferenced variables with initializers into
1062 debug info.
1063
9268ba9a
JJ
1064 * gfortran.h (gfc_use_list): Add where field.
1065 * module.c (use_locus): New static variable.
1066 (gfc_match_use): Set it.
1067 (gfc_use_module): Copy it to gfc_use_list's where field.
1068 * trans-decl.c (gfc_generate_module_vars): Call gfc_trans_use_stmts.
1069 (gfc_trans_use_stmts): Set backend locus before calling the debug
1070 hook. Allow non-VAR_DECLs to be created even for non-external
1071 module. Don't emit anything so far for renames from different
1072 modules.
1073
714495cd
JJ
1074 PR fortran/24790
1075 * trans-decl.c (create_function_arglist): Set DECL_BY_REFERENCE on
1076 PARM_DECLs with pointer or reference type.
1077
25c29c56
JJ
1078 * trans-decl.c (gfc_build_qualified_array): Build non-flat
1079 array type for debug info purposes.
1080
a64f5186
JJ
1081 PR fortran/29635
1082 PR fortran/23057
1083 * f95-lang.c (gfc_init_ts): New function.
1084 (LANG_HOOKS_INIT_TS): Define.
1085 * gfortran.h (gfc_use_rename): New type, moved from module.c.
1086 (gfc_get_use_rename): New macro, moved from module.c.
1087 (gfc_use_list): New type.
1088 (gfc_get_use_list): New macro.
1089 (gfc_namespace): Add use_stmts field.
1090 (gfc_free_use_stmts): New prototype.
1091 * Make-lang.in (fortran/trans-decl.o): Depend on debug.h.
1092 * module.c (gfc_use_rename, gfc_get_use_rename): Moved to
1093 gfortran.h.
1094 (gfc_use_module): Chain the USE statement info to
1095 ns->use_stmts.
1096 (gfc_free_use_stmts): New function.
1097 * symbol.c (gfc_free_namespace): Call gfc_free_use_stmts.
1098 * trans.h (struct module_htab_entry): New type.
1099 (gfc_find_module, gfc_module_add_decl): New functions.
1100 * trans.c (gfc_generate_module_code): Create NAMESPACE_DECL for
1101 the module, adjust DECL_CONTEXTs of module procedures and
1102 call gfc_module_add_decl for them.
1103 * trans-common.c (build_common_decl): Set DECL_IGNORED_P
1104 on the common variable.
1105 (create_common): Set DECL_IGNORED_P for use associated vars.
1106 * trans-decl.c: Include debug.h.
1107 (gfc_get_symbol_decl): Set DECL_IGNORED_P on use_assoc vars from
1108 modules.
1109 (build_function_decl): Allow current_function_decl's context
1110 to be a NAMESPACE_DECL.
1111 (module_htab, cur_module): New variables.
1112 (module_htab_do_hash, module_htab_eq, module_htab_decls_hash,
1113 module_htab_decls_eq, gfc_find_module, gfc_module_add_decl): New
1114 functions.
1115 (gfc_create_module_variable): Adjust DECL_CONTEXTs of module
1116 variables and types and call gfc_module_add_decl for them.
1117 (gfc_generate_module_vars): Temporarily set cur_module.
1118 (gfc_trans_use_stmts): New function.
1119 (gfc_generate_function_code): Call it.
1120 (gfc_generate_block_data): Set DECL_IGNORED_P on decl.
1121 * trans-types.c (gfc_get_derived_type): Adjust DECL_CONTEXT
1122 and TYPE_CONTEXT of module derived types.
1123
8e1f752a
DK
11242008-08-28 Daniel Kraft <d@domob.eu>
1125
1126 * gfortran.h (enum expr_t): New value `EXPR_COMPCALL'.
1127 (gfc_get_typebound_proc): New macro.
1128 (struct gfc_expr): New union-member `compcall' for EXPR_COMPCALL.
1129 (enum gfc_exec_op): New value `EXEC_COMPCALL'.
1130 (gfc_find_typebound_proc): New argument.
1131 (gfc_copy_ref), (gfc_match_varspec): Made public.
1132 * decl.c (match_procedure_in_type): Use gfc_get_typebound_proc.
1133 * expr.c (free_expr0), (gfc_copy_expr): Handle EXPR_COMPCALL.
1134 (gfc_copy_ref): Made public and use new name.
1135 (simplify_const_ref): Use new name of gfc_copy_ref.
1136 (simplify_parameter_variable): Ditto.
1137 (gfc_simplify_expr): gcc_unreachable for EXPR_COMPCALL.
1138 * match.c (match_typebound_call): New method.
1139 (gfc_match_call): Allow for CALL's to typebound procedures.
1140 * module.c (binding_passing), (binding_overriding): New variables.
1141 (expr_types): Add EXPR_COMPCALL.
1142 (mio_expr): gcc_unreachable for EXPR_COMPCALL.
1143 (mio_typebound_proc), (mio_typebound_symtree): New methods.
1144 (mio_f2k_derived): Handle type-bound procedures.
1145 * primary.c (gfc_match_varspec): Made public and parse trailing
1146 references to type-bound procedures; new argument `sub_flag'.
1147 (gfc_match_rvalue): New name and argument of gfc_match_varspec.
1148 (match_variable): Ditto.
1149 * resolve.c (update_arglist_pass): New method.
1150 (update_compcall_arglist), (resolve_typebound_static): New methods.
1151 (resolve_typebound_call), (resolve_compcall): New methods.
1152 (gfc_resolve_expr): Handle EXPR_COMPCALL.
1153 (resolve_code): Handle EXEC_COMPCALL.
1154 (resolve_fl_derived): New argument to gfc_find_typebound_proc.
1155 (resolve_typebound_procedure): Ditto and removed not-implemented error.
1156 * st.c (gfc_free_statement): Handle EXEC_COMPCALL.
1157 * symbol.c (gfc_find_typebound_proc): New argument `noaccess' and
1158 implement access-checking.
1159 * trans-expr.c (gfc_apply_interface_mapping_to_expr): gcc_unreachable
1160 on EXPR_COMPCALL.
1161 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Add missing break.
1162 * trans-openmp.c (gfc_trans_omp_array_reduction): Add missing
1163 intialization of ref->type.
1164
b7fdeec9
JW
11652008-08-28 Janus Weil <janus@gcc.gnu.org>
1166
1167 PR fortran/37253
1168 * module.c (ab_attribute,attr_bits,mio_symbol_attribute): Take care of
1169 saving attr.procedure and attr.proc_ptr to the module file.
1170
9d1210f4
DK
11712008-08-25 Daniel Kraft <d@domob.eu>
1172
1173 * gfortran.h (gfc_find_component): Add new arguments.
1174 * parse.c (parse_derived_contains): Check if the derived-type containing
1175 the CONTAINS section is SEQUENCE/BIND(C).
1176 * resolve.c (resolve_typebound_procedure): Check for name collision with
1177 components.
1178 (resolve_fl_derived): Check for name collision with inherited
1179 type-bound procedures.
1180 * symbol.c (gfc_find_component): New arguments `noaccess' and `silent'.
1181 (gfc_add_component): Adapt for new arguments.
1182 * primary.c (match_varspec), (gfc_match_structure_constructor): Ditto.
1183
8327f9c2
TB
11842008-08-24 Tobias Burnus <burnus@net-b.de>
1185
1186 PR fortran/37201
1187 * decl.c (verify_bind_c_sym): Reject array/string returning
1188 functions.
1189
3a73a540
TB
11902008-08-24 Tobias Burnus <burnus@net-b.de>
1191
1192 PR fortran/37201
1193 * trans-expr.c (gfc_conv_function_call): Add string_length
1194 for character-returning bind(C) functions.
1195
30b608eb
DK
11962008-08-24 Daniel Kraft <d@domob.eu>
1197
1198 * gfortran.h (gfc_typebound_proc): New struct.
1199 (gfc_symtree): New member typebound.
1200 (gfc_find_typebound_proc): Prototype for new method.
1201 (gfc_get_derived_super_type): Prototype for new method.
1202 * parse.h (gfc_compile_state): New state COMP_DERIVED_CONTAINS.
1203 * decl.c (gfc_match_procedure): Handle PROCEDURE inside derived-type
1204 CONTAINS section.
1205 (gfc_match_end): Handle new context COMP_DERIVED_CONTAINS.
1206 (gfc_match_private): Ditto.
1207 (match_binding_attributes), (match_procedure_in_type): New methods.
1208 (gfc_match_final_decl): Rewrote to make use of new
1209 COMP_DERIVED_CONTAINS parser state.
1210 * parse.c (typebound_default_access): New global helper variable.
1211 (set_typebound_default_access): New callback method.
1212 (parse_derived_contains): New method.
1213 (parse_derived): Extracted handling of CONTAINS to new parser state
1214 and parse_derived_contains.
1215 * resolve.c (resolve_bindings_derived), (resolve_bindings_result): New.
1216 (check_typebound_override), (resolve_typebound_procedure): New methods.
1217 (resolve_typebound_procedures): New method.
1218 (resolve_fl_derived): Call new resolving method for typebound procs.
1219 * symbol.c (gfc_new_symtree): Initialize new member typebound to NULL.
1220 (gfc_find_typebound_proc): New method.
1221 (gfc_get_derived_super_type): New method.
1222
d4b7d0f0
JW
12232008-08-23 Janus Weil <janus@gcc.gnu.org>
1224
1225 * gfortran.h (gfc_component): Add field "symbol_attribute attr", remove
1226 fields "pointer", "allocatable", "dimension", "access".
1227 Remove functions "gfc_set_component_attr" and "gfc_get_component_attr".
1228 * interface.c (gfc_compare_derived_types): Ditto.
1229 * trans-array.c (gfc_array_allocate,structure_alloc_comps): Ditto.
1230 * trans-expr.c (gfc_conv_component_ref,gfc_trans_subcomponent_assign,
1231 gfc_conv_structure): Ditto.
1232 * symbol.c (gfc_find_component,free_components,gfc_set_component_attr,
1233 gfc_get_component_attr,verify_bind_c_derived_type,
1234 generate_isocbinding_symbol): Ditto.
1235 * decl.c (build_struct): Ditto.
1236 * dump-parse-tree.c (show_components): Ditto.
1237 * trans-stmt.c (gfc_trans_deallocate): Ditto.
1238 * expr.c (gfc_check_assign,gfc_check_pointer_assign,
1239 gfc_default_initializer): Ditto.
1240 * module.c (mio_component): Ditto.
1241 * trans-types.c (copy_dt_decls_ifequal,gfc_get_derived_type): Ditto.
1242 * resolve.c (has_default_initializer,resolve_structure_cons,
1243 gfc_iso_c_func_interface,find_array_spec,resolve_ref,
1244 resolve_deallocate_expr,resolve_allocate_expr,resolve_fl_derived,
1245 resolve_equivalence_derived): Ditto.
1246 * trans-io.c (transfer_expr): Ditto.
1247 * parse.c (parse_derived): Ditto.
1248 * dependency.c (gfc_check_dependency): Ditto.
1249 * primary.c (gfc_variable_attr): Ditto.
1250
3434e9a4
TB
12512008-08-23 Tobias Burnus <burnus@net-b.de>
1252
1253 PR fortran/37076
1254 * arith.c (gfc_arith_concat): Fix concat of kind=4 strings.
1255
12ba225d
TB
12562008-08-23 Tobias Burnus <burnus@net-b.de>
1257
1258 PR fortran/37025
1259 * target-memory.c (gfc_interpret_character): Support
1260 kind=4 characters.
1261
fee3292b
DK
12622008-08-22 Daniel Kraft <d@domob.eu>
1263
1264 PR fortran/30239
1265 * symbol.c (gfc_add_type): Warn on -Wsurprising if a function-result
1266 type is re-declared but neither -pedantic nor -std=f* is given and so
1267 this is no error.
1268 * invoke.texi (-Wsurprising): Document this new behaviour.
1269
3df684e2
DK
12702008-08-22 Daniel Kraft <d@domob.eu>
1271
1272 * gfortran.h (in_prefix): Removed from this header.
1273 * match.h (gfc_matching_prefix): Moved and renamed from `in_prefix'.
1274 * decl.c (in_prefix): Removed from here.
1275 (gfc_match_prefix): Use new name of `gfc_matching_prefix'.
1276 * symbol.c (gfc_check_symbol_typed): Ditto.
1277 * expr.c (check_typed_ns): New helper variable.
1278 (expr_check_typed_help): New helper method.
1279 (gfc_expr_check_typed): Rewrote to use gfc_traverse_expr to do the
1280 work, fixing a minor problem.
1281 * match.c (gfc_matching_prefix): New variable.
1282
f37e928c
DK
12832008-08-22 Daniel Kraft <d@domob.eu>
1284
1285 PR fortran/32095
1286 PR fortran/34228
1287 * gfortran.h (in_prefix): New global.
1288 (gfc_check_symbol_typed), (gfc_check_expr_typed): New methods.
1289 * array.c (match_array_element_spec): Check that bounds-expressions
1290 don't have symbols not-yet-typed in them.
1291 * decl.c (var_element): Check that variable used is already typed.
1292 (char_len_param_value): Check that expression does not contain
1293 not-yet-typed symbols.
1294 (in_prefix): New global.
1295 (gfc_match_prefix): Record using `in_prefix' if we're at the moment
1296 parsing a prefix or not.
1297 * expr.c (gfc_expr_check_typed): New method.
1298 * parse.c (verify_st_order): New argument to disable error output.
1299 (check_function_result_typed): New helper method.
1300 (parse_spec): Check that the function-result declaration, if given in
1301 a prefix, contains no not-yet-typed symbols when the IMPLICIT rules are
1302 parsed.
1303 * symbol.c (gfc_check_symbol_typed): Check that a symbol already has
1304 a type associated to it, otherwise use the IMPLICIT rules or signal
1305 an error.
1306
509c9d60
MLI
13072008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1308
1309 * f95-lang.c: Update all calls to pedwarn.
1310
f34cf28d
DF
13112008-08-18 Daniel Franke <franke.daniel@gmail.com>
1312
1313 PR fortran/37032
1314 * gfortran.texi: Document decision on include file handling in
1315 preprocessed files.
1316
6c397102
TB
13172008-08-16 Tobias Burnus <burnus@net-b.de>
1318
1319 PR fortran/36825
1320 * libgfortran.h: Reduce GFC_MAX_DIMENSIONS to 7.
1321
dad80a1b
JD
13222008-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1323
1324 PR fortran/35863
1325 * io.c (gfc_match_open): Enable UTF-8 in checks.
1326 * simplify.c (gfc_simplify_selected_char_kind): Enable iso_10646.
1327
beb4bd6c
JW
13282008-08-14 Janus Weil <janus@gcc.gnu.org>
1329
1330 PR fortran/36705
1331 * symbol.c (check_conflict): Move conflict checks for (procedure,save)
1332 and (procedure,intent) to resolve_fl_procedure.
1333 * resolve.c (resolve_fl_procedure): Ditto.
1334
71205d17
MLI
13352008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1336
1337 PR 36901
1338 * f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of
1339 'pedwarn0'.
1340
63a3341a
PT
13412008-08-09 Paul Thomas <pault@gcc.gnu.org>
1342
1343 PR fortran/37011
1344 * symbol.c (gfc_add_extension): New function.
1345 * decl.c (gfc_get_type_attr_spec): Call it.
1346 (gfc_match_derived_decl): Set symbol extension attribute from
1347 attr.extension.
1348 * gfortran.h : Add prototype for gfc_add_extension.
1349
e73f7547
MLI
13502008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1351
1352 PR 28875
1353 * options.c (set_Wall): Replace set_Wunused by warn_unused.
1354
f6fad28e
DK
13552008-08-08 Daniel Kraft <d@domob.eu>
1356
1357 * gfortran.h (gfc_finalizer): Replaced member `procedure' by two
1358 new members `proc_sym' and `proc_tree' to store the symtree after
1359 resolution.
1360 (gfc_find_sym_in_symtree): Made public.
1361 * decl.c (gfc_match_final_decl): Adapted for new member name.
1362 * interface.c (gfc_find_sym_in_symtree): Made public.
1363 (gfc_extend_expr), (gfc_extend_assign): Changed call accordingly.
1364 * module.c (mio_finalizer), (mio_f2k_derived), (mio_full_f2k_derived):
1365 New methods for module-file IO of f2k_derived.
1366 (mio_symbol): Do IO of f2k_derived namespace.
1367 * resolve.c (gfc_resolve_finalizers): Adapted for new member name and
1368 finding the symtree for the symbol here.
1369 * symbol.c (gfc_free_finalizer): Adapted for new members.
1370
70b1e376
RW
13712008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1372
1373 * gfc-internals.texi: Update to GFDL 1.2. Do not list GPL as
1374 Invariant Section.
1375 * gfortran.texi: Likewise.
1376 * intrinsic.texi: Do not list GPL as Invariant Section.
1377 * invoke.texi: Likewise. Update copyright years.
1378
7d1f1e61
PT
13792008-07-29 Paul Thomas <pault@gcc.gnu.org>
1380
1381 * trans-expr.c (conv_parent_component_references): New function
1382 to build missing parent references.
1383 (gfc_conv_variable): Call it
1384 * symbol.c (gfc_add_component): Check that component name in a
1385 derived type extension does not appear in parent.
1386 (gfc_find_component): For a derived type extension, check if
1387 the component appears in the parent derived type by calling
1388 self. Separate errors for private components and private types.
1389 * decl.c (match_data_constant): Add extra arg to call to
1390 gfc_match_structure_constructor.
1391 (check_extended_derived_type): New function to check that a
1392 parent derived type exists and that it is OK for exension.
1393 (gfc_get_type_attr_spec): Add extra argument 'name' and return
1394 it if extends is specified.
1395 (gfc_match_derived_decl): Match derived type extension and
1396 build a first component of the parent derived type if OK. Add
1397 the f2k namespace if not present.
1398 * gfortran.h : Add the extension attribute.
1399 * module.c : Handle attribute 'extension'.
1400 * match.h : Modify prototypes for gfc_get_type_attr_spec and
1401 gfc_match_structure_constructor.
1402 * primary.c (build_actual_constructor): New function extracted
1403 from gfc_match_structure_constructor and modified to call self
1404 iteratively to build derived type extensions, when f2k named
1405 components are used.
1406 (gfc_match_structure_constructor): Do not throw error for too
1407 many components if a parent type is being handled. Use
1408 gfc_find_component to generate errors for non-existent or
1409 private components. Iteratively call self for derived type
1410 extensions so that parent constructor is built. If extension
1411 and components left over, throw error.
1412 (gfc_match_rvalue): Add extra arg to call to
1413 gfc_match_structure_constructor.
1414
1415 * trans-array.c (gfc_conv_resolve_dependencies): If lhs and rhs
1416 are the same symbol, aliassing does not matter.
1417
e90acd93
JH
14182008-07-29 Jan Hubicka <jh@suse.cz>
1419
1420 * options.c (gfc_post_options): Do not set flag_no_inline.
1421
1fbfb0e2
DK
14222008-07-29 Daniel Kraft <d@domob.eu>
1423
1424 PR fortran/36403
1425 * trans-intrinsic.c (conv_generic_with_optional_char_arg): New method
1426 to append a string-length even if the string argument is missing, e.g.
1427 for EOSHIFT.
1428 (gfc_conv_intrinsic_function): Call the new method for EOSHIFT, PACK
1429 and RESHAPE.
1430
17b1d2a0
KG
14312008-07-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1432
1433 * gfortran.h (try): Remove macro. Replace try with gfc_try
1434 throughout.
1435 * array.c: Likewise.
1436 * check.c: Likewise.
1437 * cpp.c: Likewise.
1438 * cpp.h: Likewise.
1439 * data.c: Likewise.
1440 * data.h: Likewise.
1441 * decl.c: Likewise.
1442 * error.c: Likewise.
1443 * expr.c: Likewise.
1444 * interface.c: Likewise.
1445 * intrinsic.c: Likewise.
1446 * intrinsic.h: Likewise.
1447 * io.c: Likewise.
1448 * match.h: Likewise.
1449 * parse.c: Likewise.
1450 * parse.h: Likewise.
1451 * resolve.c: Likewise.
1452 * scanner.c: Likewise.
1453 * simplify.c: Likewise.
1454 * symbol.c: Likewise.
1455 * trans-openmp.c: Likewise.
1456 * trans-types.c: Likewise.
1457
8604e2cf
TB
14582008-07-28 Tobias Burnus <burnus@net-b.de>
1459
1460 * Make-lang.in: Remove -Wno-* from fortran-warn.
1461
726a989a
RB
14622008-07-28 Richard Guenther <rguenther@suse.de>
1463
1464 Merge from gimple-tuples-branch.
1465
1466 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1467
1468 * trans-expr.c: Include gimple.h instead of tree-gimple.h.
1469 * trans-array.c: Same.
1470 * trans-openmp.c: Same.
1471 * trans-stmt.c: Same.
1472 * f95-lang.c: Same.
1473 * trans-io.c: Same.
1474 * trans-decl.c: Same.
1475 * trans-intrinsic.c: Same.
1476 * trans.c: Same. Include tree-iterator.h.
1477 * Make-lang.in (trans.o): Depend on tree-iterator.h
1478
1479 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1480
1481 * trans-array.h (gfc_conv_descriptor_data_set_internal):
1482 Rename to gfc_conv_descriptor_data_set.
1483 (gfc_conv_descriptor_data_set_tuples): Remove.
1484 * trans-array.c (gfc_conv_descriptor_data_get): Rename
1485 from gfc_conv_descriptor_data_set_internal.
1486 Remove last argument to gfc_add_modify.
1487 (gfc_trans_allocate_array_storage): Rename gfc_add_modify_expr to
1488 gfc_add_modify.
1489 (gfc_trans_create_temp_array): Same.
1490 (gfc_conv_array_transpose): Same.
1491 (gfc_grow_array): Same.
1492 (gfc_put_offset_into_var): Same.
1493 (gfc_trans_array_ctor_element): Same.
1494 (gfc_trans_array_constructor_subarray): Same.
1495 (gfc_trans_array_constructor_value): Same.
1496 (gfc_trans_scalarized_loop_end): Same.
1497 (gfc_array_init_size): Same.
1498 (gfc_array_allocate): Same.
1499 (gfc_trans_array_bounds): Same.
1500 (gfc_trans_auto_array_allocation): Same.
1501 (gfc_trans_g77_array): Same.
1502 (gfc_trans_dummy_array_bias): Same.
1503 (gfc_conv_expr_descriptor): Same.
1504 (structure_alloc_comps): Same.
1505 * trans-expr.c: Same.
1506 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
1507 Rename gfc_conv_descriptor_data_set_tuples to
1508 gfc_conv_descriptor_data_set.
1509 (gfc_omp_clause_copy_ctor): Change build_gimple_modify_stmt to
1510 build2_v.
1511 (gfc_omp_clause_assign_op): Same.
1512 (gfc_trans_omp_array_reduction): Rename gfc_add_modify_expr to
1513 gfc_add_modify.
1514 (gfc_trans_omp_atomic): Same.
1515 (gfc_trans_omp_do): Same. Change GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1516 Rename gfc_add_modify_stmt to gfc_add_modify.
1517 * trans-stmt.c: Rename gfc_add_modify_expr to
1518 gfc_add_modify.
1519 * trans.c: Rename gfc_add_modify_expr to
1520 gfc_add_modify.
1521 (gfc_add_modify): Remove last argument.
1522 Rename GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1523 * trans.h: Remove gfc_add_modify_expr, gfc_add_modify_stmt.
1524 Add prototype for gfc_add_modify.
1525 * f95-lang.c (union lang_tree_node): Rename GENERIC_NEXT to TREE_CHAIN.
1526 * trans-decl.c: Rename gfc_add_modify_stmt to gfc_add_modify.
1527 * trans-io.c: Same.
1528 * trans-intrinsic.c: Same.
1529
1530 2008-02-25 Aldy Hernandez <aldyh@redhat.com>
1531
1532 * Make-lang.in (fortran-warn): Add -Wno-format.
1533
1534 2008-02-19 Diego Novillo <dnovillo@google.com>
1535
1536 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1537
1538 * fortran/Make-lang.in (fortran-warn): Remove.
1539
1540 2007-11-22 Aldy Hernandez <aldyh@redhat.com>
1541
1542 * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
1543 memset.
1544
1545 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1546
1547 * Make-lang.in (fortran-warn): Set to -Wno-format.
1548 * trans.c (gfc_trans_code): Update comment to say GENERIC.
1549 Call tree_annotate_all_with_locus instead of annotate_all_with_locus.
1550
0d52899f
TB
15512008-07-27 Tobias Burnus <burnus@net-b.de>
1552
1553 PR fortran/36132
1554 PR fortran/29952
1555 PR fortran/36909
1556 * trans.c (gfc_trans_runtime_check): Allow run-time warning besides
1557 run-time error.
1558 * trans.h (gfc_trans_runtime_check): Update declaration.
1559 * trans-array.c (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
1560 gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
1561 Updated gfc_trans_runtime_check calls.
1562 (gfc_conv_array_parameter): Implement flag_check_array_temporaries,
1563 fix packing/unpacking for nonpresent optional actuals to optional
1564 formals.
1565 * trans-array.h (gfc_conv_array_parameter): Update declaration.
1566 * trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
1567 gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
1568 (gfc_conv_function_call): Update gfc_conv_array_parameter calls.
1569 * trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
1570 calls.
1571 * trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
1572 (gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
1573 gfc_conv_array_parameter.
1574 * trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
1575 * trans-decl.c (gfc_build_builtin_function_decls): Add
1576 gfor_fndecl_runtime_warning_at.
1577 * lang.opt: New option fcheck-array-temporaries.
1578 * gfortran.h (gfc_options): New flag_check_array_temporaries.
1579 * options.c (gfc_init_options, gfc_handle_option): Handle flag.
1580 * invoke.texi: New option fcheck-array-temporaries.
1581
7e8b322a
JH
15822008-07-24 Jan Hubicka <jh@suse.cz>
1583
1584 * fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
1585
c3005b0f
DK
15862008-07-24 Daniel Kraft <d@domob.eu>
1587
1588 PR fortran/33141
1589 * lang.opt (Wnonstd-intrinsics): Removed option.
1590 (Wintrinsics-std), (Wintrinsic-shadow): New options.
1591 * invoke.texi (Option Summary): Removed -Wnonstd-intrinsics
1592 from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
1593 (Error and Warning Options): Documented the new options and removed
1594 the documentation for -Wnonstd-intrinsics.
1595 * gfortran.h (gfc_option_t): New members warn_intrinsic_shadow and
1596 warn_intrinsics_std, removed warn_nonstd_intrinsics.
1597 (gfc_is_intrinsic): Renamed from gfc_intrinsic_name.
1598 (gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard): New.
1599 * decl.c (match_procedure_decl): Replaced gfc_intrinsic_name by
1600 the new name gfc_is_intrinsic.
1601 (warn_intrinsic_shadow): New helper method.
1602 (gfc_match_function_decl), (gfc_match_subroutine): Call the new method
1603 warn_intrinsic_shadow to check the just-parsed procedure.
1604 * expr.c (check_init_expr): Call new gfc_is_intrinsic to check whether
1605 the function called is really an intrinsic in the selected standard.
1606 * intrinsic.c (gfc_is_intrinsic): Renamed from gfc_intrinsic_name and
1607 extended to take into account the selected standard settings when trying
1608 to find out whether a symbol is an intrinsic or not.
1609 (gfc_check_intrinsic_standard): Made public and extended.
1610 (gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface): Removed
1611 the calls to check_intrinsic_standard, this check now happens inside
1612 gfc_is_intrinsic.
1613 (gfc_warn_intrinsic_shadow): New method defined.
1614 * options.c (gfc_init_options): Initialize new warning flags to false
1615 and removed intialization of Wnonstd-intrinsics flag.
1616 (gfc_post_options): Removed logic for Wnonstd-intrinsics flag.
1617 (set_Wall): Set new warning flags and removed Wnonstd-intrinsics flag.
1618 (gfc_handle_option): Handle the new flags and removed handling of the
1619 old Wnonstd-intrinsics flag.
1620 * primary.c (gfc_match_rvalue): Replaced call to gfc_intrinsic_name by
1621 the new name gfc_is_intrinsic.
1622 * resolve.c (resolve_actual_arglist): Ditto.
1623 (resolve_generic_f), (resolve_unknown_f): Ditto.
1624 (is_external_proc): Ditto.
1625 (resolve_generic_s), (resolve_unknown_s): Ditto.
1626 (resolve_symbol): Ditto and ensure for symbols declared INTRINSIC that
1627 they are really available in the selected standard setting.
1628
befdf741
DK
16292008-07-24 Daniel Kraft <d@domob.eu>
1630
1631 * match.c (gfc_match): Add assertion to catch wrong calls trying to
1632 match upper-case characters.
1633
bdfd2ff0
TK
16342008-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1635
1636 PR fortran/29952
1637 * gfortran.h: Add "warn_array_temp" to gfc_option_t.
1638 * lang.opt: Add -Warray-temporaries.
1639 * invoke.texi: Document -Warray-temporaries
1640 * trans-array.h (gfc_trans_create_temp_array): Add argument of
1641 type *locus.
1642 (gfc_conv_loop_setup): Likewise.
1643 * trans-array.c (gfc_trans_create_temp_array): If
1644 -Warray-temporaries is given and locus is present, warn about
1645 creation of array temporaries.
1646 (gfc_trans_array_constructor_subarray): Add locus to call
1647 of gfc_conv_loop_setup.
1648 (gfc_trans_array_constructor): Add where argument. Pass where
1649 argument to call of gfc_trans_create_temp_array.
1650 (gfc_add_loop_ss_code): Add where argument. Pass where argument
1651 to recursive call of gfc_add_loop_ss_code and to call of
1652 gfc_trans_array_constructor.
1653 (gfc_conv_loop_setup): Add where argument. Pass where argument
1654 to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
1655 (gfc_conv_expr_descriptor): Pass location to call of
1656 gfc_conv_loop_setup.
1657 (gfc_conv_array_parameter): If -Warray-temporaries is given,
1658 warn about creation of temporary arrays.
1659 * trans-expr.c (gfc_conv_subref_array_arg): Add where argument
1660 to call to gfc_conv_loop_setup.
1661 (gfc_conv_function_call): Add where argument to call to
1662 gfc_trans_creat_temp_array.
1663 (gfc_trans_subarray_assign): Likewise.
1664 (gfc_trans_assignment_1): Add where argument to call to
1665 gfc_conv_loop_setup.
1666 * trans-stmt.c (gfc_conv_elemental_dependencies): Add where
1667 argument to call to gfc_trans_create_temp_array.
1668 (gfc_trans_call): Add where argument to call to gfc_conv_loop_setup.
1669 (generate_loop_for_temp_to_lhs): Likewise.
1670 (generate_loop_for_rhs_to_temp): Likewise.
1671 (compute_inner_temp_size): Likewise.
1672 (gfc_trans-pointer_assign_need_temp): Likewise.
1673 (gfc_evaluate_where_mask): Likewise.
1674 (gfc_trans_where_assign): Likewise.
1675 (gfc_trans_where_3): Likewise.
1676 * trans-io.c (transfer_srray_component): Add where argument
1677 to function. Add where argument to call to gfc_conv_loop_setup.
1678 (transfer_expr): Add where argument to call to
1679 transfer_array_component.
1680 (gfc_trans_transfer): Add where expression to call to
1681 gfc_conv_loop_setup.
1682 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Add
1683 where argument to call to gfc_conv_loop_setup.
1684 (gfc_conv_intrinsic_count): Likewise.
1685 (gfc_conv_intrinsic_arith): Likewise.
1686 (gfc_conv_intrinsic_dot_product): Likewise.
1687 (gfc_conv_intrinsic_minmaxloc): Likewise.
1688 (gfc_conv_intrinsic_minmaxval): Likewise.
1689 (gfc_conv_intrinsic_array_transfer): Warn about
1690 creation of temporary array.
1691 Add where argument to call to gfc_trans_create_temp_array.
1692 * options.c (gfc_init_options): Initialize gfc_option.warn_array_temp.
1693 (gfc_handle_option): Set gfc_option.warn_array_temp.
1694
fcf73884
MLI
16952008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1696
1697 PR 35058
1698 * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
1699
9cad01ce
DK
17002008-07-22 Daniel Kraft <d@domob.eu>
1701
1702 PR fortran/29835
1703 * io.c (error_element), (format_locus): New static globals.
1704 (unexpected_element): Spelled out this message fully.
1705 (next_char): Keep track of locus when not MODE_STRING.
1706 (next_char_not_space): Remember last parsed element in error_element.
1707 (format_lex): Fix two indentation errors.
1708 (check_format): Use format_locus and possibly error_element for a
1709 slightly better error message on invalid format.
1710 (check_format_string): Set format_locus to start of the string
1711 expression used as format.
1712
df2fba9e
RW
17132008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1714
1715 * expr.c (gfc_check_pointer_assign): Fix typo in string.
1716 * io.c (check_format): Fix typo in string. Fix comment typos.
1717 * parse.c (gfc_global_used): Likewise.
1718 * resolve.c (resolve_allocate_expr): Likewise.
1719 * symbol.c (gfc_set_default_type): Likewise.
1720 * arith.c: Fix typos in comments.
1721 * array.c: Likewise.
1722 * data.c: Likewise.
1723 * decl.c: Likewise.
1724 * dependency.c: Likewise.
1725 * f95-lang.c: Likewise.
1726 * gfortran.h: Likewise.
1727 * matchexp.c: Likewise.
1728 * module.c: Likewise.
1729 * primary.c: Likewise.
1730 * scanner.c: Likewise.
1731 * trans-array.c: Likewise.
1732 * trans-common.c: Likewise.
1733 * trans-decl.c: Likewise.
1734 * trans-expr.c: Likewise.
1735 * trans-intrinsic.c: Likewise.
1736 * trans-types.c: Likewise.
1737 * trans.c: Likewise.
1738 * trans.h: Likewise.
1739
5e2be41f
TB
17402008-07-19 Tobias Burnus <burnus@net-b.de>
1741
1742 PR fortran/36795
1743 * matchexp.c (gfc_get_parentheses): Remove obsolete workaround,
1744 which caused the generation of wrong code.
1745
e513a086
TB
17462008-07-19 Tobias Burnus <burnus@net-b.de>
1747
1748 PR fortran/36342
1749 * scanner.c (load_file): Add argument to destinguish between
1750 true filename and displayed filename.
1751 (include_line,gfc_new_file): Adapt accordingly.
1752
d1a296c1
TB
17532008-07-19 Tobias Burnus <burnus@net-b.de>
1754
1755 * check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
1756 checks for cshift's shift and eoshift's shift and boundary args.
1757 (gfc_check_unpack): Add rank and shape tests for unpack.
1758
7b901ac4
KG
17592008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1760
1761 * gfortran.h (new): Remove macro.
1762 * array.c (gfc_append_constructor, match_array_list,
1763 gfc_match_array_constructor): Likewise.
1764 * bbt.c (insert, gfc_insert_bbt): Likewise.
1765 * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
1766 get_proc_name): Likewise.
1767 * expr.c (gfc_copy_actual_arglist): Likewise.
1768 * interface.c (compare_actual_formal, check_new_interface,
1769 gfc_add_interface): Likewise.
1770 * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
1771 Likewise.
1772 * io.c (match_io_iterator, match_io_list): Likewise.
1773 * match.c (match_forall_header): Likewise.
1774 * matchexp.c (build_node): Likewise.
1775 * module.c (gfc_match_use): Likewise.
1776 * scanner.c (load_file): Likewise.
1777 * st.c (gfc_append_code): Likewise.
1778 * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
1779 gfc_commit_symbols): Likewise.
1780 * trans-common.c (build_field): Likewise.
1781 * trans-decl.c (gfc_finish_var_decl): Likewise.
1782 * trans-expr.c (gfc_free_interface_mapping,
1783 gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
1784 gfc_finish_interface_mapping,
1785 gfc_apply_interface_mapping_to_expr): Likewise.
1786 * trans.h (gfc_interface_sym_mapping): Likewise.
1787
a1ee985f
KG
17882008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1789
1790 * gfortran.h (operator): Remove macro.
1791 (gfc_namespace, gfc_expr): Avoid C++ keywords.
1792 * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
1793 Likewise.
1794 * decl.c (access_attr_decl): Likewise.
1795 * dependency.c (gfc_dep_compare_expr): Likewise.
1796 * dump-parse-tree.c (show_expr, show_uop, show_namespace):
1797 Likewise.
1798 * expr.c (gfc_copy_expr, gfc_type_convert_binary,
1799 simplify_intrinsic_op, check_intrinsic_op): Likewise.
1800 * interface.c (fold_unary, gfc_match_generic_spec,
1801 gfc_match_interface, gfc_match_end_interface,
1802 check_operator_interface, check_uop_interfaces,
1803 gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
1804 gfc_add_interface, gfc_current_interface_head,
1805 gfc_set_current_interface_head): Likewise.
1806 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
1807 Likewise.
1808 * matchexp.c (gfc_get_parentheses, build_node): Likewise.
1809 * module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
1810 number_use_names, mio_expr, load_operator_interfaces, read_module,
1811 write_operator, write_module): Likewise.
1812 * openmp.c (resolve_omp_atomic): Likewise.
1813 * resolve.c (resolve_operator, gfc_resolve_character_operator,
1814 gfc_resolve_uops): Likewise.
1815 * symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
1816 * trans-expr.c (gfc_conv_expr_op): Likewise.
1817 * trans-openmp.c (gfc_trans_omp_atomic): Likewise.
1818
9aa433c2
KG
18192008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1820
1821 * gfortran.h (protected): Remove macro.
1822 * dump-parse-tree.c (show_attr): Avoid C++ keywords.
1823 * expr.c (gfc_check_pointer_assign): Likewise.
1824 * interface.c (compare_parameter_protected): Likewise.
1825 * intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
1826 add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
1827 add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
1828 add_sym_5s): Likewise.
1829 * match.c (gfc_match_assignment, gfc_match_pointer_assignment):
1830 Likewise.
1831 * module.c (mio_symbol_attribute): Likewise.
1832 * primary.c (match_variable): Likewise.
1833 * resolve.c (resolve_equivalence): Likewise.
1834 * symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
1835 Likewise.
1836 * trans-types.c (gfc_get_array_type_bounds): Likewise.
1837
8b11b59f
KG
18382008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1839
1840 * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
1841 * gfortran.h (try, protected, operator, new): Likewise.
1842
bdad0683
TB
18432008-07-17 Tobias Burnus <burnus@net-b.de>
1844
1845 PR fortran/36825
1846 PR fortran/36824
1847 * array.c (gfc_match_array_spec): Fix array-rank check.
1848 * resolve.c (resolve_fl_derived): Fix constentness check
1849 for the array dimensions.
1850
e63ea00c
RW
18512008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1852
1853 * Make-lang.in (gfortranspec.o): Fix dependencies.
1854
41d6f399
JD
18552008-07-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1856
1857 PR fortran/36725
1858 * io.c: Add error check for g0 edit descriptor followed by '.'.
1859
4b156631
DK
18602008-07-12 Daniel Kraft <d@domob.eu>
1861
1862 * resolve.c (resolve_fl_derived): Allow pointer components to empty
1863 derived types fixing a missing part of PR fortran/33221.
1864
b1caaefc
DK
18652008-07-10 Daniel Kraft <d@domob.eu>
1866
1867 * gfc-internals.texi (section gfc_expr): Created documentation about
1868 the gfc_expr internal data structure.
1869
27696218
TK
18702008-07-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1871
1872 PR fortran/36670
1873 * iresolve.c (gfc_resolve_product): Set shape of return
1874 value from array.
1875 (gfc_resolve_sum): Likewise.
1876
77092cda
JJ
18772008-07-07 Jakub Jelinek <jakub@redhat.com>
1878
1879 PR middle-end/36726
1880 * f95-lang.c (poplevel): Don't ever add subblocks to
1881 global_binding_level.
1882
8fb74da4
JW
18832008-07-02 Janus Weil <janus@gcc.gnu.org>
1884 Tobias Burnus <burnus@net-b.de>
1885 Paul Thomas <pault@gcc.gnu.org>
1886
1887 PR fortran/32580
1888 * gfortran.h (struct gfc_symbol): New member "proc_pointer".
1889 * check.c (gfc_check_associated,gfc_check_null): Implement
1890 procedure pointers.
1891 * decl.c (match_procedure_decl): Ditto.
1892 * expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
1893 * interface.c (compare_actual_formal): Ditto.
1894 * match.h: Ditto.
1895 * match.c (gfc_match_pointer_assignment): Ditto.
1896 * parse.c (parse_interface): Ditto.
1897 * primary.c (gfc_match_rvalue,match_variable): Ditto.
1898 * resolve.c (resolve_fl_procedure): Ditto.
1899 * symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
1900 gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
1901 * trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
1902 create_function_arglist): Ditto.
1903 * trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
1904 gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
1905
04f2b606
TK
19062008-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1907
1908 PR fortran/36590
1909 PR fortran/36681
1910 * iresolve.c (resolve_mask_arg): Don't convert mask to
1911 kind=1 logical if it is of that type already.
1912
986a8d11
TK
19132008-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1914
1915 PR fortran/36341
1916 * iresolve.c (gfc_resolve_matmul): Copy shapes
1917 from arguments.
1918
082b0571
JD
19192008-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1920
1921 * invoke.texi: Add documentation for runtime behavior of
1922 -fno-range-check.
1923
b66c86cb
DK
19242008-06-28 Daniel Kraft <d@domob.eu>
1925
1926 * gfc-internals.texi (section gfc_code): Extended documentation about
1927 gfc_code in the internal datastructures chapter including details about
1928 how IF, DO and SELECT blocks look like and an example for how the
1929 block-chaining works.
1930
811d3cd3
PT
19312008-06-25 Paul Thomas <pault@gcc.gnu.org>
1932
1933 PR fortran/36526
1934 * interface.c (check_intents): Correct error where the actual
1935 arg was checked for a pointer argument, rather than the formal.
1936
c4e3543d
PT
19372008-06-24 Paul Thomas <pault@gcc.gnu.org>
1938
1939 PR fortran/34371
1940 * expr.c (gfc_check_assign): Change message and locus for
1941 error when conform == 0.
1942
94b12901
JJ
19432008-06-23 Jakub Jelinek <jakub@redhat.com>
1944
1945 PR fortran/36597
1946 * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
1947
95213750
LB
19482008-06-20 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1949 Tobias Burnus <burnus@net-b.de>
1950
1951 PR fortran/34908
1952 PR fortran/36276
1953 * scanner.c (preprocessor_line): do not call gfc_free for
1954 current_file->filename if it differs from filename.
1955
ece3f663
KG
19562008-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1957
1958 * arith.c (hollerith2representation): Fix for -Wc++-compat.
1959 * array.c (gfc_get_constructor): Likewise.
1960 * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
1961 create_enum_history, gfc_match_final_decl): Likewise.
1962 * error.c (error_char): Likewise.
1963 * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
1964 * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
1965 gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
1966 gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
1967 gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
1968 gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
1969 gfc_get_alloc, gfc_get_wide_string): Likewise.
1970 * interface.c (count_types_test): Likewise.
1971 * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
1972 Likewise.
1973 * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
1974 gfc_match_inquire, gfc_match_wait): Likewise.
1975 * match.c (gfc_match, match_forall_iterator): Likewise.
1976 * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
1977 add_true_name, parse_string, write_atom, quote_string,
1978 mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
1979 * options.c (gfc_post_options): Likewise.
1980 * primary.c (match_integer_constant, match_hollerith_constant,
1981 match_boz_constant, match_real_constant,
1982 gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
1983 * scanner.c (gfc_widechar_to_char, add_path_to_list,
1984 add_file_change, load_line, get_file, preprocessor_line,
1985 load_file, unescape_filename, gfc_read_orig_filename): Likewise.
1986 * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
1987 gfc_simplify_ishftc): Likewise.
1988 * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
1989 gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
1990 Likewise.
1991 * target-memory.c (gfc_target_interpret_expr): Likewise.
1992 * trans-const.c (gfc_build_wide_string_const): Likewise.
1993 * trans-expr.c (gfc_add_interface_mapping): Likewise.
1994 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1995 gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
1996 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
1997 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
1998 gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
1999 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
2000 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
2001 * trans.c (gfc_get_backend_locus): Likewise.
2002 * trans.h (gfc_get_ss): Likewise.
2003
d2848082
DK
20042008-06-18 Daniel Kraft <d@domob.eu>
2005
2006 PR fortran/36517, fortran/36492
2007 * array.c (gfc_resolve_character_array_constructor): Call
2008 gfc_set_constant_character_len with changed length-chec argument.
2009 * decl.c (gfc_set_constant_character_len): Changed array argument to
2010 be a generic length-checking argument that can be used for correct
2011 checking with typespec and in special cases where the should-be length
2012 is different from the target length.
2013 (build_struct): Call gfc_set_constant_character_len with changed length
2014 checking argument and introduced additional checks for exceptional
2015 conditions on invalid code.
2016 (add_init_expr_to_sym), (do_parm): Call gfc_set_constant_character_len
2017 with changed argument.
2018 * match.h (gfc_set_constant_character_len): Changed third argument to
2019 int for the should-be length rather than bool.
2020
88fec49f
DK
20212008-06-17 Daniel Kraft <d@domob.eu>
2022
2023 PR fortran/36112
2024 * array.c (gfc_resolve_character_array_constructor): Check that all
2025 elements with constant character length have the same one rather than
2026 fixing it if no typespec is given, emit an error if they don't. Changed
2027 return type to "try" and return FAILURE for the case above.
2028 (gfc_resolve_array_constructor): Removed unneeded call to
2029 gfc_resolve_character_array_constructor in this function.
2030 * gfortran.h (gfc_resolve_character_array_constructor): Returns try.
2031 * trans-array.c (get_array_ctor_strlen): Return length of first element
2032 rather than last element.
2033 * resolve.c (gfc_resolve_expr): Handle FAILURE return from
2034 gfc_resolve_character_array_constructor.
2035
9d5c21c1
PT
20362008-06-17 Paul Thomas <pault@gcc.gnu.org>
2037
2038 PR fortran/34396
2039 * resolve.c (add_dt_to_dt_list): New function.
2040 (resolve_fl_derived): Call new function for pointer components
2041 and when derived type resolved.
2042
a60658ba
JD
20432008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2044
2045 PR fortran/36515
2046 * trans-decl.c (gfc_generate_function_code): Add range_check to options
2047 array.
2048
6ccde948
RW
20492008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2050
2051 * gfc-internals.texi: Expand TABs, drop indentation outside examples.
2052 * gfortran.texi: Likewise.
2053 * intrinsic.texi: Likewise.
2054 * invoke.texi: Likewise.
2055
8a221914
JD
20562008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2057
2058 PR fortran/35863
2059 * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
2060 transfer_character_wide which includes passing in the character kind to
2061 support wide character IO. (transfer_expr): If the kind == 4, create the
2062 argument and build the call.
2063 * gfortran.texi: Fix typo.
2064
357ad64f
TB
20652008-06-13 Tobias Burnus <burnus@net-b.de>
2066
2067 PR fortran/36476
2068 * decl.c (do_parm): Handle init expression for len=*.
2069
f5dce797
TB
20702008-06-12 Tobias Burnus <burnus@net-b.de>
2071
2072 PR fortran/36462
2073 * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
2074 Fix passing of the BACK= argument.
2075
a1968bf9
JD
20762008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2077
2078 * cpp.c: Add copyright notice.
2079 * cpp.h: Add copyright notice.
2080
c1db9545
JW
20812008-06-08 Janus Weil <janus@gcc.gnu.org>
2082
2083 PR fortran/36459
2084 * decl.c (match_procedure_decl): Correctly recognize if the interface
2085 is an intrinsic procedure.
2086
2d9bbb6b
TB
20872008-06-08 Tobias Burnus <burnus@net-b.de>
2088
2089 PR fortran/35830
2090 * resolve.c (resolve_symbol): Copy more attributes for
2091 PROCEDUREs with interfaces.
2092
8955a005
JD
20932008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2094
29d3b5ff
JD
2095 PR fortran/36420
2096 PR fortran/36422
8955a005
JD
2097 * io.c (check_format): Add new error message for zero width.
2098 Use new error message for FMT_A and with READ, FMT_G. Allow
2099 FMT_G with WRITE except when -std=F95 and -std=F2003.
2100
8d82b242
TB
21012008-06-07 Tobias Burnus <burnus@net-b.de>
2102
8cec30d3 2103 PR fortran/36437
8d82b242
TB
2104 * intrinsic.c (add_functions): Implement c_sizeof.
2105 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
2106 create unneeded variable in the scalar case.
2107 * intrinsic.texi: Add C_SIZEOF documentation.
2108
41870ac5
TB
21092008-06-06 Tobias Burnus <burnus@net-b.de>
2110
2111 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
2112
a68ab351
JJ
21132008-06-06 Jakub Jelinek <jakub@redhat.com>
2114
2115 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
2116 * parse.c (next_free): Allow tab after !$omp.
2117 (decode_omp_directive): Handle !$omp task, !$omp taskwait
2118 and !$omp end task.
2119 (case_executable): Add ST_OMP_TASKWAIT.
2120 (case_exec_markers): Add ST_OMP_TASK.
2121 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
2122 ST_OMP_TASKWAIT.
2123 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
2124 * gfortran.h (gfc_find_sym_in_expr): New prototype.
2125 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
2126 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
2127 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
2128 untied fields.
2129 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
2130 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2131 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
2132 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
2133 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
2134 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
2135 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
2136 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
2137 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
2138 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
2139 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
2140 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
2141 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
2142 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
2143 than boolean_type_node.
2144 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
2145 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
2146 untied and collapse clauses.
2147 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
2148 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
2149 EXEC_OMP_TASKWAIT.
2150 * st.c (gfc_free_statement): Likewise.
2151 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
2152 (find_sym_in_expr): Rename to...
2153 (gfc_find_sym_in_expr): ... this. No longer static.
2154 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
2155 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
2156 prototypes.
2157 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
2158 firstprivate, lastprivate, reduction, copyprivate and copyin
2159 clauses.
2160 (omp_current_do_code): Made static.
2161 (omp_current_do_collapse): New variable.
2162 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
2163 clear omp_current_do_code and omp_current_do_collapse on return.
2164 (gfc_resolve_do_iterator): Handle collapsed do loops.
2165 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
2166 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
2167 (gfc_match_omp_clauses): Handle default (firstprivate),
2168 schedule (auto), untied and collapse (n) clauses.
2169 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
2170 (OMP_TASK_CLAUSES): Define.
2171 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
2172 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
2173 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
2174 arrays allocate them with the bounds of the outer var if outer
2175 var is allocated.
2176 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
2177 gfc_omp_clause_dtor): New functions.
2178 (gfc_trans_omp_array_reduction): If decl is allocatable array,
2179 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
2180 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
2181 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2182 for assumed-size arrays.
2183 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
2184 present in lastprivate clause and do loop isn't simple,
2185 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
2186 parallel's lastprivate clause, change it to shared and add
2187 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
2188 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
2189 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
2190 OMP_FOR from OMP_PARALLEL.
2191 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
2192 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
2193 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
2194 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
2195 EXEC_OMP_TASKWAIT.
2196
7db5da56
JW
21972008-06-04 Janus Weil <janus@gcc.gnu.org>
2198
2199 PR fortran/36322
2200 PR fortran/36275
2201 * resolve.c (resolve_symbol): Correctly copy the interface for a
2202 PROCEDURE declaration.
2203
e62532af
JW
22042008-06-02 Janus Weil <janus@gcc.gnu.org>
2205
2206 PR fortran/36361
2207 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
2208 gfc_add_explicit_interface): Added checks.
2209 * decl.c (attr_decl1): Added missing "var_locus".
2210 * parse.c (parse_interface): Checking for errors.
2211
34523524
DK
22122008-06-02 Daniel Kraft <d@domob.eu>
2213
2214 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
2215 (struct gfc_symbol): New member f2k_derived.
2216 (struct gfc_namespace): New member finalizers, for use in the above
2217 mentioned f2k_derived namespace.
2218 (struct gfc_finalizer): New type defined for finalizers linked list.
2219 * match.h (gfc_match_final_decl): New function header.
2220 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
2221 constructed symbol node.
2222 (gfc_match_final_decl): New function to match a FINAL declaration line.
2223 * parse.c (decode_statement): match-call for keyword FINAL.
2224 (parse_derived): Parse CONTAINS section and accept FINAL statements.
2225 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
2226 in this case, check) a list of finalizer procedures.
2227 (resolve_fl_derived): Call gfc_resolve_finalizers here.
2228 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
2229 (gfc_free_namespace): Free finalizers list.
2230 (gfc_new_symbol): Initialize new f2k_derived to NULL.
2231 (gfc_free_symbol): Free f2k_derived namespace.
2232 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
2233 (gfc_free_finalizer_list): New function to free a linked list of
2234 gfc_finalizer nodes.
2235
1e60697f
DF
22362008-06-02 Daniel Franke <franke.daniel@gmail.com>
2237
2238 PR fortran/36375
2239 PR fortran/36377
2240 * cpp.c (gfc_cpp_init): Do not initialize builtins if
2241 processing already preprocessed input.
2242 (gfc_cpp_preprocess): Finalize output with newline.
2243
d2d586f9
JD
22442008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2245
2246 * intrinsic.texi: Revert wrong commit.
2247
7306494a
SK
22482008-05-31 Steven G. Kargl <kargls@comcast.net>
2249
2250 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
2251 Cleanup numerical inquiry function initialization.
2252 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
2253 a single mpfr_clears().
2254 (gfc_check_real_range): Re-arrange logic to eliminate multiple
2255 unnecessary branching and assignments.
2256 (gfc_arith_times): Use mpfr_clears() in preference to multiple
2257 mpfr_clear().
2258 (gfc_arith_divide): Ditto.
2259 (complex_reciprocal): Eliminate now unused variables a, re, im.
2260 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
2261 multiple mpfr_clear().
2262 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
2263 preference to multiple mpfr_clear().
2264 * simplify.c (gfc_simplify_and): Remove blank line.
2265 (gfc_simplify_atan2): Move error checking earlier to eliminate
2266 a now unnecessay gfc_free_expr().
2267 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
2268 (gfc_simplify_bessel_j1): Ditto.
2269 (gfc_simplify_bessel_jn): Ditto.
2270 (gfc_simplify_bessel_y0): Ditto.
2271 (gfc_simplify_bessel_y1): Ditto.
2272 (gfc_simplify_bessel_yn): Ditto.
2273 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
2274 combine nested if statement rational expressions.
2275 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
2276 mpfr_clear().
2277 (gfc_simplify_exp): Ditto.
2278 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
2279 special case of 0. Use mpfr_clears() in preference to multiple
2280 mpfr_clear().
2281 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
2282 (gfc_simplify_lgamma): Ditto.
2283 (gfc_simplify_log10): Ditto.
2284 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
2285 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
2286 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
2287 and term. Simplify the mpfr magic.
2288 (gfc_simplify_modulo): Ditto.
2289 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
2290 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
2291 mpfr_clear().
2292 (gfc_simplify_sin): Ditto
2293 (gfc_simplify_sqrt): Ditto
2294 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
2295 special case of 0. Use mpfr_clears() in preference to multiple
2296 mpfr_clear().
2297
c776a6d0
DF
22982008-05-29 Daniel Franke <franke.daniel@gmail.com>
2299
2300 PR target/36348
2301 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
2302
f2f5443c
FXC
23032008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2304
2305 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
2306 (gfc_read_orig_filename): Adjust call to load_line. Don't call
2307 ungetc.
2308 (load_file): Adjust call to load_line.
2309
e6895430
JW
23102008-05-28 Janus Weil <janus@gcc.gnu.org>
2311
2312 PR fortran/36325
2313 PR fortran/35830
2314 * interface.c (gfc_procedure_use): Enable argument checking for
2315 external procedures with explicit interface.
2316 * symbol.c (check_conflict): Fix conflict checking for externals.
2317 (copy_formal_args): Fix handling of arrays.
2318 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
2319 of intrinsics.
2320 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
2321 EXTERNAL attribute.
2322
691da334
FXC
23232008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2324
2325 PR fortran/36319
2326 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
2327 function as pure.
2328 * trans-array.c (gfc_trans_array_ctor_element): Divide element
2329 size by the size of one character to obtain length.
2330 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
2331 appropriate.
2332 (gfc_resolve_eoshift): Likewise.
2333 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
2334 (gfc_conv_intrinsic_fdate): Minor beautification.
2335 (gfc_conv_intrinsic_ttynam): Minor beautification.
2336 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
2337 (size_of_string_in_bytes): New function.
2338 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
2339 character expressions.
2340 (gfc_conv_intrinsic_sizeof): Likewise.
2341 (gfc_conv_intrinsic_array_transfer): Likewise.
2342 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
2343 beautification.
2344 (gfc_conv_intrinsic_repeat): Fix comment typo.
2345 * simplify.c (gfc_convert_char_constant): Take care of conversion
2346 of array constructors.
2347
795dc587
TB
23482008-05-27 Tobias Burnus <burnus@net-b.de>
2349
2350 PR fortran/36316
2351 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
2352 Add missing fold_convert.
2353
3c2a68b3
DF
23542008-05-26 Daniel Franke <franke.daniel@gmail.com>
2355
2356 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
2357 added FIXME instead.
2358
670637ee
DF
23592008-05-26 Daniel Franke <franke.daniel@gmail.com>
2360
2361 PR fortran/18428
2362 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
2363 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
2364 o, undef, v): New options.
2365 * options.c (gfc_init_options): Also initialize preprocessor
2366 options.
2367 (gfc_post_options): Also handle post-initialization of preprocessor
2368 options.
2369 (gfc_handle_option): Check if option is a preprocessor option.
2370 If yes, let gfc_cpp_handle_option() handle the option.
2371 * lang-specs.h: Reorganized to handle new options.
2372 * scanner.c (gfc_new_file): Read temporary file instead of
2373 input source if preprocessing is enabled.
2374 * f95-lang.c (gfc_init): Initialize preprocessor.
2375 (gfc_finish): Clean up preprocessor.
2376 * cpp.c: New.
2377 * cpp.h: New.
2378 * Make-lang.in: Added new objects and dependencies.
2379 * gfortran.texi: Updated section "Preprocessing and
2380 conditional compilation".
2381 * invoke.texi: Added new section "Preprocessing Options",
2382 listed and documented the preprocessing options handled
2383 by gfortran.
2384
5ec81069
TB
23852008-05-25 Tobias Burnus <burnus@net-b.de>
2386
2387 PR fortran/32600
2388 * trans-expr.c (gfc_conv_function_call): Remove library
2389 call for c_f_pointer with scalar Fortran pointers and for
2390 c_f_procpointer.
2391
31579a22
FXC
23922008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2393
2394 PR fortran/36257
2395 * iresolve.c (check_charlen_present): Don't force the rank to 1.
2396
16a55411
FXC
23972008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2398
2399 PR fortran/36265
2400 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
2401 the temporary variable.
2402
9e23c1aa
FXC
24032008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2404
2405 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
2406 result variable to avoid warnings.
2407
d393bbd7
FXC
24082008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2409
2410 * intrinsic.c (char_conversions, ncharconv): New static variables.
2411 (find_char_conv): New function.
2412 (add_functions): Add simplification functions for ADJUSTL and
2413 ADJUSTR. Don't check the kind of their argument. Add checking for
2414 LGE, LLE, LGT and LLT.
2415 (add_subroutines): Fix argument type for SLEEP. Fix argument name
2416 for SYSTEM.
2417 (add_char_conversions): New function.
2418 (gfc_intrinsic_init_1): Call add_char_conversions.
2419 (gfc_intrinsic_done_1): Free char_conversions.
2420 (check_arglist): Use kind == 0 as a signal that we don't want
2421 the kind value to be checked.
2422 (do_simplify): Also simplify character functions.
2423 (gfc_convert_chartype): New function
2424 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
2425 use of default character type.
2426 (gfc_trans_array_constructor_value): Likewise.
2427 (get_array_ctor_var_strlen): Use integer kind to build an integer
2428 instead of a character kind!
2429 (gfc_build_constant_array_constructor): Don't force the use of
2430 default character type.
2431 (gfc_conv_loop_setup): Likewise.
2432 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
2433 default character type. Allocate enough memory for wide strings.
2434 (gfc_conv_concat_op): Make sure operand kind are the same.
2435 (string_to_single_character): Remove gfc_ prefix. Reindent.
2436 Don't force the use of default character type.
2437 (gfc_conv_scalar_char_value): Likewise.
2438 (gfc_build_compare_string): Call string_to_single_character.
2439 (fill_with_spaces): New function
2440 (gfc_trans_string_copy): Add kind arguments. Use them to deal
2441 with wide character kinds.
2442 (gfc_conv_statement_function): Whitespace fix. Call
2443 gfc_trans_string_copy with new kind arguments.
2444 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
2445 instead of using gfc_widechar_to_char.
2446 (gfc_conv_string_parameter): Don't force the use of default
2447 character type.
2448 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
2449 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
2450 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
2451 * decl.c (gfc_set_constant_character_len): Don't assert the
2452 existence of a single character kind.
2453 * trans-array.h (gfc_trans_string_copy): New prototype.
2454 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
2455 New prototypes.
2456 * error.c (print_wide_char_into_buffer): New function lifting
2457 code from gfc_print_wide_char. Fix order to output '\x??' instead
2458 of 'x\??'.
2459 (gfc_print_wide_char): Call print_wide_char_into_buffer.
2460 (show_locus): Call print_wide_char_into_buffer with buffer local
2461 to this function.
2462 * trans-const.c (gfc_build_wide_string_const): New function.
2463 (gfc_conv_string_init): Deal with wide characters strings
2464 constructors.
2465 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
2466 * trans-stmt.c (gfc_trans_label_assign): Likewise.
2467 (gfc_trans_character_select): Deal with wide strings.
2468 * expr.c (gfc_check_assign): Allow conversion between character
2469 kinds on assignment.
2470 * trans-const.h (gfc_build_wide_string_const): New prototype.
2471 * trans-types.c (gfc_get_character_type_len_for_eltype,
2472 gfc_get_character_type_len): Create too variants of the old
2473 gfc_get_character_type_len, one getting kind argument and the
2474 other one directly taking a type tree.
2475 * trans.h (gfor_fndecl_select_string_char4,
2476 gfor_fndecl_convert_char1_to_char4,
2477 gfor_fndecl_convert_char4_to_char1): New prototypes.
2478 * trans-types.h (gfc_get_character_type_len_for_eltype): New
2479 prototype.
2480 * resolve.c (resolve_operator): Exit early when kind mismatches
2481 are detected, because that makes us issue an error message later.
2482 (validate_case_label_expr): Fix wording of error message.
2483 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
2484 functions.
2485 (gfc_resolve_pack): Call _char4 variants of library function
2486 when dealing with wide characters.
2487 (gfc_resolve_reshape): Likewise.
2488 (gfc_resolve_spread): Likewise.
2489 (gfc_resolve_transpose): Likewise.
2490 (gfc_resolve_unpack): Likewise.
2491 * target-memory.c (size_character): Take character kind bit size
2492 correctly into account (not that it changes anything for now, but
2493 it's more generic).
2494 (gfc_encode_character): Added gfc_ prefix. Encoding each
2495 character of a string by calling native_encode_expr for the
2496 corresponding unsigned integer.
2497 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
2498 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
2499 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
2500 and gfor_fndecl_convert_char4_to_char1.
2501 * target-memory.h (gfc_encode_character): New prototype.
2502 * arith.c (gfc_check_character_range): New function.
2503 (eval_intrinsic): Allow non-default character kinds.
2504 * check.c (gfc_check_access_func): Only allow default
2505 character kind arguments.
2506 (gfc_check_chdir): Likewise.
2507 (gfc_check_chdir_sub): Likewise.
2508 (gfc_check_chmod): Likewise.
2509 (gfc_check_chmod_sub): Likewise.
2510 (gfc_check_lge_lgt_lle_llt): New function.
2511 (gfc_check_link): Likewise.
2512 (gfc_check_link_sub): Likewise.
2513 (gfc_check_symlnk): Likewise.
2514 (gfc_check_symlnk_sub): Likewise.
2515 (gfc_check_rename): Likewise.
2516 (gfc_check_rename_sub): Likewise.
2517 (gfc_check_fgetputc_sub): Likewise.
2518 (gfc_check_fgetput_sub): Likewise.
2519 (gfc_check_stat): Likewise.
2520 (gfc_check_stat_sub): Likewise.
2521 (gfc_check_date_and_time): Likewise.
2522 (gfc_check_ctime_sub): Likewise.
2523 (gfc_check_fdate_sub): Likewise.
2524 (gfc_check_gerror): Likewise.
2525 (gfc_check_getcwd_sub): Likewise.
2526 (gfc_check_getarg): Likewise.
2527 (gfc_check_getlog): Likewise.
2528 (gfc_check_hostnm): Likewise.
2529 (gfc_check_hostnm_sub): Likewise.
2530 (gfc_check_ttynam_sub): Likewise.
2531 (gfc_check_perror): Likewise.
2532 (gfc_check_unlink): Likewise.
2533 (gfc_check_unlink_sub): Likewise.
2534 (gfc_check_system_sub): Likewise.
2535 * primary.c (got_delim): Perform correct character range checking
2536 for all kinds.
2537 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
2538 calls to library functions convert_char4_to_char1 and
2539 convert_char1_to_char4 for character conversions.
2540 (gfc_conv_intrinsic_char): Allow all character kings.
2541 (gfc_conv_intrinsic_strcmp): Fix whitespace.
2542 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
2543 * intrinsic.texi: For all GNU intrinsics accepting character
2544 arguments, mention that they're restricted to the default kind.
2545 * simplify.c (simplify_achar_char): New function.
2546 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
2547 gfc_simplify_ichar): Don't error out for wide characters.
2548 (gfc_convert_char_constant): New function.
2549
e7bff0d1
TB
25502008-05-18 Steven G. Kargl <kargls@comcast.net>
2551
2552 PR fortran/36251
2553 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
2554 and BIND(C).
2555 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
2556
25572008-05-17 Tobias Burnus <burnus@net-b.de>
7d4cf3d9
TB
2558
2559 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
2560 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
2561 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
2562 Move LOG_GAMMA after LOG10.
2563
e7bff0d1 25642008-05-17 Tobias Burnus <burnus@net-b.de>
ca41838c
TB
2565
2566 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
2567 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
2568 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
2569 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
2570
ae772c2d
PT
25712008-05-16 Paul Thomas <pault@gcc.gnu.org>
2572
2573 PR fortran/35756
2574 PR fortran/35759
2575 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
2576 check for calling gfc_trans_where_3.
2577
2578 PR fortran/35743
2579 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
2580 if it is calculated to be negative.
2581
2582 PR fortran/35745
2583 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
2584 ss->where for scalar right hand sides.
2585 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
2586 not evaluate scalars outside the loop. Clean up whitespace.
2587 * trans.h : Add a bitfield 'where' to gfc_ss.
2588
a4cd1610
TB
25892008-05-16 Tobias Burnus <burnus@net-b.de>
2590
2591 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
2592 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
2593
c03fc95d
DK
25942008-04-16 Daniel Kraft <d@domob.eu>
2595
2596 PR fortran/27997
2597 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
2598 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
2599 (check_element_type, check_constructor_type, gfc_check_constructor_type):
2600 Extended to support explicit typespec on constructor.
2601 (gfc_resolve_character_array_constructor): Pad strings correctly for
2602 explicit, constant character length.
2603 * trans-array.c: New static global variable "typespec_chararray_ctor"
2604 (gfc_trans_array_constructor): New code to support explicit but dynamic
2605 character lengths.
2606
acb388a0
JD
26072008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2608
c03fc95d
DK
2609 PR fortran/34325
2610 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
2611 * expr.c (gfc_specification_expr): Supplement the error message with the
2612 type that was found.
2613 * resolve.c (gfc_resolve_index): Likewise.
2614 * match.c (gfc_match_parens): Clarify error message with "at or before".
2615 (gfc_match_do): Check for matching pairs of parenthesis.
acb388a0 2616
d1325932
TB
26172008-05-16 Tobias Burnus <burnus@net-b.de
2618
2619 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
2620 add missing KIND argument to ACHAR and NINT; and state that
2621 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
2622 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
2623
fa9290d3
DK
26242008-05-16 Daniel Kraft <d@domob.eu>
2625
2626 * primary.c: New private structure "gfc_structure_ctor_component".
2627 (gfc_free_structure_ctor_component): New helper function.
2628 (gfc_match_structure_constructor): Extended largely to support named
2629 arguments and default initialization for structure constructors.
2630
d93712d9
SK
26312008-05-15 Steven G. Kargl <kargls@comcast.net>
2632
2633 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
2634 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
2635 possible memory leaks.
2636 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
2637 of NULL pointers.
2638
26392008-05-15 Steven G. Kargl <kargls@comcast.net>
2640
2641 PR fortran/36239
2642 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
2643 rolled integer conversion with gfc_int2int, gfc_real2int, and
2644 gfc_complex2int.
2645 (gfc_simplify_intconv): Renamed to simplify_intconv.
2646
26472008-05-15 Steven G. Kargl, <kargl@comcast.net>
2648 * gfortran.dg/and_or_xor.f90: New test
2649
2650 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
2651 gfc_simplify_xor): Don't range check logical results.
2652
374929b2
FXC
26532008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2654
2655 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
2656 character kinds.
2657 (gfc_build_compare_string): Add kind argument and use it.
2658 (gfc_conv_statement_function): Fix indentation.
2659 * gfortran.h (gfc_character_info): New structure.
2660 (gfc_character_kinds): New array.
2661 * trans-types.c (gfc_character_kinds, gfc_character_types,
2662 gfc_pcharacter_types): New array.
2663 (gfc_init_kinds): Fill character kinds array.
2664 (validate_character): Take care of nondefault character kinds.
2665 (gfc_build_uint_type): New function.
2666 (gfc_init_types): Take care of nondefault character kinds.
2667 (gfc_get_char_type, gfc_get_pchar_type): New functions.
2668 (gfc_get_character_type_len): Use gfc_get_char_type.
2669 * trans.h (gfc_build_compare_string): Adjust prototype.
2670 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
2671 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
2672 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
2673 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
2674 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
2675 prototypes.
2676 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
2677 prototypes.
2678 * trans-decl.c (gfor_fndecl_compare_string_char4,
2679 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
2680 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
2681 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
2682 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
2683 gfor_fndecl_concat_string_char4): New function decls.
2684 (gfc_build_intrinsic_function_decls): Define new *_char4 function
2685 decls.
2686 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
2687 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
2688 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
2689 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
2690
d06abff5
SL
26912008-05-15 Sa Liu <saliu@de.ibm.com>
2692
2693 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
2694 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
2695 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
2696 GNU extensions.
2697 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
2698 to macro NAMED_INTCST.
2699 * symbol.c (std_for_isocbinding_symbol): New helper function to
2700 return the standard that supports this isocbinding symbol.
2701 (generate_isocbinding_symbol): Do not generate GNU extension symbols
2702 if std=f2003. Add new parameter to NAMED_INTCST.
2703 * module.c (use_iso_fortran_env_module): Add new parameter to
2704 NAMED_INTCST and new field standard to struct intmod_sym.
2705 * gfortran.h: Add new parameter to NAMED_INTCST.
2706 * trans-types.c (init_c_interop_kinds): Add new parameter to
2707 NAMED_INTCST.
2708 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
2709 and C_INT_FAST128_T.
2710
1c3339af
FXC
27112008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2712
2713 PR fortran/36059
2714 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
2715 arrays that have the TARGET attribute.
2716
6401bf9c
FXC
27172008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2718
2719 PR fortran/36186
2720 * simplify.c (only_convert_cmplx_boz): New function.
2721 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
2722 Call only_convert_cmplx_boz.
2723
16f2a7a4
PT
27242008-05-14 Paul Thomas <pault@gcc.gnu.org>
2725
6401bf9c
FXC
2726 PR fortran/36233
2727 * interface.c (compare_actual_formal): Do not check sizes if the
2728 actual is BT_PROCEDURE.
16f2a7a4 2729
4c7382bb
FXC
27302008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2731
2732 PR fortran/35682
2733 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
2734 the same as zero size.
2735 (gfc_conv_loop_setup): Fix size calculation.
2736
f10827b1
FXC
27372008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2738
2739 PR fortran/35685
2740 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
2741 handle zero-size sections.
2742
b0b14c7b
FXC
27432008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2744
2745 PR fortran/36215
2746 * scanner.c (preprocessor_line): Allocate enough memory for a
2747 wide string.
2748
b7d36ea3
FXC
27492008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2750
2751 PR fortran/36176
2752 * target-memory.c (gfc_target_expr_size): Correctly treat
2753 substrings.
2754 (gfc_target_encode_expr): Likewise.
2755 (gfc_interpret_complex): Whitespace change.
2756
8f0aaee5
TK
27572008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
2758
2759 PR fortran/35719
2760 * trans.c (gfc_call_malloc): If size equals zero, allocate one
2761 byte; don't return a null pointer.
2762
1ed5323b
FXC
27632008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2764
2765 PR fortran/36197
2766 * module.c (quote_string): Fix sprintf format.
2767
3ee6cb3f
FXC
27682008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2769
2770 PR fortran/36162
2771 * module.c (quote_string, unquote_string,
2772 mio_allocated_wide_string): New functions.
2773 (mio_expr): Call mio_allocated_wide_string where needed.
2774
becfd6e5
KZ
27752008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2776
2777 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
2778 Rename DECL_IS_PURE to DECL_PURE_P.
2779
00660189
FXC
27802008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2781
2782 * arith.c: (gfc_arith_concat, gfc_compare_string,
2783 gfc_compare_with_Cstring, hollerith2representation,
2784 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
2785 gfc_hollerith2character, gfc_hollerith2logical): Use wide
2786 characters for character constants.
2787 * data.c (create_character_intializer): Likewise.
2788 * decl.c (gfc_set_constant_character_len): Likewise.
2789 * dump-parse-tree.c (show_char_const): Correctly dump wide
2790 character strings.
2791 error.c (print_wide_char): Rename into gfc_print_wide_char.
2792 (show_locus): Adapt to new prototype of gfc_print_wide_char.
2793 expr.c (free_expr0): Representation is now disjunct from
2794 character string value, so we always free it.
2795 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
2796 to wide character strings.
2797 * gfortran.h (gfc_expr): Make value.character.string a wide string.
2798 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
2799 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
2800 (gfc_get_wide_string): New macro.
2801 (gfc_print_wide_char): New prototype.
2802 * io.c (format_string): Make a wide string.
2803 (next_char, gfc_match_format, compare_to_allowed_values,
2804 gfc_match_open): Deal with wide strings.
2805 * module.c (mio_expr): Convert between wide strings and ASCII ones.
2806 * primary.c (match_hollerith_constant, match_charkind_name):
2807 Handle wide strings.
2808 * resolve.c (build_default_init_expr): Likewise.
2809 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
2810 gfc_char_to_widechar): New functions.
2811 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
2812 Changes in prototypes.
2813 (gfc_define_undef_line, load_line, preprocessor_line,
2814 include_line, load_file, gfc_read_orig_filename): Handle wide
2815 strings.
2816 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
2817 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
2818 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
2819 gfc_simplify_repeat): Handle wide strings.
2820 (wide_strspn, wide_strcspn): New helper functions.
2821 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
2822 Handle wide strings.
2823 * symbol.c (generate_isocbinding_symbol): Likewise.
2824 * target-memory.c (size_character, gfc_target_expr_size,
2825 encode_character, gfc_target_encode_expr, gfc_interpret_character,
2826 gfc_target_interpret_expr): Handle wide strings.
2827 * trans-const.c (gfc_conv_string_init): Lower wide strings to
2828 narrow ones.
2829 (gfc_conv_constant_to_tree): Likewise.
2830 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
2831 * trans-io.c (gfc_new_nml_name_expr): Likewise.
2832 * trans-stmt.c (gfc_trans_label_assign): Likewise.
2833
1b38192d
FXC
28342008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2835
2836 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
2837 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
2838 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
2839 with ATTRIBUTE_UNUSED.
2840
37a2dc42
FXC
28412008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2842
2843 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
2844 * simplify.c (gfc_simplify_lgamma): Likewise.
2845
28462008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8fc541d3
FXC
2847
2848 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
2849 gfc_peek_ascii_char.
2850 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
2851 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
2852 match_string_p, match_attr_spec, gfc_match_suffix,
2853 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
2854 Likewise.
2855 * gfortran.h (gfc_char_t): New type.
2856 (gfc_linebuf): Make line member a gfc_char_t.
2857 (locus): Make nextc member a gfc_char_t.
2858 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
2859 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
2860 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
2861 * error.c (print_wide_char): New function.
2862 (show_locus): Use print_wide_char and gfc_wide_strlen.
2863 * io.c (next_char): Use gfc_char_t type.
2864 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
2865 * match.c (gfc_match_parens, gfc_match_eos,
2866 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
2867 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
2868 gfc_match_common): Likewise.
2869 * match.h (gfc_match_special_char): Change prototype.
2870 * parse.c (decode_specification_statement, decode_statement,
2871 decode_omp_directive, next_free, next_fixed): Use
2872 gfc_peek_ascii_char and gfc_next_ascii_char.
2873 * primary.c (gfc_check_digit): Change name.
2874 (match_digits, match_hollerith_constant, match_boz_constant,
2875 match_real_constant, next_string_char, match_charkind_name,
2876 match_string_constant, match_logical_constant_string,
2877 match_complex_constant, match_actual_arg, match_varspec,
2878 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
2879 gfc_next_ascii_char.
2880 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
2881 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
2882 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
2883 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
2884 gfc_next_ascii_char, gfc_peek_ascii_char):
2885 New functions.
2886 (next_char, gfc_define_undef_line, skip_free_comments,
2887 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
2888 gfc_error_recovery, load_line, preprocessor_line, include_line,
2889 load_file, gfc_read_orig_filename): Use gfc_char_t for source
2890 characters and the {gfc_,}wide_* functions to manipulate wide
2891 strings.
2892
3c3f4265
TB
28932008-05-06 Tobias Burnus <burnus@net-b.de>
2894
2895 PR fortran/36117
2896 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
2897 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
2898 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
2899 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
2900 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
2901
ed54a884
JW
29022008-05-03 Janus Weil <jaydub66@gmail.com>
2903
2904 * misc.c (gfc_clear_ts): Set interface to NULL.
2905
ad7ee6f8
JD
29062008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2907
2908 PR fortran/33268
2909 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
2910 gfc_expr value union. Add io_kind enum to here from io.c.
2911 * io.c (gfc_free_dt): Free extra_comma.
2912 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
2913 BT_CHARACTER, resolve to format_expr and set default unit. Error if
2914 io_kind is M_WRITE. (match_io): Match the extra comma and set new
2915 pointer, extra_comma.
2916
00113de8
BD
29172008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
2918
2919 PR35940/Fortran
2920 * simplify.c (gfc_simplify_index): Check for direction argument
2921 being a constant.
2922
32d99e68
JW
29232008-05-01 Janus Weil <jaydub66@gmail.com>
2924
2925 * gfortran.h (struct gfc_symbol): Moving "interface" member to
2926 gfc_typespec (plus fixing a small docu error).
2927 * interface.c (gfc_procedure_use): Ditto.
2928 * decl.c (match_procedure_decl): Ditto.
2929 * resolve.c (resolve_specific_f0,
2930 resolve_specific_f0, resolve_symbol): Ditto.
2931
a39fafac
FXC
29322008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2933
2934 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
2935 * intrinsic.h (gfc_check_selected_char_kind,
2936 gfc_simplify_selected_char_kind): New prototypes.
2937 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
2938 * trans.h (gfor_fndecl_sc_kind): New function decl.
2939 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
2940 * arith.c (gfc_compare_with_Cstring): New function.
2941 * arith.h (gfc_compare_with_Cstring): New prototype.
2942 * check.c (gfc_check_selected_char_kind): New function.
2943 * primary.c (match_string_constant, match_kind_param): Mark
2944 symbols used as literal constant kind param as referenced.
2945 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
2946 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
2947 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
2948 * simplify.c (gfc_simplify_selected_char_kind): New function.
2949
29d40637
PT
29502008-04-28 Paul Thomas <pault@gcc.gnu.org>
2951
a39fafac
FXC
2952 PR fortran/35997
2953 * module.c (find_symbol): Do not return a result for a symbol
2954 that has been renamed in another module.
29d40637 2955
da69cc91
GH
29562008-04-26 George Helffrich <george@gcc.gnu.org>
2957
2958 PR fortran/35892
2959 PR fortran/35154
2960 * trans-common.c (create_common): Add decl to function
2961 chain (if inside one) to preserve identifier scope in debug output.
2962
e3b5732b
JH
29632008-04-25 Jan Hubicka <jh@suse.cz>
2964
2965 * trans-decl.c (trans_function_start): Update.
2966
ccc2ed87
TB
29672008-04-25 Tobias Burnus <burnus@net-b.de>
2968 Daniel Franke <franke.daniel@gmail.com>
2969
2970 PR fortran/35156
2971 * gfortranspec.c (lang_specific_driver): Deprecate
2972 -M option; fix ICE when "-M" is last argument and
2973 make "-M<dir>" work.
2974 * options.c (gfc_handle_module_path_options):
2975 Use -J instead of -M in error messages.
2976 * invoke.texi: Mark -M as depecated.
2977
4e77ad24
JD
29782008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2979 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2980
2981 PR fortran/35994
2982 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
2983 loop counter offset.
2984
51eed280
PB
29852008-04-23 Paolo Bonzini <bonzini@gnu.org>
2986
2987 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
2988 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
2989 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
2990 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
2991 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
2992 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
2993 (create_common): Don't set TREE_INVARIANT.
2994 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
2995 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
2996
6384205f
SE
29972008-04-21 Steve Ellcey <sje@cup.hp.com>
2998
2999 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
3000
3d4cb550
DF
30012008-04-21 Daniel Franke <franke.daniel@gmail.com>
3002
3003 PR fortran/35019
3004 * gfortranspec.c (lookup_option): Properly handle separated arguments
3005 in -J option, print missing argument message when necessary.
3006
f449022d
JD
30072008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3008
3009 PR fortran/35882
3010 * scanner.c (skip_fixed_comments): Update continue_line when comment is
3011 detected. (gfc_next_char_literal): Likewise.
3012
f40eccb0
PT
30132008-04-19 Paul Thomas <pault@gcc.gnu.org>
3014
3015 PR fortran/35944
3016 PR fortran/35946
3017 PR fortran/35947
3018 * trans_array.c (gfc_trans_array_constructor): Temporarily
3019 realign loop, if loop->from is not zero, before creating
3020 the temporary array and provide an offset.
3021
3022 PR fortran/35959
3023 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
3024 and allow for NULL body. Change all references from
3025 init_default_dt to gfc_init_default_dt.
3026 * trans.h : Add prototype for gfc_init_default_dt.
3027 * trans-array.c (gfc_trans_deferred_vars): After nullification
3028 call gfc_init_default_dt for derived types with allocatable
3029 components.
3030
6c0c6ecc
JD
30312008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3032
766cb661 3033 PR fortran/35892
6c0c6ecc
JD
3034 * trans-common.c (create_common): Revert patch causing regression.
3035
554ef027
JD
30362008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3037
3038 PR fortran/35724
3039 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
3040 optional argument attribute.
3041
c2408681
PT
30422008-04-16 Paul Thomas <pault@gcc.gnu.org>
3043
3044 PR fortran/35932
3045 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
3046 is not used, the argument must be converted.
3047
fc207c37
JJ
30482008-04-16 Jakub Jelinek <jakub@redhat.com>
3049
3050 PR target/35662
3051 * f95-lang.c (gfc_init_builtin_functions): Make sure
3052 BUILT_IN_SINCOS{,F,L} types aren't varargs.
3053
05e6ff80
PT
30542008-04-15 Paul Thomas <pault@gcc.gnu.org>
3055
3056 PR fortran/35864
3057 * expr.c (scalarize_intrinsic_call): Reorder identification of
3058 array argument so that if one is not found a segfault does not
3059 occur. Return FAILURE if all scalar arguments.
3060
dfbfb630
JD
30612008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3062 Tobias Burnus <burnus@net-b.de>
3063
3064 PR fortran/35882
3065 * options.c (gfc_init_options): Set the default maximum continuation
3066 lines to 255 for both free and fixed form source for warnings.
3067 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
3068 the -std=f95 free form max continuations to 39 for warnings.
3069 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
3070 if it is less than the current locus.
3071
d06b3496
JD
30722008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3073
3074 PR fortran/25829 28655
3075 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
3076 round, sign, and id. (match_open_element): Match new tags.
3077 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
3078 for DEFAULT only. Update error messages. (match_dt_element): Fix match
3079 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
3080 new expressions. (match_inquire_element): Match new tags.
3081 (gfc_match_inquire): Add constraint for ID and PENDING.
3082 (gfc_resolve_inquire): Resolve new tags.
3083 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
3084 mask for ID parameter.
3085 * ioparm.def: Fix order of parameters for pending, round, and sign.
3086 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
3087 things don't work.
3088
679d9637
PT
30892008-04-06 Paul Thomas <pault@gcc.gnu.org>
3090
3091 PR fortran/35780
3092 * expr.c (scalarize_intrinsic_call): Identify which argument is
3093 an array and use that as the template.
3094 (check_init_expr): Remove tests that first argument is an array
3095 in the call to scalarize_intrinsic_call.
3096
95213750 30972008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
9b8d1901
TS
3098
3099 PR fortran/35832
3100 * io.c (io_tag): Add field 'value'. Split 'spec' field in
3101 existing io_tags.
3102 (match_etag, match_vtag, match_ltag): Split parsing in two steps
3103 to give better error messages.
3104
fbe88ffa
TB
31052008-04-06 Tobias Burnus <burnus@net-b.de>
3106
3107 * io.c (check_io_constraints): Add constrains. ID= requires
3108 asynchronous= and asynchronous= must be init expression.
3109
3135ce84
FXC
31102008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3111
3112 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
3113
6c1abb5c
FXC
31142008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3115
3116 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
3117 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
3118 functions and make them static. Add new gfc_dump_parse_tree
3119 function.
3120 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
3121 (gfc_status, gfc_status_char): Delete prototypes.
3122 * error.c (gfc_status, gfc_status_char): Remove functions.
3123 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
3124 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
3125 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
3126 gfc_status and exit.
3127 (gfc_handle_option): Rename verbose into dump_parse_tree.
daf5afd4 3128 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
6c1abb5c 3129
6f0f0b2e
JD
31302008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3131 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3132
3133 PR fortran/25829 28655
3134 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
3135 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
3136 (gfc_open): Add pointers for decimal, encoding, round, sign,
3137 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
3138 encoding, pending, round, sign, size, id.
3139 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
3140 asynchronous, blank, decimal, delim, pad, round, sign.
3141 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
3142 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
3143 * trans-stmt.h (gfc_trans_wait): New function prototype.
3144 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
3145 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
3146 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
3147 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
3148 tags. (gfc_resolve_open): Remove comment around check for allowed
3149 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
3150 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
3151 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
3152 (match_wait_element): New function. (gfc_match_wait): New function.
3153 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
3154 (resolve_code): Add case for EXEC_WAIT.
3155 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
3156 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
3157 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
3158 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
3159 (gfc_trans_open): Add mask bits for new I/O tags.
3160 (gfc_trans_inquire): Add mask bits for new I/O tags.
3161 (gfc_trans_wait): New translation function.
3162 (build_dt): Add mask bits for new I/O tags.
3163 * match.c (gfc_match_if) Add matcher for "wait".
3164 * match.h (gfc_match_wait): Prototype for new function.
3165 * ioparm.def: Add new I/O parameter definitions.
3166 * parse.c (decode_statement): Add match for "wait" statement.
3167 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
3168
637b5a8e
JJ
31692008-04-03 Jakub Jelinek <jakub@redhat.com>
3170
3171 PR fortran/35786
3172 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
3173 isn't a variable.
3174
6cba282a
TT
31752008-04-03 Tom Tromey <tromey@redhat.com>
3176
3177 * Make-lang.in (fortran_OBJS): New variable.
3178
9ff420f1
PB
31792008-04-03 Paolo Bonzini <bonzini@gnu.org>
3180
6c1abb5c 3181 * f95-lang.c (insert_block): Kill.
9ff420f1 3182
7151ffbe
GH
31832008-04-01 George Helffrich <george@gcc.gnu.org>
3184
623f8e39 3185 PR fortran/35154, fortran/23057
7151ffbe
GH
3186 * trans-common.c (create_common): Add decl to function
3187 chain to preserve identifier scope in debug output.
3188
7f9766e4
JM
31892008-04-01 Joseph Myers <joseph@codesourcery.com>
3190
3191 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
3192 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
3193 gpl.texi.
3194
23d1b451
PT
31952008-03-30 Paul Thomas <pault@gcc.gnu.org>
3196
3197 PR fortran/35740
3198 * resolve.c (resolve_function, resolve_call): If the procedure
3199 is elemental do not look for noncopying intrinsics.
3200
067feae3
PT
32012008-03-29 Paul Thomas <pault@gcc.gnu.org>
3202
3203 PR fortran/35698
3204 * trans-array.c (gfc_array_init_size): Set 'size' zero if
3205 negative in one dimension.
3206
3207 PR fortran/35702
3208 * trans-expr.c (gfc_trans_string_copy): Only assign a char
3209 directly if the lhs and rhs types are the same.
3210
01d2a7d7
DF
32112008-03-28 Daniel Franke <franke.daniel@gmail.com>
3212 Paul Richard Thomas <paul.richard.thomas@gmail.com>
3213
3214 PR fortran/34714
3215 * primary.c (match_variable): Improved matching of function
3216 result variables.
3217 * resolve.c (resolve_allocate_deallocate): Removed checks if
3218 the actual argument for STAT is a variable.
3219
b0be8e5c
TB
32202008-03-28 Tobias Burnus <burnus@net-b.de>
3221
3222 * symbol.c (gfc_get_default_type): Fix error message; option
3223 -fallow_leading_underscore should be -fallow-leading-underscore
3224
97d650cc
JD
32252008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3226
3227 PR fortran/35724
3228 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
3229 optional argument attribute.
3230
e980df8e
TT
32312008-03-27 Tom Tromey <tromey@redhat.com>
3232
3233 * Make-lang.in: Revert automatic dependency patch.
3234
2fe3178b
TT
32352008-03-25 Tom Tromey <tromey@redhat.com>
3236
3237 * Make-lang.in: Remove .o targets.
3238 (fortran_OBJS): New variable.
3239 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
3240 setting.
3241 (GFORTRAN_D_OBJS): Update.
3242 (GFORTRAN_TRANS_DEPS): Remove.
3243
c1203a70
PT
32442008-03-24 Paul Thomas <pault@gcc.gnu.org>
3245
3246 PR fortran/34813
3247 * resolve.c (resolve_structure_cons): It is an error to assign
3248 NULL to anything other than a pointer or allocatable component.
3249
3250 PR fortran/33295
3251 * resolve.c (resolve_symbol): If the symbol is a derived type,
3252 resolve the derived type. If the symbol is a derived type
3253 function, ensure that the derived type is visible in the same
3254 namespace as the function.
3255
95213750 32562008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
47056774
TS
3257
3258 * trans.h: Use fold_build in build1_v, build2_v and build3_v
3259 macros.
3260 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
3261 Don't use build2_v macro.
3262
ac05557c
DF
32632008-03-19 Daniel Franke <franke.daniel@gmail.com>
3264
3265 PR fortran/35152
3266 * interface.c (gfc_procedure_use): Check for keyworded arguments in
3267 procedures without explicit interfaces.
3268
c52938ec
PT
32692008-03-16 Paul Thomas <pault@gcc.gnu.org>
3270
3271 PR fortran/35470
3272 * resolve.c (check_assumed_size_reference): Only visit the
3273 first reference and look directly at the highest dimension.
3274
db5cf0c7
JD
32752008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3276
3277 PR fortran/35184
3278 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
3279 assert.
3280
ab551054
DF
32812008-03-15 Daniel Franke <franke.daniel@gmail.com>
3282
3283 PR fortran/35584
3284 * resolve.c (resolve_branch): Less strict and pessimistic warning
3285 message.
3286
30e257e5
PB
32872008-03-11 Paolo Bonzini <bonzini@gnu.org>
3288
ab551054
DF
3289 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
3290 (gfc_be_parse_file): Call clear_binding_stack from here.
30e257e5
PB
3291 (gfc_clear_binding_stack): Rename to clear_binding_stack.
3292
81c10953
PT
32932008-03-09 Paul Thomas <pault@gcc.gnu.org>
3294
3295 PR fortran/35474
3296 * module.c (mio_symtree_ref): After providing a symbol for a
3297 missing equivalence member, resolve and NULL the fixups.
3298
802e3f8c
RW
32992008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3300
3301 * invoke.texi (Error and Warning Options): Document
3302 -Wline-truncation.
3303
ba4698e1
FXC
33042008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3305
3306 PR fortran/34956
3307 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
3308 checking bounds of absent optional arguments.
3309
fdc54e88
FXC
33102008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3311
3312 PR fortran/33197
3313 * intrinsic.c (add_functions): Add simplification routines for
3314 ERF, DERF, ERFC and DERFC.
3315 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
3316 extensions into Fortran 2008 features.
3317 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
3318 prototypes.
3319 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
3320
f489fba1
FXC
33212008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3322
3323 PR fortran/33197
3324 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
3325 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
3326 ERFC_SCALED, LOG_GAMMA and HYPOT.
3327 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
3328 gfc_resolve_hypot): New prototypes.
3329 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
3330 ACOSH, ASINH and ATANH available.
3331 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
3332 * lang.opt: Add -std=f2008 option.
3333 * libgfortran.h: Define GFC_STD_F2008.
3334 * lang-specs.h: Add .f08 and .F08 file suffixes.
3335 * iresolve.c (gfc_resolve_hypot): New function.
3336 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
3337 * check.c (gfc_check_hypot): New function.
3338 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
3339 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
3340 (form_from_filename): Add .f08 suffix.
3341 (gfc_handle_option): Handle -std=f2008 option.
3342 * simplify.c (gfc_simplify_hypot): New function.
3343 * gfortran.texi: Document Fortran 2008 status and file extensions.
3344 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
3345 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
3346 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
3347 * invoke.texi: Document the new -std=f2008 option.
3348
0e5997c0
JJ
33492008-03-02 Jakub Jelinek <jakub@redhat.com>
3350
3351 * gfortranspec.c (lang_specific_driver): Update copyright notice
3352 dates.
3353
44000dbb
JD
33542008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3355
3356 PR fortran/35059
3357 * expr.c (find_array_element): Modify traversing the constructor to
3358 avoid trying to access NULL memory pointed to by next for the
3359 last element. (find_array_section): Exit while loop if cons->next is
3360 NULL.
3361 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
3362 (gfc_conv_function_call): Same.
3363 * decl.c (gfc_match_implicit): Same.
3364 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
3365
766d0c8c
DF
33662008-02-28 Daniel Franke <franke.daniel@gmail.com>
3367
3368 PR fortran/31463
3369 PR fortran/33950
3370 PR fortran/34296
3371 * lang.opt: Added -Wreturn-type.
3372 * options.c (gfc_handle_option): Recognize -Wreturn-type.
3373 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
3374 where the result value is not set.
3375 (gfc_generate_function_code): Likewise.
3376 (generate_local_decl): Emit warnings for funtions whose RESULT
3377 variable is not set.
3378
43e7fd21
FXC
33792008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3380
3381 PR fortran/34868
3382 * trans-expr.c (gfc_conv_variable): Don't build indirect
3383 references when explicit interface is mandated.
3384 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
3385 on the result symbol as well as the procedure symbol.
3386
b5a4419c
FXC
33872008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3388
3389 PR fortran/33387
3390 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
3391 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
3392 gfor_fndecl_math_exponent16.
3393 * f95-lang.c (build_builtin_fntypes): Add new function types.
3394 (gfc_init_builtin_functions): Add new builtins for nextafter,
3395 frexp, ldexp, fabs, scalbn and inf.
3396 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
3397 (gfc_resolve_scale): Don't convert type of second argument.
3398 (gfc_resolve_set_exponent): Likewise.
3399 (gfc_resolve_size): Don't add hidden arguments.
3400 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
3401 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
3402 gfor_fndecl_math_exponent16.
3403 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
3404 for scalbn, fraction, nearest, rrspacing, set_exponent and
3405 spacing.
3406 (gfc_conv_intrinsic_exponent): Directly call frexp.
3407 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
3408 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
3409 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
3410 functions.
3411 (gfc_conv_intrinsic_function): Use the new functions above.
3412
e19bb186
TB
34132008-02-26 Tobias Burnus <burnus@net-b.de>
3414
3415 PR fortran/35033
3416 * interface.c (check_operator_interface): Show better line for error
3417 messages; fix constrains for user-defined assignment operators.
3418 (gfc_extend_assign): Fix constrains for user-defined assignment
3419 operators.
3420
2d593c86
TT
34212008-02-26 Tom Tromey <tromey@redhat.com>
3422
3423 * trans-io.c (set_error_locus): Remove old location code.
3424 * trans-decl.c (gfc_set_decl_location): Remove old location code.
3425 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
3426 * scanner.c (gfc_gobble_whitespace): Remove old location code.
3427 (get_file): Likewise.
3428 (preprocessor_line): Likewise.
3429 (load_file): Likewise.
3430 (gfc_new_file): Likewise.
3431 * trans.c (gfc_trans_runtime_check): Remove old location code.
3432 (gfc_get_backend_locus): Likewise.
3433 (gfc_set_backend_locus): Likewise.
3434 * data.c (gfc_assign_data_value): Remove old location code.
3435 * error.c (show_locus): Remove old location code.
3436 * gfortran.h (gfc_linebuf): Remove old location code.
3437 (gfc_linebuf_linenum): Remove old-location variant.
3438
ee37d2f5
FXC
34392008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3440
3441 PR fortran/34729
3442 * trans-const.c (gfc_build_string_const): Don't call gettext.
3443 (gfc_build_localized_string_const): New function.
3444 * trans-const.h (gfc_build_localized_string_const): New prototype.
3445 * trans.c (gfc_trans_runtime_check): Use
3446 gfc_build_localized_string_const instead of gfc_build_string_const.
3447 (gfc_call_malloc): Likewise.
3448 (gfc_allocate_with_status): Likewise.
3449 (gfc_allocate_array_with_status): Likewise.
3450 (gfc_deallocate_with_status): Likewise.
3451 (gfc_call_realloc): Likewise.
3452 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
3453
95213750 34542008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
835aac92
TS
3455
3456 * arith.c: Update copyright years.
3457 * arith.h: Likewise.
3458 * array.c: Likewise.
3459 * bbt.c: Likewise.
3460 * check.c: Likewise.
3461 * data.c: Likewise.
3462 * data.h: Likewise.
3463 * decl.c: Likewise.
3464 * dependency.c: Likewise.
3465 * dependency.h: Likewise.
3466 * dump-parse-tree.c: Likewise.
3467 * error.c: Likewise.
3468 * expr.c: Likewise.
3469 * gfc-internals.texi: Likewise.
3470 * gfortran.h: Likewise.
3471 * gfortran.texi: Likewise.
3472 * gfortranspec.c: Likewise.
3473 * interface.c: Likewise.
3474 * intrinsic.c: Likewise.
3475 * intrinsic.h: Likewise.
3476 * intrinsic.texi: Likewise.
3477 * invoke.texi: Likewise.
3478 * io.c: Likewise.
3479 * iresolve.c: Likewise.
3480 * iso-c-binding.def: Likewise.
3481 * iso-fortran-env.def: Likewise.
3482 * lang-specs.h: Likewise.
3483 * lang.opt: Likewise.
3484 * libgfortran.h: Likewise.
3485 * match.c: Likewise.
3486 * match.h: Likewise.
3487 * matchexp.c: Likewise.
3488 * misc.c: Likewise.
3489 * module.c: Likewise.
3490 * openmp.c: Likewise.
3491 * options.c: Likewise.
3492 * parse.c: Likewise.
3493 * parse.h: Likewise.
3494 * primary.c: Likewise.
3495 * resolve.c: Likewise.
3496 * scanner.c: Likewise.
3497 * simplify.c: Likewise.
3498 * st.c: Likewise.
3499 * symbol.c: Likewise.
3500 * target-memory.c: Likewise.
3501 * target-memory.h: Likewise.
3502 * trans-array.h: Likewise.
3503 * trans-const.h: Likewise.
3504 * trans-stmt.h: Likewise.
3505 * trans-types.c: Likewise.
3506 * trans-types.h: Likewise.
3507 * types.def: Likewise.
3508
c05800b6
JD
35092008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3510
3511 PR fortran/35223
3512 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
3513 (gfc_simplify_ibset): Remove call to range_check.
3514 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
3515 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
3516 temporary gfc_typspec variable.
3517
95213750 35182008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
0418b811
TS
3519
3520 * trans-array.c (gfc_conv_descriptor_data_get,
3521 gfc_conv_descriptor_data_set_internal,
3522 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
3523 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
3524 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
3525 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
3526 gfc_conv_array_transpose, gfc_grow_array,
3527 gfc_trans_array_constructor_subarray,
3528 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
3529 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
3530 gfc_conv_array_initializer, gfc_trans_array_bounds,
3531 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3532 gfc_get_dataptr_offset, gfc_conv_array_parameter,
3533 gfc_trans_dealloc_allocated, get_full_array_size,
3534 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
3535 instead of buildN.
3536 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
3537 gfc_conv_component_ref, gfc_conv_cst_int_power,
3538 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
3539 * trans-common.c (create_common): Likewise.
3540 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
3541 Likewise.
3542 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
3543 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
3544 gfc_trans_integer_select, gfc_trans_character_select,
3545 gfc_trans_forall_loop, compute_overall_iter_number,
3546 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
3547 gfc_trans_deallocate): Likewise.
3548 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
3549 gfc_allocate_with_status, gfc_allocate_array_with_status,
3550 gfc_deallocate_with_status): Likewise.
3551 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
3552 * trans-io.c (set_parameter_const, set_parameter_value,
3553 set_parameter_ref, set_string, set_internal_unit, io_result,
3554 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
3555 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
3556 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
3557 gfc_generate_function_code): Likewise.
3558 * convert.c (convert): Likewise.
3559 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
3560 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
3561 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
3562 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
3563 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3564 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
3565 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
3566 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
3567 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
3568 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
3569 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3570 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
3571 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3572 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
3573 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
3574 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
3575 gfc_conv_intrinsic_repeat): Likewise.
3576
37a2dc42 35772008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
fb220235
FXC
3578
3579 PR target/25477
3580 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
3581 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
3582 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
3583 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
3584 * trans-decl.c: Likewise.
3585
c05800b6
JD
35862008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3587
3588 PR fortran/35059
3589 * expr.c (find_array_element): Modify traversing the constructor to
3590 avoid trying to access NULL memory pointed to by next for the
3591 last element. (find_array_section): Exit while loop if cons->next is
3592 NULL.
3593
35942008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4af63337
JD
3595
3596 PR fortran/34907
3597 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
3598 structure.
3599 (gfc_resolve_aint): Likewise.
3600 (gfc_resolve_anint): Likewise.
3601 (gfc_resolve_besn): Likewise.
3602 (gfc_resolve_cshift): Likewise.
3603 (gfc_resolve_ctime): Likewise.
3604 (gfc_resolve_eoshift): Likewise.
3605 (gfc_resolve_index_func): Likewise.
3606 (gfc_resolve_isatty): Likewise.
3607 (gfc_resolve_malloc): Likewise.
3608 (gfc_resolve_rrspacing): Likewise.
3609 (gfc_resolve_scale): Likewise.
3610 (gfc_resolve_set_exponent): Likewise.
3611 (gfc_resolve_spacing): Likewise.
3612 (gfc_resolve_spacing): Likewise.
3613 (gfc_resolve_fgetc): Likewise.
3614 (gfc_resolve_fputc): Likewise.
3615 (gfc_resolve_ftell): Likewise.
3616 (gfc_resolve_ttynam): Likewise.
3617 (gfc_resolve_alarm_sub): Likewise.
3618 (gfc_resolve_mvbits): Likewise.
3619 (gfc_resolve_getarg): Likewise.
3620 (gfc_resolve_signal_sub): Likewise.
3621 (gfc_resolve_exit): Likewise.
3622 (gfc_resolve_flush): Likewise.
3623 (gfc_resolve_free): Likewise.
3624 (gfc_resolve_ctime_sub): Likewise.
3625 (gfc_resolve_fgetc_sub): Likewise.
3626 (gfc_resolve_fputc_sub): Likewise.
3627 (gfc_resolve_fseek_sub): Likewise.
3628 (gfc_resolve_ftell_sub): Likewise.
3629 (gfc_resolve_ttynam_sub): Likewise.
3630
24219f12
RW
36312008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3632
3633 * gfc-internals.texi: Fix typos and markup nits.
3634 * gfortran.texi: Likewise.
3635 * intrinsic.texi: Likewise.
3636
dedd42d5
RG
36372008-02-21 Richard Guenther <rguenther@suse.de>
3638
3639 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
3640 as unary PAREN_EXPR for real and complex typed expressions.
3641 (gfc_conv_unary_op): Fold the built tree.
3642
89a5afda
TB
36432008-02-20 Tobias Burnus <burnus@net-b.de>
3644
3645 PR fortran/34997
3646 * match.c (gfc_match_name): Improve error message for '$'.
3647
606c2c03
DF
36482008-02-19 Daniel Franke <franke.daniel@gmail.com>
3649
3650 PR fortran/35030
3651 * expr.c (gfc_check_pointer_assign): Add type and kind information
3652 to type-mismatch message.
3653 (gfc_check_assign): Unify error messages.
3654
49309826
FXC
36552008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3656
3657 PR fortran/34952
3658 * gfortran.texi: Create new section for unimplemented extensions.
3659 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
3660 Remove "smaller projects" list. Fix a few typos.
3661
6b45fd61
FXC
36622008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3663
3664 * intrinsic.texi: Rename INDEX node to avoid clashing with
3665 index.html on case-insensitive systems.
3666
750606c6
FXC
36672008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3668
3669 PR fortran/35150
3670 * trans-expr.c (gfc_conv_function_call): Force evaluation of
3671 se->expr.
3672
3d39d415
DF
36732008-02-10 Daniel Franke <franke.daniel@gmail.com>
3674
606c2c03 3675 PR fortran/35019
3d39d415
DF
3676 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
3677 likewise '-I <dir>' and '-I<dir>'.
3678
72fb133f
KG
36792008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3680
3681 PR other/35107
3682 * Make-lang.in (f951): Add $(GMPLIBS).
3683
e3ac9b24
FXC
36842008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3685
3686 PR fortran/35037
3687 * trans-common.c (build_field): Mark fields as volatile when needed.
3688
da36ba27
TB
36892008-02-05 Tobias Burnus <burnus@net-b.de>
3690
3691 PR fortran/35093
3692 * data.c (gfc_assign_data_value): Only free "size" if
3693 it has not already been freed.
3694
52f56431
PT
36952008-02-05 Paul Thomas <pault@gcc.gnu.org>
3696
3697 PR fortran/34945
3698 * array.c (match_array_element_spec): Remove check for negative
3699 array size.
3700 (gfc_resolve_array_spec): Add check for negative size.
3701
3969f765
PT
37022008-02-05 Paul Thomas <pault@gcc.gnu.org>
3703
3704 PR fortran/32315
3705 * data.c (gfc_assign_data_value): Add bounds check for array
3706 references.
3707
ba6e57ba
DF
37082008-02-04 Daniel Franke <franke.daniel@gmail.com>
3709
3710 * resolve.c (resolve_where): Fix typo.
3711 (gfc_resolve_where_code_in_forall): Likewise.
3712
b9332b09
PT
37132008-02-03 Paul Thomas <pault@gcc.gnu.org>
3714
3715 PR fortran/32760
3716 * resolve.c (resolve_allocate_deallocate): New function.
3717 (resolve_code): Call it for allocate and deallocate.
3718 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
3719 the checking of the STAT tag and put in above new function.
3720 * primary,c (match_variable): Do not fix flavor of host
3721 associated symbols yet if the type is not known.
3722
db39d0c2
PT
37232008-01-31 Paul Thomas <pault@gcc.gnu.org>
3724
3725 PR fortran/34910
3726 * expr.c (gfc_check_assign): It is an error to assign
3727 to a sibling procedure.
3728
a99d95a2
PT
37292008-01-30 Paul Thomas <pault@gcc.gnu.org>
3730
3731 PR fortran/34975
3732 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
3733 delete_symtree to gfc_delete_symtree.
3734 * gfortran.h : Add prototype for gfc_delete_symtree.
3735 * module.c (load_generic_interfaces): Transfer symbol to a
3736 unique symtree and delete old symtree, instead of renaming.
3737 (read_module): The rsym and the found symbol are the same, so
3738 the found symtree can be deleted.
3739
3740 PR fortran/34429
3741 * decl.c (match_char_spec): Remove the constraint on deferred
3742 matching of functions and free the length expression.
3743 delete_symtree to gfc_delete_symtree.
3744 (gfc_match_type_spec): Whitespace.
3745 (gfc_match_function_decl): Defer characteristic association for
3746 all types except BT_UNKNOWN.
3747 * parse.c (decode_specification_statement): Only derived type
3748 function matching is delayed to the end of specification.
3749
64a96f5b
TB
37502008-01-28 Tobias Burnus <burnus@net-b.de>
3751
3752 PR libfortran/34980
3753 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
3754
938f31f1
JD
37552008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3756
3757 PR fortran/34990
3758 * array.c (gfc_check_constructor_type): Revert clearing the expression.
3759
2c80cb0e
TB
37602008-01-26 Tobias Burnus <burnus@net-b.de>
3761
3762 PR fortran/34848
3763 * trans-expr.c (gfc_conv_function_call): Don't call
3764 gfc_add_interface_mapping if the expression is NULL.
3765
bdfc46af
JD
37662008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3767
3768 PR fortran/31610
3769 * trans-array.c (gfc_trans_create_temp_array): Remove call to
3770 gcc_assert (integer_zerop (loop->from[n])).
3771
42cd23cb
DF
37722008-01-25 Daniel Franke <franke.daniel@gmail.com>
3773
3774 PR fortran/34661
3775 * resolve.c (resolve_where): Added check if user-defined assignment
3776 operator is an elemental subroutine.
3777 (gfc_resolve_where_code_in_forall): Likewise.
3778
79f40de6
DF
37792008-01-24 Daniel Franke <franke.daniel@gmail.com>
3780
3781 PR fortran/33375
3782 PR fortran/34858
3783 * gfortran.h: Revert changes from 2008-01-17.
3784 * match.c: Likewise.
3785 * symbol.c: Likewise.
3786 (gfc_undo_symbols): Undo namespace changes related to common blocks.
3787
7c8d2703
DF
37882008-01-24 Daniel Franke <franke.daniel@gmail.com>
3789
3790 PR fortran/34202
3791 * data.c (formalize_structure_cons): Skip formalization on
3792 empty structures.
3793
3b303683
DF
37942008-01-24 Daniel Franke <franke.daniel@gmail.com>
3795
3796 * gfortran.texi (OpenMP): Extended existing documentation.
3797 (contributors): Added major contributors of 2008 that were
3798 not listed yet.
3799 (proposed extensions): Removed implemented items.
3800
38012008-01-24 Paul Thomas <pault@gcc.gnu.org>
3802
3803 PR fortran/34872
3804 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
3805 seen, check for a statement label and, if present, delete it
3806 and set the locus to the start of the statement.
3807
c63173dd
PT
38082008-01-22 Paul Thomas <pault@gcc.gnu.org>
3809
3810 PR fortran/34875
3811 * trans-io.c (gfc_trans_transfer): If the array reference in a
3812 read has a vector subscript, use gfc_conv_subref_array_arg to
3813 copy back the temporary.
3814
b5ca4fd2
TB
38152008-01-22 Tobias Burnus <burnus@net-b.de>
3816
3817 PR fortran/34848
3818 * interface.c (compare_actual_formal): Fix adding type
3819 to missing_arg_type for absent optional arguments.
3820
2ddd2871
TB
38212008-01-22 Tobias Burnus <burnus@net-b.de>
3822
3823 PR fortran/34907
3824 * parse.c (parse_spec): Change = into ==.
3825
c2916401
DF
38262008-01-22 Daniel Franke <franke.daniel@gmail.com>
3827
3828 PR fortran/34915
3829 * expr.c (check_elemental): Fix check for valid data types.
3830
fd1935d5
TB
38312008-01-22 Tobias Burnus <burnus@net-b.de>
3832
3833 PR fortran/34899
3834 * scanner.c (load_line): Support <tab><digit> continuation lines.
3835 * invoke.texi (-Wtabs): Document this.
3836
87a64f53
PT
38372008-01-22 Paul Thomas <pault@gcc.gnu.org>
3838
3839 PR fortran/34896
3840 * module.c (read_module): Set use_rename attribute.
3841
d68e117b
TB
38422007-01-21 Tobias Burnus <burnus@net-b.de>
3843
3844 PR fortran/34901
3845 * interface.c (compare_parameter): Improved error message
3846 for arguments of same type and mismatched kinds.
3847
f5d67ede
PT
38482008-01-20 Paul Thomas <pault@gcc.gnu.org>
3849
3850 PR fortran/34861
3851 * resolve.c (resolve_entries): Do not do an array bounds check
3852 if the result symbols are the same.
3853
3854 PR fortran/34854
3855 * module.c (read_module) : Hide the symtree of the previous
3856 version of the symbol if this symbol is renamed.
3857
f2d3cb25
PT
38582008-01-20 Paul Thomas <pault@gcc.gnu.org>
3859
3860 PR fortran/34784
3861 * array.c (gfc_check_constructor_type): Clear the expression ts
3862 so that the checking starts from the deepest level of array
3863 constructor.
3864 * primary.c (match_varspec): If an unknown type is changed to
3865 default character and the attempt to match a substring fails,
3866 change it back to unknown.
3867
3868 PR fortran/34785
3869 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
3870 NULL for an array constructor, use the cl.length expression to
3871 build it.
3872 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
3873 a tree assignment.
3874
c613d540
TK
38752008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
3876
3877 PR fortran/34817
3878 PR fortran/34838
3879 * iresolve.c (gfc_resolve_all): Remove conversion of mask
3880 argument to kind=1 by removing call to resolve_mask_arg().
3881 (gfc_resolve_any): Likewise.
3882
d7e2fcd0
TB
38832008-01-19 Tobias Burnus <burnus@net-b.de>
3884
3885 PR fortran/34760
3886 * primary.c (match_variable): Handle FL_UNKNOWN without
3887 uneducated guessing.
3888 (match_variable): Improve error message.
3889
a0710c29
TB
38902008-01-18 Tobias Burnus <burnus@net-b.de>
3891
3892 PR fortran/32616
3893 * interface.c (get_expr_storage_size): Return storage size
3894 for array element designators.
3895 (compare_actual_formal): Reject unequal string sizes for
3896 assumed-shape dummy arguments. And fix error message for
3897 array-sections with vector subscripts.
3898
207bde5f
JD
38992008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3900
3901 PR fortran/34556
3902 * simplify.c (is_constant_array_expr): New static function that returns
3903 true if the given expression is an array and is constant.
3904 (gfc_simplify_reshape): Use new function.
3905
c0184444
L
39062008-01-17 H.J. Lu <hongjiu.lu@intel.com>
3907
3908 PR fortran/33375
3909 * symbol.c (free_common_tree): Renamed to ...
3910 (gfc_free_common_tree): This. Remove static.
3911 (gfc_free_namespace): Updated.
3912
3913 * gfortran.h (gfc_free_common_tree): New.
3914
3915 * match.c (gfc_match_common): Call gfc_free_common_tree () with
3916 gfc_current_ns->common_root and set gfc_current_ns->common_root
3917 to NULL on syntax error.
3918
5cc5439e
RS
39192008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
3920
3921 PR fortran/34686
3922 * trans-expr.c (gfc_conv_function_call): Use proper
3923 type for returned character pointers.
3924
1c8bcdf7
PT
39252008-01-17 Paul Thomas <pault@gcc.gnu.org>
3926
3927 PR fortran/34429
3928 PR fortran/34431
3929 PR fortran/34471
3930 * decl.c : Remove gfc_function_kind_locus and
3931 gfc_function_type_locus. Add gfc_matching_function.
3932 (match_char_length): If matching a function and the length
3933 does not match, return MATCH_YES and try again later.
3934 (gfc_match_kind_spec): The same.
3935 (match_char_kind): The same.
3936 (gfc_match_type_spec): The same for numeric and derived types.
3937 (match_prefix): Rename as gfc_match_prefix.
3938 (gfc_match_function_decl): Except for function valued character
3939 lengths, defer applying kind, type and charlen info until the
3940 end of specification block.
3941 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
3942 parse.c (decode_specification_statement): New function.
3943 (decode_statement): Call it when a function has kind = -1. Set
3944 and reset gfc_matching function, as function statement is being
3945 matched.
3946 (match_deferred_characteristics): Simplify with a single call
3947 to gfc_match_prefix. Do appropriate error handling. In any
3948 case, make sure that kind = -1 is reset or corrected.
3949 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
3950 Throw an error if kind = -1 after last specification statement.
3951 parse.h : Prototype for gfc_match_prefix.
3952
6da0839a
TB
39532008-01-16 Tobias Burnus <burnus@net-b.de>
3954
3955 PR fortran/34796
3956 * interface.c (compare_parameter): Allow AS_DEFERRED array
3957 elements and reject attr.pointer array elemenents.
3958 (get_expr_storage_size): Return storage size of elements of
3959 assumed-shape and pointer arrays.
3960
e0e8ce7a
SP
39612008-01-15 Sebastian Pop <sebastian.pop@amd.com>
3962
3963 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
3964 for flag_tree_parallelize_loops.
3965
90469382
TK
39662008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
3967
3968 PR libfortran/34671
3969 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
3970 (gfc_resolve_any): Likewise.
3971 (gfc_resolve_count): Likewise. Don't append kind of
3972 argument to function name.
3973
5ad6345e
TB
39742008-01-13 Tobias Burnus <burnus@net-b.de>
3975
3976 PR fortran/34665
3977 * resolve.c (resolve_actual_arglist): For expressions,
3978 also check for assume-sized arrays.
3979 * interface.c (compare_parameter): Move F2003 character checks
3980 here, print error messages here, reject elements of
3981 assumed-shape array as argument to dummy arrays.
3982 (compare_actual_formal): Update for the changes above.
3983
083de129
TB
39842008-01-13 Tobias Burnus <burnus@net-b.de>
3985
3986 PR fortran/34763
3987 * decl.c (contained_procedure): Only check directly preceeding state.
3988
86288ff0
TB
39892008-01-13 Tobias Burnus <burnus@net-b.de>
3990
3991 PR fortran/34759
3992 * check.c (gfc_check_shape): Accept array ranges of
3993 assumed-size arrays.
3994
9a528648
JD
39952008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3996
9a27aa90 3997 PR fortran/34432
9a528648
JD
3998 * match.c (gfc_match_name): Don't error if leading character is a '(',
3999 just return MATCH_NO.
4000
bc9d9552
JD
40012008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4002
4003 PR fortran/34722
4004 * trans-io.c (create_dummy_iostat): Commit the symbol.
4005
d9183bb7
PT
40062008-01-11 Paul Thomas <pault@gcc.gnu.org>
4007
4008 PR fortran/34537
4009 * simplify.c (gfc_simplify_transfer): Return NULL if the size
4010 of the element is unavailable and only assign character length
4011 to the result, if 'mold' is constant.
4012
32be9f94
PT
40132008-01-10 Paul Thomas <pault@gcc.gnu.org>
4014
4015 PR fortran/34396
4016 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
4017 to assign strings and perform bounds checks on the string length.
4018 (get_array_ctor_strlen): Remove bounds checking.
4019 (gfc_trans_array_constructor): Initialize string length checking.
4020 * trans-array.h : Add prototype for gfc_trans_string_copy.
4021
416a8af4
RG
40222008-01-08 Richard Guenther <rguenther@suse.de>
4023
4024 PR fortran/34706
4025 PR tree-optimization/34683
4026 * trans-types.c (gfc_get_array_type_bounds): Use an array type
4027 with known size for accesses if that is known.
4028
0c6ce8b0
PT
40292008-01-08 Paul Thomas <pault@gcc.gnu.org>
4030
4031 PR fortran/34476
4032 * expr.c (find_array_element): Check that the array bounds are
4033 constant before using them. Use lower, as well as upper bound.
4034 (check_restricted): Allow implied index variable.
4035
3672065a
PT
40362008-01-08 Paul Thomas <pault@gcc.gnu.org>
4037
4038 PR fortran/34681
4039 * trans_array.c (gfc_trans_deferred_array): Do not null the
4040 data pointer on entering scope, nor deallocate it on leaving
4041 scope, if the symbol has the 'save' attribute.
4042
4043 PR fortran/34704
4044 * trans_decl.c (gfc_finish_var_decl): Derived types with
4045 allocatable components and an initializer must be TREE_STATIC.
4046
3a7b9fda
PT
40472008-01-07 Paul Thomas <pault@gcc.gnu.org>
4048
4049 PR fortran/34672
4050 * module.c (write_generic): Rewrite completely.
4051 (write_module): Change call to write_generic.
4052
bd5db9de
JD
40532008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4054
4055 PR fortran/34659
4056 * scanner.c (load_line): Do not count ' ' as printable when checking for
4057 continuations.
4058
5989df83 40592008-01-06 Paul Thomas <pault@gcc.gnu.org>
ac61ba6a 4060
5989df83
PT
4061 PR fortran/34545
4062 * module.c (load_needed): If the namespace has no proc_name
4063 give it the module symbol.
ac61ba6a 4064
9b09c4de
JD
40652008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4066
4067 PR fortran/34387
4068 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
4069 the dummy variable expression, test for NULL, and pass the variable
4070 address to the called function.
4071
346ecba8
TB
40722007-01-06 Tobias Burnus <burnus@net-b.de>
4073
4074 PR fortran/34658
4075 * match.c (gfc_match_common): Remove blank common in
4076 DATA BLOCK warning.
4077 * resolve.c (resolve_common_vars): New function.
4078 (resolve_common_blocks): Move checks to resolve_common_vars
4079 and invoke that function.
4080 (resolve_types): Call resolve_common_vars for blank commons.
4081
cddcf0d4
TB
40822008-01-06 Tobias Burnus <burnus@net-b.de>
4083
4084 PR fortran/34655
4085 * resolve.c (resolve_equivalence_derived): Reject derived types with
4086 default initialization if equivalenced with COMMON variable.
4087
89c32b0f
TB
40882008-01-06 Tobias Burnus <burnus@net-b.de>
4089
4090 PR fortran/34654
4091 * io.c (check_io_constraints): Disallow unformatted I/O for
4092 internal units.
4093
242633d6
TB
40942008-01-06 Tobias Burnus <burnus@net-b.de>
4095
4096 PR fortran/34660
4097 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
4098 ELEMENTAL functions.
4099
a5c655e8
TB
41002008-01-06 Tobias Burnus <burnus@net-b.de>
4101
4102 PR fortran/34662
4103 * interface.c (compare_actual_formal): Reject parameter
4104 actual to intent(out) dummy.
4105
3c721513
TB
41062008-01-04 Tobias Burnus <burnus@net-b.de>
4107
4108 PR fortran/34557
4109 * primary.c (match_varspec): Gobble whitespace before
4110 checking for '('.