Add 'PR fortran/30278' to my previous commit.
[gcc.git] / gcc / fortran / ChangeLog
1 2007-01-26 Steven Bosscher <stevenb.gcc@gmail.com>
2 Steven G. Kargl <kargl@gcc.gnu.org>
3
4 PR fortran/30278
5 * fortran/io.c (next_char): Deal with backslash escaped characters.
6 Issue warnings in non -std=gnu cases.
7 * fortran/primary.c (next_string_char): Issue warnings in non
8
9 2007-01-26 Tobias Burnus <burnus@net-b.de>
10
11 * lang-specs.h: Add support for .f03 and .F03 extensions.
12 * gfortran.texi: Document .f03 extension.
13 * options.c (form_from_filename): Recognize .f03.
14
15 2007-01-25 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
16
17 PR fortran/30437
18 * lang.opt (Wall): Remove RejectNegative.
19 * options.c (gfc_handle_option): Wall can be disabled.
20 (set_Wall): Add a parameter for disabling Wall.
21
22 2007-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
23
24 PR fortran/30532
25 * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
26
27 2007-01-23 Paul Thomas <pault@gcc.gnu.org>
28
29 PR fortran/30481
30 * match.c (gfc_match_namelist): Add check for assumed size character
31 in namelist and provide error if found.
32
33 2007-01-21 Brooks Moses <brooks.moses@codesourcery.com>
34
35 * intrinsic.texi (ACHAR): Added cross-references.
36 (CHAR): Put cross-references in alphabetical order.
37 (IACHAR): Added cross-references.
38 (ICHAR): Added cross-references.
39
40 2007-01-20 Brooks Moses <brooks.moses@codesourcery.com>
41
42 * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
43 (MAXVAL): Corrected description of result characteristics.
44 (MINVAL): Same.
45 (UMASK): Added documentation.
46
47 2007-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
48
49 * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
50 parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
51 in the massive whitespace patch.
52
53 2007-01-20 Roger Sayle <roger@eyesopen.com>
54
55 * module.c (mio_array_ref): The dimen_type fields of an array ref
56 are an enumerated type and can't be read/written directly with a
57 call to mio_integer. Instead loop over and cast each element.
58
59 2007-01-20 Roger Sayle <roger@eyesopen.com>
60
61 * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
62 i.e. that the ARRAY_REF doesn't mention components.
63 * trans-array.c (gfc_constant_array_constructor_p): Export external
64 function renamed from constant_array_constructor_p.
65 (gfc_build_constant_array_constructor): Export.
66 (gfc_trans_array_constructor): Update call to the renamed function
67 constant_array_constructor_p.
68 * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
69 (gfc_build_constant_array_constructor): Likewise.
70 * trans-expr.c (gfc_build_memcpy_call): New helper function split
71 out from gfc_trans_array_copy.
72 (gfc_trans_array_copy): Use gfc_build_memcpy_call.
73 (gfc_trans_array_constructor_copy): New function to optimize
74 assigning an entire array from a constant array constructor.
75 (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
76 when appropriate.
77
78 2007-01-20 Roger Sayle <roger@eyesopen.com>
79
80 * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
81 implementation for the SIGN intrinsic with integral operands.
82 (gfc_conv_intrinsic_minmax): Fix whitespace.
83
84 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
85
86 * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
87 * lang.opt: Add -fallow-leading-underscore.
88 * match.c (gfc_match_name): Allow leading underscore in symbol
89 name if -fallow-leading-underscore is used.
90 * symbol.c (gfc_get_default_type): Add special case for symbol
91 names beginning with an underscore.
92 * trans-decl.c (gfc_get_extern_function_decl,
93 gfc_build_intrinsic_function_decls): Add _gfortran prefix to
94 library symbols selected_int_kind, selected_real_kind and
95 all specifics.
96 * options.c (gfc_init_options, gfc_handle_option): Handle the
97 new -fallow-leading-underscore option.
98
99 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
100
101 PR fortran/30446
102 * options.c (gfc_handle_module_path_options): Path used in -J
103 option is now added to the module search path.
104
105 2007-01-20 Richard Guenther <rguenther@suse.de>
106
107 PR fortran/30223
108 * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
109 cexpi builtins if we have TARGET_C99_FUNCTIONS. Provide
110 sincos builtins if the target has sincos.
111
112 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
113
114 * intrinsic.texi (MATMUL): Corrected a typo.
115 (MAX): Separated @var arguments.
116 (MIN): Separated @var arguments.
117
118 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
119
120 * intrinsic.texi: general whitespace cleanup.
121 (menu): Added TIME8, removed UNMASK.
122 (AINT): Clarified argument requirement.
123 (ANINT): Clarified argument requirement.
124 (CEILING): Clarified argument requirement.
125 (CHAR): Clarified argument requirement.
126 (CMPLX): Clarified argument requirement.
127 (DCMPLX): Clarified argument requirement.
128 (FGET): Line rewrapping.
129 (FLOOR): Clarified argument requirement.
130 (GMTIME): Added documentation.
131 (IAND): Added cross-reference.
132 (IBCLR): Added cross-reference.
133 (IBSET): Added cross-reference.
134 (IEOR): Added cross-reference.
135 (INT): Collapsed examples, clarified argument requirement.
136 (IOR): Added cross-references.
137 (LEN_TRIM): Corrected result kind.
138 (LINK): Added cross-reference.
139 (LLT): Removed "documentation pending".
140 (LOGICAL): Added documentation.
141 (LSHIFT): Added documentation.
142 (LTIME): Added documentation.
143 (MATMUL): Added documentation.
144 (MAX): Added documentation.
145 (MAXLOC): Added documentation.
146 (MAXVAL): Added documentation.
147 (MERGE): Added documentation.
148 (MIN): Added documentation.
149 (MINLOC): Added documentation.
150 (MINVAL): Added documentation.
151 (MVBITS): Moved to correct place, added documentation.
152 (NOT): Added documentation.
153 (PERROR): Added documentation.
154 (RAN): Moved to correct place, added documentation.
155 (REAL): Clarified argument requirement.
156 (RENAME): Added documentation.
157 (RSHIFT): Clarified argument requirement.
158 (SIGN): Corrected table specification.
159 (SYMLNK): Added documentation.
160 (SYSTEM): Added documentation.
161 (TIME): Added documentation.
162 (TIME8): Added section and documentation.
163 (UNMASK): Removed erroneous section.
164
165 2007-01-18 H.J. Lu <hongjiu.lu@intel.com>
166
167 * trans-stmt.c (compute_overall_iter_number): Fix a typo.
168
169 2007-01-18 Roger Sayle <roger@eyesopen.com>
170
171 * trans-expr.c (copyable_array_p): Consider user derived types without
172 allocatable components to be copyable.
173
174 2007-01-18 Roger Sayle <roger@eyesopen.com>
175
176 * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
177 the number of interations in unconditional FORALL nests with constant
178 bounds.
179
180 2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
181 Tobias Burnus <burnus@net-b.de>
182
183 PR libfortran/29649
184 * gfortran.h (gfc_option_t): Add flag_dump_core.
185 * lang.opt: Add -fdump-core option.
186 * invoke.texi: Document the new options.
187 * trans-decl.c (gfc_build_builtin_function_decls): Add new
188 options to the call to set_std.
189 * options.c (gfc_init_options, gfc_handle_option): Set the
190 new options.
191
192 2007-01-17 Paul Thomas <pault@gcc.gnu.org>
193
194 PR fortran/30476
195 * module.c (load_generic_interfaces): Make the marking of the
196 symbol as ambiguous conditional on the module names being
197 different.
198 (write_generic): Ensure that the generic interface has a
199 non-NULL module field.
200
201 2007-01-16 Roger Sayle <roger@eyesopen.com>
202
203 PR fortran/30404
204 * trans-stmt.c (forall_info): Remove pmask field.
205 (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
206 NVAR covers all the interation variables in the current forall_info.
207 Add an extra OUTER parameter, which specified the loop header in
208 which to place mask index initializations.
209 (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
210 Change the semantics of MASK_FLAG to only control the mask in the
211 innermost loop.
212 (compute_overall_iter_number): Optimize the trivial case of a
213 top-level loop having a constant number of iterations. Update
214 call to gfc_trans_nested_forall_loop. Calculate the number of
215 times the inner loop will be executed, not to size of the
216 iteration space.
217 (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
218 sizeof(type) == 1. Tidy up.
219 (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
220 to gfc_trans_nested_forall_loop.
221 (gfc_trans_pointer_assign_need_temp): Likewise.
222 (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
223 LENVAR local variables. Split mask allocation into a separate
224 hunk/pass from mask population. Use allocate_temp_for_forall_nest
225 to allocate the FORALL mask with the correct size. Update calls
226 to gfc_trans_nested_forall_loop.
227 (gfc_evaluate_where_mask): Update call to
228 gfc_trans_nested_forall_loop.
229 (gfc_trans_where_2): Likewise.
230
231 2007-01-15 Paul Thomas <pault@gcc.gnu.org>
232
233 PR fortran/28172
234 * trans-stmt.c (gfc_trans_call): If it does not have one, get
235 a backend_decl for an alternate return.
236
237 PR fortran/29389
238 * resolve.c (pure_function): Statement functions are pure. Note
239 that this will have to recurse to comply fully with F95.
240
241 PR fortran/29712
242 * resolve.c (resolve_function): Only a reference to the final
243 dimension of an assumed size array is an error in an inquiry
244 function.
245
246 PR fortran/30283
247 * resolve.c (resolve_function): Make sure that the function
248 expression has a type.
249
250 2007-01-14 Paul Thomas <pault@gcc.gnu.org>
251
252 PR fortran/30410
253 * trans-decl.c (gfc_sym_mangled_function_id): Module, external
254 symbols must not have the module name prepended.
255
256 2007-01-11 Thomas Koenig <Thomas.Koenig@online.de>
257
258 PR libfortran/30415
259 * iresolve.c (gfc_resolve_maxloc): If the rank
260 of the return array is nonzero and we process an
261 integer array smaller than default kind, coerce
262 the array to default integer.
263 * iresolve.c (gfc_resolve_minloc): Likewise.
264
265 2007-01-11 Brooks Moses <brooks.moses@codesourcery.com>
266
267 * simplify.c: Update copyright to 2007.
268 * scanner.c: Same.
269
270 2007-01-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
271
272 PR fortran/30430
273 * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
274 only once!
275
276 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
277
278 * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
279 (gfc_simplify_ibset): Same.
280
281 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
282
283 PR 30381
284 PR 30420
285 * simplify.c (convert_mpz_to_unsigned): New function.
286 (convert_mpz_to_signed): New function, largely based on
287 twos_complement().
288 (twos_complement): Removed.
289 (gfc_simplify_ibclr): Add conversions to and from an
290 unsigned representation before bit-twiddling.
291 (gfc_simplify_ibset): Same.
292 (gfc_simplify_ishftc): Add checks for overly large
293 constant arguments, only check the third argument if
294 it's present, carry over high bits into the result as
295 appropriate, and perform the final conversion back to
296 a signed representation using the correct sign bit.
297 (gfc_simplify_not): Removed unnecessary masking.
298
299 2007-01-09 Paul Thomas <pault@gcc.gnu.org>
300
301 PR fortran/30408
302 * resolve.c (resolve_code): Use the code->expr character length
303 directly to set length of llen.
304
305 2007-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
306
307 PR fortran/30408
308 * lang.opt: Add Wcharacter_truncation option.
309 * options.c (gfc_init_options): Initialize
310 gfc_option.warn_character_truncation to zero.
311 (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
312
313 2007-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
314
315 * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
316 iresolve.c, match.c: Update Copyright years. Whitespace.
317
318 2007-01-08 Richard Guenther <rguenther@suse.de>
319
320 * trans-io.c (transfer_array_desc): Use build_int_cst instead
321 of build_int_cstu.
322
323 2007-01-08 Roger Sayle <roger@eyesopen.com>
324
325 * trans-array.c (constant_array_constructor_p): New function to
326 determine whether an array constructor consists only of constant
327 elements, and if so return it's size.
328 (gfc_build_constant_array_constructor): Construct a statically
329 initialized gfortran array for a given EXPR_ARRAY.
330 (gfc_trans_constant_array_constructor): Efficiently scalarize
331 a constant array constructor.
332 (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
333 Special case scalarization of constant array constructors, all of
334 whose elements are specified, using constant_array_constructor_p
335 and gfc_trans_constant_array_constructor.
336 (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
337 before adding it to index, to avoid creating a NON_LVALUE_EXPR.
338
339 2007-01-08 Kazu Hirata <kazu@codesourcery.com>
340
341 gfortran.texi: Fix typos.
342
343 2007-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
344
345 * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
346 convert.c: Update Copyright dates. Fix whitespace.
347
348 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
349
350 * data.c (gfc_assign_data_value): Fix whitespace.
351
352 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
353
354 * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
355 Commentary typo fix.
356
357 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
358
359 PR fortran/27698
360 * match.c (gfc_match_name): Print diagnostics for invalid
361 character in names.
362
363 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
364
365 * array.c: Fix whitespace in comment table.
366
367 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
368
369 * array.c, bbt.c, check.c: Update copyright years. Whitespace.
370
371 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
372
373 * arith.c: Update copyright years. Whitespace.
374
375 2007-01-05 Roger Sayle <roger@eyesopen.com>
376
377 * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
378 array assignments split out from gfc_trans_assignment.
379 (gfc_trans_array_copy): New function to implement array to array
380 copies via calls to __builtin_memcpy.
381 (copyable_array_p): New helper function to identify an array of
382 simple/POD types, that may be copied/assigned using memcpy.
383 (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
384 whole array assignments considered suitable by copyable_array_p.
385 Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
386
387 2007-01-05 Roger Sayle <roger@eyesopen.com>
388
389 * trans-array.c (gfc_trans_array_constructor_value): Make the
390 static const "data" array as TREE_READONLY.
391 * trans-stmt.c (gfc_trans_character_select): Likewise.
392
393 2007-01-05 Roger Sayle <roger@eyesopen.com>
394
395 * trans-array.c (gfc_conv_loop_setup): Test whether the loop
396 stride is one, to avoid fold_build2 introducing a useless
397 NON_LVALUE_EXPR node.
398
399 2007-01-05 Tobias Burnus <burnus@net-b.de>
400
401 * symbol.c (check_conflict): Fix error message.
402
403 2007-01-05 Paul Thomas <pault@gcc.gnu.org>
404
405 PR fortran/23232
406 * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
407 functions to signal that a DATA statement is being matched.
408 (gfc_match_data): Call gfc_set_in_match_data on entry and on
409 exit.
410 * gfortran.h : Add prototypes for above.
411 * expr.c (check_init_expr): Avoid check on parameter or
412 variable if gfc_in_match_data is true.
413 (gfc_match_init_expr): Do not call error on non-reduction of
414 expression if gfc_in_match_data is true.
415
416 PR fortran/27996
417 PR fortran/27998
418 * decl.c (gfc_set_constant_character_len): Add boolean arg to
419 flag array constructor resolution. Warn if string is being
420 truncated. Standard dependent error if string is padded. Set
421 new arg to false for all three calls to
422 gfc_set_constant_character_len.
423 * match.h : Add boolean arg to prototype for
424 gfc_set_constant_character_len.
425 * gfortran.h : Add warn_character_truncation to gfc_options.
426 * options.c (set_Wall): Set warn_character_truncation if -Wall
427 is set.
428 * resolve.c (resolve_code): Warn if rhs string in character
429 assignment has to be truncated.
430 * array.c (gfc_resolve_character_array_constructor): Set new
431 argument to true for call to gfc_set_constant_character_len.
432
433 2007-01-05 Tobias Burnus <burnus@net-b.de>
434
435 PR fortran/29624
436 * interface.c (compare_parameter_intent): New function.
437 (check_intents): Support pointer intents.
438 * symbol.c (check_conflict): Support pointer intents,
439 better conflict_std message.
440 * expr.c (gfc_check_assign,gfc_check_pointer_assign):
441 Support pointer intents.
442 * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
443 Support pointer intents.
444
445 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
446
447 PR 30371
448 * check.c (gfc_check_kill_sub): Add checks for non-scalar
449 arguments.
450
451 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
452
453 * intrinsic.texi: Minor cleanup, reflowing overlong
454 paragraphs, and correcting whitespace.
455
456 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
457
458 * intrinsic.texi (LBOUND): Add documentation.
459 (LGE): Add documentation.
460 (LGT): Add documentation.
461 (LINK): Add documentation.
462 (LLE): Add documentation.
463 (LLT): Add documentation.
464 (LNBLNK): Add documentation.
465 (UBOUND): Add documentation.
466 (UNLINK): Add documentation.
467
468 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
469
470 * intrinsic.texi (IAND): Clarify argument specifications.
471 (IBCLR): Add documentation.
472 (IBITS): Add documentation.
473 (IBSET): Add documentation.
474 (IEOR): Add documentation.
475 (IERRNO): Add documentation.
476 (INDEX): Add documentation.
477 (IOR): Add documentation.
478 (ISHFT): Add documentation.
479 (ISHFTC): Add documentation.
480 (KILL): Add documentation.
481 (LEN_TRIM): Add documentation.
482
483 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
484
485 PR 30235
486 * interface.c (compare_actual_formal): check for
487 alternate returns when iterating over non-present
488 arguments.
489
490 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
491
492 * invoke.texi: Update manpage copyright to include 2007.
493
494 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
495
496 * gfortran.texi: Update copyright to include 2007.
497 * intrinsic.texi: Update copyright to include 2007.
498 * invoke.texi: Update copyright to include 2007.
499
500 2007-01-02 Tobias Burnus <burnus@net-b.de>
501 Jakub Jelinek <jakub@redhat.com>
502
503 PR fortran/30276
504 * scanner.c (open_included_file): Revert patch.
505 (gfc_open_included_file): Support absolute pathnames.
506 (gfc_open_intrinsic_module): Support absolute pathnames.
507
508 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
509
510 * gfortran.texi (GNU Fortran and GCC): Rewrite
511
512 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
513
514 * gfortran.texi (Introduction): Lower "Part I:
515 Introduction" to a chapter, renumber Parts II and III to
516 Parts I and II.
517 * intrinsic.texi (Introduction): Rename to "Introduction
518 to Intrinsics" to avoid conflict with the new chapter.
519
520 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
521
522 * intrinsic.texi (Introduction): Rewrite first paragraph.
523
524 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
525
526 * invoke.texi (OpenMP): Added index entry.
527 * gfortran.texi (title page): Removed erroneous '*'.
528
529 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
530
531 * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
532 to description.
533 (Extensions): Miscellaneous minor rewriting and copyediting.
534 (BOZ-literal constants): Renamed from Hexadecimal constants.
535 (Hollerith constants support): Added explanation and
536 suggestions for standard-conforming modern equivalents.
537
538 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
539
540 * intrinsic.texi: Improvements to index entries; change
541 @findex entries to @cindex entries.
542 * invoke.texi: Standardize and improve index entries.
543 * gfortran.texi: Fix @code in one index entry.
544
545 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
546
547 * invoke.texi: Change @code-type macros to appropriate
548 variants (@command, @option, etc.)
549 * gfortran.texi: Same.
550
551 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
552
553 * intrinsic.texi: Various minor cleanups.
554
555 2007-01-02 Steven G. Kargl <kargls@comcast.net>
556
557 * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
558 build_int_cst.
559
560 2007-01-02 Tobias Burnus <burnus@net-b.de>
561
562 PR fortran/30276
563 * scanner.c (open_included_file): Support full-path filenames.
564
565 2007-01-02 Paul Thomas <pault@gcc.gnu.org>
566
567 PR fortran/20896
568 * interface.c (check_sym_interfaces): Remove call to
569 resolve_global_procedure.
570 gfortran.h : Remove prototype for resolve_global_procedure.
571 resolve.c (resolve_global_procedure): Add static attribute
572 to function declaration.
573
574 2007-01-01 Steven G. Kargl <kargls@comcast.net>
575
576 * ChangeLog: Copy to ...
577 * ChangeLog-2006: here.