OSDN Git Service

2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
2             Brooks Moses  <brooks.moses@codesourcery.com>
3             Lee Millward  <lee.millward@codesourcery.com>
4
5         * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
6         (gfc_conv_string_tmp): Likewise.
7         (gfc_conv_concat_op): Likewise.
8         (gfc_build_compare_string): Likewise.
9         (gfc_conv_function_call): Use build_call_list instead of build3.
10
11         * trans-array.c (gfc_trans_allocate_array_storage): Use
12         build_call_expr.
13         (gfc_grow_array): Likewise.
14         (gfc_trans_array_ctor_element): Likewise.
15         (gfc_trans_array_constructor_value): Likewise.
16         (gfc_array_allocate): Likewise.
17         (gfc_array_deallocate): Likewise.
18         (gfc_trans_auto_array_allocation): Likewise.
19         (gfc_trans_dummy_array_bias): Likewise.
20         (gfc_conv_array_parameter): Likewise.
21         (gfc_trans_dealloc_allocated): Likewise.
22         (gfc_duplicate_allocatable): Likewise.
23
24         * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
25         (gfc_trans_omp_flush): Likewise.
26
27         * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
28         (gfc_trans_pause): Likewise.
29         (gfc_trans_stop): Likewise.
30         (gfc_trans_character_select): Likewise.
31         (gfc_do_allocate): Likewise.
32         (gfc_trans_assign_need_temp): Likewise.
33         (gfc_trans_pointer_assign_need_temp): Likewise.
34         (gfc_trans_forall_1): Likewise.
35         (gfc_trans_where_2): Likewise.
36         (gfc_trans_allocate): Likewise.
37         (gfc_trans_deallocate): Likewise.
38
39         * trans.c (gfc_trans_runtime_check): Use build_call_expr.
40
41         * trans-io.c (gfc_trans_open): Use build_call_expr.
42         (gfc_trans_close): Likewise.
43         (build_filepos): Likewise.
44         (gfc_trans_inquire): Likewise.
45         (NML_FIRST_ARG): Delete.
46         (NML_ADD_ARG): Delete.
47         (transfer_namelist_element): Use build_call_expr.
48         (build_dt): Likewise.
49         (gfc_trans_dt_end): Likewise.
50         (transfer_expr): Likewise.
51         (transfer_array-desc): Likewise.
52
53         * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
54         (gfc_generate_constructors): Likewise.
55
56         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
57         (gfc_conv_intrinsic_fdate): Likewise.
58         (gfc_conv_intrinsic_ttynam): Likewise.
59         (gfc_conv_intrinsic_array_transfer): Likewise.
60         (gfc_conv_associated): Likewise.
61         (gfc_conv_intrinsic_si_kind): Likewise.
62         (gfc_conv_intrinsic_trim): Likewise.
63         (gfc_conv_intrinsic_repeat: Likewise.
64         (gfc_conv_intrinsic_iargc): Likewise.
65
66 2007-02-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
67
68         PR fortran/30779
69         * scanner.c (gfc_next_char_literal): Add check for end of file after
70         call to advance_line.
71
72 2007-02-14  Steven G. Kargl  <kargl@gcc.gnu.org>
73
74         PR fortran/30799
75         * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
76         kind.
77
78 2007-02-14  Steven G. Kargl  <kargl@gcc.gnu.org>
79
80         * misc.c (gfc_typename): Fix potential buffer overflow.
81
82 2007-02-13  Paul Thomas  <pault@gcc.gnu.org>
83
84         PR fortran/30554
85         * module.c (read_module): Set pointer_info to referenced if the
86         symbol has no namespace.
87
88 2007-02-12  Nick Clifton  <nickc@redhat.com>
89
90         * lang.opt:  Add Warning attribute to warning options.
91
92 2007-02-11  Daniel Franke  <franke.daniel@gmail.com>
93
94         * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
95         (SLEEP): Added section and documentation.
96
97 2007-02-11  Tobias Schlüter  <tobi@gcc.gnu.org>
98
99         PR fortran/30478
100         * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
101         (variable_decl): Likewise.  Rewrap comment.
102         (match_attr_spec): Remove ENUM specific code.
103         (gfc_match_enum): Fix typo in error message.
104         (enumerator_decl): New function.
105         (gfc_match_enumerator_def): Use enumerator_decl instead of
106         variable_decl.  Adapt code accordingly.
107
108 2007-02-11  Paul Thomas  <pault@gcc.gnu.org>
109
110         PR fortran/30554
111         * module.c (find_symtree_for_symbol): New function to return
112         a symtree that is not a "unique symtree" given a symbol.
113         (read_module): Do not automatically set pointer_info to
114         referenced because this inhibits the generation of a unique
115         symtree.  Recycle the existing symtree if possible by calling
116         find_symtree_for_symbol.
117
118         PR fortran/30319
119         * decl.c (add_init_expr_to_sym): Make new charlen for an array
120         constructor initializer.
121
122 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
123
124         * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
125         and __emutls_register_common.
126         * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
127         * trans-common.c (build_common_decl): Don't check have_tls.
128         * trans-decl.c (gfc_finish_var_decl): Likewise.
129         * types.def (BT_WORD, BT_FN_PTR_PTR): New.
130         (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
131
132 2007-02-09  Tobias Burnus  <burnus@net-b.de>
133
134         PR fortran/30512
135         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
136           gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
137
138 2007-02-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
139
140         PR fortran/30720
141         * trans-array.c (gfc_trans_create_temp_array): Remove use of the
142         function argument. Always generate code for negative extent.
143         Simplify said code.
144         * trans-array.h (gfc_trans_create_temp_array): Change prototype.
145         * trans-expr.c (gfc_conv_function_call): Remove use of last argument
146         of gfc_trans_create_temp_array.
147         * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
148         * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
149
150 2007-02-08  Roger Sayle  <roger@eyesopen.com>
151
152         * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
153         mask expression is a compile-time constant (".true." or ".false.").
154
155 2007-02-04  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
156
157         PR fortran/30611
158         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
159         arguments only once. Generate check that NCOPIES argument is not
160         negative.
161
162 2007-02-04  Steven G. Kargl <kargl@gcc.gnu.org>
163
164         PR fortran/30605
165         * fortran/invoke.texi: Update documentation.
166         * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
167         and -pedantic.
168
169 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
170
171         * trans-array.c: Fix a comment typo.
172
173 2007-02-03  Paul Thomas  <pault@gcc.gnu.org>
174
175         PR fortran/30514
176         * array.c (match_array_element_spec): If the length of an array is
177         negative, adjust the upper limit to make it zero length.
178
179         PR fortran/30660
180         * resolve.c (pure_function, resolve_function): Initialize name to
181         null to clear up build warnings.
182         (resolve_fl_variable): Look at components explicitly to check for
183         default initializer, rather than using gfc_default_initializer.
184
185 2007-02-02  Steven G. Kargl <kargl@gcc.gnu.org>
186
187         PR fortran/30683
188         * resolve.c (resolve_generic_f): Check for non-NULL sym.
189
190 2007-02-02  Roger Sayle  <roger@eyesopen.com>
191
192         * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
193         NON_LVALUE_EXPR nodes and useless type conversions.
194
195 2007-02-02  Paul Thomas  <pault@gcc.gnu.org>
196
197         PR fortran/30284
198         PR fortran/30626
199         * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
200         from function and make sure that substring lengths are
201         translated.
202         (is_aliased_array): Remove static attribute.
203         * trans.c : Add prototypes for gfc_conv_aliased_arg and
204         is_aliased_array.
205         * trans-io.c (set_internal_unit): Add the post block to the
206         arguments of the function.  Use is_aliased_array to check if
207         temporary is needed; if so call gfc_conv_aliased_arg.
208         (build_dt): Pass the post block to set_internal_unit and
209         add to the block after all io activiy is done.
210
211 2007-02-01  Roger Sayle  <roger@eyesopen.com>
212
213         * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
214         a temporary array to pass a constant non-character array constructor.
215         Generalize the descriptor generation code to handle scalarizer
216         "info" without an array reference.
217
218 2007-02-01  Roger Sayle  <roger@eyesopen.com>
219
220         * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
221         dependency checking for array constructors.
222
223 2007-02-01  Roger Sayle  <roger@eyesopen.com>
224
225         * trans-stmt.c (compute_overall_iter_number): Document function
226         arguments.  Generalize "unconditional forall nest with constant
227         bounds" optimization to eliminate unconditional inner loops with
228         constant bounds.
229
230 2007-01-31  Tobias Burnus  <burnus@net-b.de>
231
232         PR fortran/30520
233         * interface.c (compare_actual_formal): Check conformance between
234           actual and VOLATILE dummy arguments.
235         * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
236           multiple times in different scopes.
237         * decl.c (gfc_match_volatile): Search symbol in host association.
238
239 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
240
241         * simplify.c, trans-array.c: Fix comment typos.
242
243 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
244
245         * invoke.texi (Code Gen Options): Fix abbreviation typo.
246         * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
247
248 2007-01-30  Steve Ellcey  <sje@cup.hp.com>
249
250         PR fortran/30432
251         * trans-types.c (gfc_get_function_type):  Do not add void_type_node
252         to empty arg list.
253         * trans-decl.c (create_function_arglist): Change assert.
254
255 2007-01-29  Paul Thomas  <pault@gcc.gnu.org>
256
257         PR fortran/30554
258         * module.c (read_module): If a symbol is excluded by an ONLY
259         clause, check to see if there is a symtree already loaded. If
260         so, attach the symtree to the pointer_info.
261
262 2007-01-28  Thomas Koenig  <Thomas.Koenig@online.de>
263
264         PR libfortran/30389
265         * gfortran.h:  Remove gfc_simplify_init_1.
266         * arith.h:  Remove third argument from gfc_compare_string.
267         * arith.c(gfc_compare_expression):  Remove third argument
268         from call to gfc_compare_string.
269         (gfc_compare_string):  Remove third argument xcoll_table.
270         Remove use of xcoll_table.
271         * misc.c(gfc_init_1):  Remove call to gfc_simplify_init_1.
272         * simplify.c(ascii_table):  Remove.
273         (xascii_table): Likewise.
274         (gfc_simplify_achar):  ICE if extract_int fails.  Remove use of
275         ascii_table.  Warn if -Wsurprising and value < 0 or > 127.
276         (gfc_simplify_char):  ICE if extract_int fails. Error if
277         value < 0 or value > 255.
278         (gfc_simplify_iachar):  Remove use of xascii_table.
279         Char values outside of 0..255 are an ICE.
280         (gfc_simplify_lge):  Remove use of xascii_table.
281         (gfc_simplify_lgt):  Likewise.
282         (gfc_simplify_lle):  Likewise.
283         (gfc_simplify_llt):  Likewise.
284         (invert_table):  Remove.
285         (gfc_simplify_init_1):  Remove.
286
287 2007-01-27  Roger Sayle  <roger@eyesopen.com>
288
289         * trans-stmt.c (forall_info): Replace the next_nest and outer
290         fields that previously implemented a doubly-linked list with a
291         single prev_nest field (singly-linked list).
292         (gfc_trans_nested_forall_loop): The nested_forall_info argument
293         now denotes the innermost FORALL in the loop nest.
294         (compute_overall_iter_number): Use prev_nest instead of next_nest.
295         (gfc_trans_forall_1): Link/cons the new "info" to the head of the
296         nested_forall_info linked list.  Free the current "info" when done.
297
298 2007-01-27  Paul Thomas  <pault@gcc.gnu.org>
299
300         PR fortran/30407
301         * trans-expr.c (gfc_conv_operator_assign): New function.
302         * trans.h : Add prototype for gfc_conv_operator_assign.
303         * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
304         a potential operator assignment subroutine.  If it is non-NULL
305         call gfc_conv_operator_assign instead of the first assignment.
306         ( gfc_trans_where_2): In the case of an operator assignment,
307         extract the argument expressions from the code for the
308         subroutine call and pass the symbol to gfc_trans_where_assign.
309         resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
310         gfc_resolve_forall_body): Resolve the subroutine call for
311         operator assignments.
312
313 2007-01-26  Steven Bosscher  <stevenb.gcc@gmail.com>
314             Steven G. Kargl <kargl@gcc.gnu.org>
315
316         PR fortran/30278
317         * fortran/io.c (next_char): Deal with backslash escaped characters.
318         Issue warnings in non -std=gnu cases.
319         * fortran/primary.c (next_string_char): Issue warnings in non
320
321 2007-01-26  Tobias Burnus  <burnus@net-b.de>
322
323         * lang-specs.h: Add support for .f03 and .F03 extensions.
324         * gfortran.texi: Document .f03 extension.
325         * options.c (form_from_filename): Recognize .f03.
326
327 2007-01-25  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
328
329         PR fortran/30437
330         * lang.opt (Wall): Remove RejectNegative.
331         * options.c (gfc_handle_option): Wall can be disabled.
332         (set_Wall): Add a parameter for disabling Wall.
333         
334 2007-01-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
335
336         PR fortran/30532
337         * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
338         
339 2007-01-23  Paul Thomas  <pault@gcc.gnu.org>
340
341         PR fortran/30481
342         * match.c (gfc_match_namelist): Add check for assumed size character
343         in namelist and provide error if found.
344
345 2007-01-21  Brooks Moses  <brooks.moses@codesourcery.com>
346
347         * intrinsic.texi (ACHAR): Added cross-references.
348         (CHAR): Put cross-references in alphabetical order.
349         (IACHAR): Added cross-references.
350         (ICHAR): Added cross-references.
351
352 2007-01-20  Brooks Moses  <brooks.moses@codesourcery.com>
353
354         * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
355         (MAXVAL): Corrected description of result characteristics.
356         (MINVAL): Same.
357         (UMASK): Added documentation.
358
359 2007-01-20  Steven G. Kargl  <kargl@gcc.gnu.org>
360
361         * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
362         parse.c, primary.c, options.c, misc.c, simplify.c:  Next installment
363         in the massive whitespace patch.
364
365 2007-01-20  Roger Sayle  <roger@eyesopen.com>
366
367         * module.c (mio_array_ref): The dimen_type fields of an array ref
368         are an enumerated type and can't be read/written directly with a
369         call to mio_integer.  Instead loop over and cast each element.
370
371 2007-01-20  Roger Sayle  <roger@eyesopen.com>
372
373         * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
374         i.e. that the ARRAY_REF doesn't mention components.
375         * trans-array.c (gfc_constant_array_constructor_p): Export external
376         function renamed from constant_array_constructor_p.
377         (gfc_build_constant_array_constructor): Export.
378         (gfc_trans_array_constructor): Update call to the renamed function
379         constant_array_constructor_p.
380         * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
381         (gfc_build_constant_array_constructor): Likewise.
382         * trans-expr.c (gfc_build_memcpy_call): New helper function split
383         out from gfc_trans_array_copy.
384         (gfc_trans_array_copy): Use gfc_build_memcpy_call.
385         (gfc_trans_array_constructor_copy): New function to optimize
386         assigning an entire array from a constant array constructor.
387         (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
388         when appropriate.
389
390 2007-01-20  Roger Sayle  <roger@eyesopen.com>
391
392         * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
393         implementation for the SIGN intrinsic with integral operands.
394         (gfc_conv_intrinsic_minmax): Fix whitespace.
395
396 2007-01-20  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
397
398         * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
399         * lang.opt: Add -fallow-leading-underscore.
400         * match.c (gfc_match_name): Allow leading underscore in symbol
401         name if -fallow-leading-underscore is used.
402         * symbol.c (gfc_get_default_type): Add special case for symbol
403         names beginning with an underscore.
404         * trans-decl.c (gfc_get_extern_function_decl,
405         gfc_build_intrinsic_function_decls): Add _gfortran prefix to
406         library symbols selected_int_kind, selected_real_kind and 
407         all specifics.
408         * options.c (gfc_init_options, gfc_handle_option): Handle the
409         new -fallow-leading-underscore option.
410
411 2007-01-20  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
412
413         PR fortran/30446
414         * options.c (gfc_handle_module_path_options): Path used in -J
415         option is now added to the module search path.
416
417 2007-01-20  Richard Guenther  <rguenther@suse.de>
418
419         PR fortran/30223
420         * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
421         cexpi builtins if we have TARGET_C99_FUNCTIONS.  Provide
422         sincos builtins if the target has sincos.
423
424 2007-01-19  Brooks Moses  <brooks.moses@codesourcery.com>
425
426         * intrinsic.texi (MATMUL): Corrected a typo.
427         (MAX): Separated @var arguments.
428         (MIN): Separated @var arguments.
429
430 2007-01-19  Brooks Moses  <brooks.moses@codesourcery.com>
431
432         * intrinsic.texi: general whitespace cleanup.
433         (menu): Added TIME8, removed UNMASK.
434         (AINT): Clarified argument requirement.
435         (ANINT): Clarified argument requirement.
436         (CEILING): Clarified argument requirement.
437         (CHAR): Clarified argument requirement.
438         (CMPLX): Clarified argument requirement.
439         (DCMPLX): Clarified argument requirement.
440         (FGET): Line rewrapping.
441         (FLOOR): Clarified argument requirement.
442         (GMTIME): Added documentation.
443         (IAND): Added cross-reference.
444         (IBCLR): Added cross-reference.
445         (IBSET): Added cross-reference.
446         (IEOR): Added cross-reference.
447         (INT): Collapsed examples, clarified argument requirement.
448         (IOR): Added cross-references.
449         (LEN_TRIM): Corrected result kind.
450         (LINK): Added cross-reference.
451         (LLT): Removed "documentation pending".
452         (LOGICAL): Added documentation.
453         (LSHIFT): Added documentation.
454         (LTIME): Added documentation.
455         (MATMUL): Added documentation.
456         (MAX): Added documentation.
457         (MAXLOC): Added documentation.
458         (MAXVAL): Added documentation.
459         (MERGE): Added documentation.
460         (MIN): Added documentation.
461         (MINLOC): Added documentation.
462         (MINVAL): Added documentation.
463         (MVBITS): Moved to correct place, added documentation.
464         (NOT): Added documentation.
465         (PERROR): Added documentation.
466         (RAN): Moved to correct place, added documentation.
467         (REAL): Clarified argument requirement.
468         (RENAME): Added documentation.
469         (RSHIFT): Clarified argument requirement.
470         (SIGN): Corrected table specification.
471         (SYMLNK): Added documentation.
472         (SYSTEM): Added documentation.
473         (TIME): Added documentation.
474         (TIME8): Added section and documentation.
475         (UNMASK): Removed erroneous section.
476
477 2007-01-18  H.J. Lu  <hongjiu.lu@intel.com>
478
479         * trans-stmt.c (compute_overall_iter_number): Fix a typo.
480
481 2007-01-18  Roger Sayle  <roger@eyesopen.com>
482
483         * trans-expr.c (copyable_array_p): Consider user derived types without
484         allocatable components to be copyable.
485
486 2007-01-18  Roger Sayle  <roger@eyesopen.com>
487
488         * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
489         the number of interations in unconditional FORALL nests with constant
490         bounds.
491
492 2007-01-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
493             Tobias Burnus  <burnus@net-b.de>
494
495         PR libfortran/29649
496         * gfortran.h (gfc_option_t): Add flag_dump_core.
497         * lang.opt: Add -fdump-core option.
498         * invoke.texi: Document the new options.
499         * trans-decl.c (gfc_build_builtin_function_decls): Add new
500           options to the call to set_std.
501         * options.c (gfc_init_options, gfc_handle_option): Set the
502           new options.
503
504 2007-01-17  Paul Thomas  <pault@gcc.gnu.org>
505
506         PR fortran/30476
507         * module.c (load_generic_interfaces): Make the marking of the
508         symbol as ambiguous conditional on the module names being
509         different.
510         (write_generic): Ensure that the generic interface has a
511         non-NULL module field.
512
513 2007-01-16  Roger Sayle  <roger@eyesopen.com>
514
515         PR fortran/30404
516         * trans-stmt.c (forall_info): Remove pmask field.
517         (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
518         NVAR covers all the interation variables in the current forall_info.
519         Add an extra OUTER parameter, which specified the loop header in
520         which to place mask index initializations.
521         (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
522         Change the semantics of MASK_FLAG to only control the mask in the
523         innermost loop.
524         (compute_overall_iter_number): Optimize the trivial case of a
525         top-level loop having a constant number of iterations.  Update
526         call to gfc_trans_nested_forall_loop.  Calculate the number of
527         times the inner loop will be executed, not to size of the 
528         iteration space.
529         (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
530         sizeof(type) == 1.  Tidy up.
531         (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
532         to gfc_trans_nested_forall_loop.
533         (gfc_trans_pointer_assign_need_temp): Likewise.
534         (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
535         LENVAR local variables.  Split mask allocation into a separate
536         hunk/pass from mask population.  Use allocate_temp_for_forall_nest
537         to allocate the FORALL mask with the correct size.  Update calls
538         to gfc_trans_nested_forall_loop.
539         (gfc_evaluate_where_mask): Update call to
540         gfc_trans_nested_forall_loop.
541         (gfc_trans_where_2): Likewise.
542
543 2007-01-15  Paul Thomas  <pault@gcc.gnu.org>
544
545         PR fortran/28172
546         * trans-stmt.c (gfc_trans_call): If it does not have one, get
547         a backend_decl for an alternate return.
548
549         PR fortran/29389
550         * resolve.c (pure_function): Statement functions are pure. Note
551         that this will have to recurse to comply fully with F95.
552
553         PR fortran/29712
554         * resolve.c (resolve_function): Only a reference to the final
555         dimension of an assumed size array is an error in an inquiry
556         function.
557
558         PR fortran/30283
559         * resolve.c (resolve_function): Make sure that the function
560         expression has a type.
561
562 2007-01-14  Paul Thomas  <pault@gcc.gnu.org>
563
564         PR fortran/30410
565         * trans-decl.c (gfc_sym_mangled_function_id): Module, external
566         symbols must not have the module name prepended.
567
568 2007-01-11  Thomas Koenig  <Thomas.Koenig@online.de>
569
570         PR libfortran/30415
571         * iresolve.c (gfc_resolve_maxloc):  If the rank
572         of the return array is nonzero and we process an
573         integer array smaller than default kind, coerce
574         the array to default integer.
575         * iresolve.c (gfc_resolve_minloc):  Likewise.
576
577 2007-01-11  Brooks Moses  <brooks.moses@codesourcery.com>
578
579         * simplify.c: Update copyright to 2007.
580         * scanner.c: Same.
581
582 2007-01-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
583
584         PR fortran/30430
585         * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
586         only once!
587
588 2007-01-09  Brooks Moses  <brooks.moses@codesourcery.com>
589
590         * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
591         (gfc_simplify_ibset): Same.
592
593 2007-01-09  Brooks Moses  <brooks.moses@codesourcery.com>
594
595         PR 30381
596         PR 30420
597         * simplify.c (convert_mpz_to_unsigned): New function.
598         (convert_mpz_to_signed): New function, largely based on
599         twos_complement().
600         (twos_complement): Removed.
601         (gfc_simplify_ibclr): Add conversions to and from an
602         unsigned representation before bit-twiddling.
603         (gfc_simplify_ibset): Same.
604         (gfc_simplify_ishftc): Add checks for overly large
605         constant arguments, only check the third argument if
606         it's present, carry over high bits into the result as
607         appropriate, and perform the final conversion back to
608         a signed representation using the correct sign bit.
609         (gfc_simplify_not): Removed unnecessary masking.
610
611 2007-01-09  Paul Thomas  <pault@gcc.gnu.org>
612
613         PR fortran/30408
614         * resolve.c (resolve_code): Use the code->expr character length
615         directly to set length of llen.
616
617 2007-01-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
618
619         PR fortran/30408
620         * lang.opt: Add Wcharacter_truncation option.
621         * options.c (gfc_init_options): Initialize
622         gfc_option.warn_character_truncation to zero.
623         (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
624
625 2007-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
626
627         * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
628         iresolve.c, match.c:  Update Copyright years.  Whitespace.
629
630 2007-01-08  Richard Guenther  <rguenther@suse.de>
631
632         * trans-io.c (transfer_array_desc): Use build_int_cst instead
633         of build_int_cstu.
634
635 2007-01-08  Roger Sayle  <roger@eyesopen.com>
636
637         * trans-array.c (constant_array_constructor_p): New function to
638         determine whether an array constructor consists only of constant
639         elements, and if so return it's size.
640         (gfc_build_constant_array_constructor): Construct a statically
641         initialized gfortran array for a given EXPR_ARRAY.
642         (gfc_trans_constant_array_constructor): Efficiently scalarize
643         a constant array constructor.
644         (gfc_trans_array_constructor):  Tidy up use of CONST_STRING.
645         Special case scalarization of constant array constructors, all of
646         whose elements are specified, using constant_array_constructor_p 
647         and gfc_trans_constant_array_constructor.
648         (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
649         before adding it to index, to avoid creating a NON_LVALUE_EXPR.
650
651 2007-01-08  Kazu Hirata  <kazu@codesourcery.com>
652
653         gfortran.texi: Fix typos.
654
655 2007-01-07  Steven G. Kargl  <kargl@gcc.gnu.org>
656
657         * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
658         convert.c:  Update Copyright dates.  Fix whitespace.
659
660 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
661
662         * data.c (gfc_assign_data_value): Fix whitespace.
663
664 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
665
666         * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
667         Commentary typo fix.
668
669 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
670
671         PR fortran/27698
672         * match.c (gfc_match_name): Print diagnostics for invalid
673         character in names.
674
675 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
676
677         * array.c: Fix whitespace in comment table.
678
679 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
680
681         * array.c, bbt.c, check.c:  Update copyright years.  Whitespace.
682
683 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
684
685         * arith.c: Update copyright years.  Whitespace.
686
687 2007-01-05  Roger Sayle  <roger@eyesopen.com>
688
689         * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
690         array assignments split out from gfc_trans_assignment.
691         (gfc_trans_array_copy): New function to implement array to array
692         copies via calls to __builtin_memcpy.
693         (copyable_array_p): New helper function to identify an array of
694         simple/POD types, that may be copied/assigned using memcpy.
695         (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
696         whole array assignments considered suitable by copyable_array_p.
697         Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
698
699 2007-01-05  Roger Sayle  <roger@eyesopen.com>
700
701         * trans-array.c (gfc_trans_array_constructor_value): Make the
702         static const "data" array as TREE_READONLY.
703         * trans-stmt.c (gfc_trans_character_select): Likewise.
704
705 2007-01-05  Roger Sayle  <roger@eyesopen.com>
706
707         * trans-array.c (gfc_conv_loop_setup):  Test whether the loop
708         stride is one, to avoid fold_build2 introducing a useless
709         NON_LVALUE_EXPR node.
710
711 2007-01-05  Tobias Burnus  <burnus@net-b.de>
712
713         * symbol.c (check_conflict): Fix error message.
714
715 2007-01-05  Paul Thomas  <pault@gcc.gnu.org>
716
717         PR fortran/23232
718         * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
719         functions to signal that a DATA statement is being matched.
720         (gfc_match_data): Call gfc_set_in_match_data on entry and on
721         exit.
722         * gfortran.h : Add prototypes for above.
723         * expr.c (check_init_expr): Avoid check on parameter or
724         variable if gfc_in_match_data is true.
725         (gfc_match_init_expr): Do not call error on non-reduction of
726         expression if gfc_in_match_data is true.
727
728         PR fortran/27996
729         PR fortran/27998
730         * decl.c (gfc_set_constant_character_len): Add boolean arg to
731         flag array constructor resolution.  Warn if string is being
732         truncated.  Standard dependent error if string is padded. Set
733         new arg to false for all three calls to
734         gfc_set_constant_character_len.
735         * match.h : Add boolean arg to prototype for
736         gfc_set_constant_character_len.
737         * gfortran.h : Add warn_character_truncation to gfc_options.
738         * options.c (set_Wall): Set warn_character_truncation if -Wall
739         is set.
740         * resolve.c (resolve_code): Warn if rhs string in character
741         assignment has to be truncated.
742         * array.c (gfc_resolve_character_array_constructor): Set new
743         argument to true for call to gfc_set_constant_character_len.
744
745 2007-01-05  Tobias Burnus  <burnus@net-b.de>
746
747         PR fortran/29624
748         * interface.c (compare_parameter_intent): New function.
749           (check_intents): Support pointer intents.
750         * symbol.c (check_conflict): Support pointer intents,
751           better conflict_std message.
752         * expr.c (gfc_check_assign,gfc_check_pointer_assign):
753           Support pointer intents.
754         * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
755           Support pointer intents.
756
757 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
758
759         PR 30371
760         * check.c (gfc_check_kill_sub): Add checks for non-scalar
761         arguments.
762
763 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
764
765         * intrinsic.texi: Minor cleanup, reflowing overlong
766         paragraphs, and correcting whitespace.
767
768 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
769
770         * intrinsic.texi (LBOUND): Add documentation.
771         (LGE): Add documentation.
772         (LGT): Add documentation.
773         (LINK): Add documentation.
774         (LLE): Add documentation.
775         (LLT): Add documentation.
776         (LNBLNK): Add documentation.
777         (UBOUND): Add documentation.
778         (UNLINK): Add documentation.
779
780 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
781
782         * intrinsic.texi (IAND): Clarify argument specifications.
783         (IBCLR): Add documentation.
784         (IBITS): Add documentation.
785         (IBSET): Add documentation.
786         (IEOR): Add documentation.
787         (IERRNO): Add documentation.
788         (INDEX): Add documentation.
789         (IOR): Add documentation.
790         (ISHFT): Add documentation.
791         (ISHFTC): Add documentation.
792         (KILL): Add documentation.
793         (LEN_TRIM): Add documentation.
794
795 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
796
797         PR 30235
798         * interface.c (compare_actual_formal): check for
799         alternate returns when iterating over non-present
800         arguments.
801
802 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
803
804         * invoke.texi: Update manpage copyright to include 2007.
805
806 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
807
808         * gfortran.texi: Update copyright to include 2007.
809         * intrinsic.texi: Update copyright to include 2007.
810         * invoke.texi: Update copyright to include 2007.
811
812 2007-01-02  Tobias Burnus  <burnus@net-b.de>
813             Jakub Jelinek  <jakub@redhat.com>
814
815         PR fortran/30276
816         * scanner.c (open_included_file): Revert patch.
817           (gfc_open_included_file): Support absolute pathnames.
818           (gfc_open_intrinsic_module): Support absolute pathnames.
819
820 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
821
822         * gfortran.texi (GNU Fortran and GCC): Rewrite
823
824 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
825
826         * gfortran.texi (Introduction): Lower "Part I:
827         Introduction" to a chapter, renumber Parts II and III to
828         Parts I and II.
829         * intrinsic.texi (Introduction): Rename to "Introduction
830         to Intrinsics" to avoid conflict with the new chapter.
831
832 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
833
834         * intrinsic.texi (Introduction): Rewrite first paragraph.
835
836 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
837
838         * invoke.texi (OpenMP): Added index entry.
839         * gfortran.texi (title page): Removed erroneous '*'.
840
841 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
842
843         * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
844         to description.
845         (Extensions): Miscellaneous minor rewriting and copyediting.
846         (BOZ-literal constants): Renamed from Hexadecimal constants.
847         (Hollerith constants support): Added explanation and 
848         suggestions for standard-conforming modern equivalents.
849
850 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
851
852         * intrinsic.texi: Improvements to index entries; change
853         @findex entries to @cindex entries.
854         * invoke.texi: Standardize and improve index entries.
855         * gfortran.texi: Fix @code in one index entry.
856
857 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
858
859         * invoke.texi: Change @code-type macros to appropriate
860         variants (@command, @option, etc.)
861         * gfortran.texi: Same.
862
863 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
864
865         * intrinsic.texi: Various minor cleanups.
866
867 2007-01-02  Steven G. Kargl  <kargls@comcast.net>
868
869         * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
870         build_int_cst.
871
872 2007-01-02  Tobias Burnus  <burnus@net-b.de>
873
874         PR fortran/30276
875         * scanner.c (open_included_file): Support full-path filenames.
876
877 2007-01-02  Paul Thomas  <pault@gcc.gnu.org>
878
879         PR fortran/20896
880         * interface.c (check_sym_interfaces): Remove call to
881         resolve_global_procedure.
882         gfortran.h : Remove prototype for resolve_global_procedure.
883         resolve.c (resolve_global_procedure): Add static attribute
884         to function declaration.
885
886 2007-01-01  Steven G. Kargl  <kargls@comcast.net>
887
888         * ChangeLog: Copy to ...
889         * ChangeLog-2006: here.