OSDN Git Service

2010-06-16 Janus Weil <janus@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2010-06-16  Janus Weil  <janus@gcc.gnu.org>
2
3         PR fortran/44549
4         * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
5         * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
6         structure to each procedure in a procedure list.
7         * module.c (mio_typebound_proc): Add NULL argument to
8         'gfc_get_typebound_proc'.
9         * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
10         to initialize the new structure.
11
12 2010-06-15  Janus Weil  <janus@gcc.gnu.org>
13
14         PR fortran/43388
15         * gfortran.h (gfc_expr): Add new member 'mold'.
16         * match.c (gfc_match_allocate): Implement the MOLD tag.
17         * resolve.c (resolve_allocate_expr): Ditto.
18         * trans-stmt.c (gfc_trans_allocate): Ditto.
19
20 2010-06-15  Jakub Jelinek  <jakub@redhat.com>
21
22         PR fortran/44536
23         * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
24         OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
25         GFC_DECL_SAVED_DESCRIPTOR set.
26         (gfc_omp_report_decl): New function.
27         * trans.h (gfc_omp_report_decl): New prototype.
28         * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
29
30 2010-06-13  Daniel Franke  <franke.daniel@gmail.com>
31
32         PR fortran/31588
33         PR fortran/43954
34         * gfortranspec.c (lang_specific_driver): Removed deprecation
35         warning for -M.
36         * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
37         * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
38         * cpp.h (gfc_cpp_makedep): New.
39         (gfc_cpp_add_dep): New.
40         (gfc_cpp_add_target): New.
41         * cpp.c (gfc_cpp_option): Add deps* members.
42         (gfc_cpp_makedep): New.
43         (gfc_cpp_add_dep): New.
44         (gfc_cpp_add_target): New.
45         (gfc_cpp_init_options): Initialize new options.
46         (gfc_cpp_handle_option): Handle new options.
47         (gfc_cpp_post_options): Map new options to libcpp-options.
48         (gfc_cpp_init): Handle deferred -MQ and -MT options.
49         (gfc_cpp_done): If requested, write dependencies to file.
50         * module.c (gfc_dump_module): Add a module filename as target.
51         * scanner.c (open_included_file): New parameter system; add the
52         included file as dependency.
53         (gfc_open_included_file): Add the included file as dependency.
54         (gfc_open_intrinsic_module): Likewise.
55         * invoke.texi: Removed deprecation warning for -M.
56         * gfortran.texi: Removed Makefile-dependencies project.
57
58 2010-06-12  Daniel Franke  <franke.daniel@gmail.com>
59
60         * resolve.c (resolve_global_procedure): Improved checking if an
61         explicit interface is required.
62
63 2010-06-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
64
65         * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
66         return type.
67         * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
68         (gfc_conv_intrinsic_ttynam): Likewise.
69         (gfc_conv_intrinsic_trim): Likewise.
70
71 2010-06-12  Janus Weil  <janus@gcc.gnu.org>
72
73         PR fortran/40117
74         * decl.c (match_procedure_in_type): Allow procedure lists (F08).
75
76 2010-06-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
77
78         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
79
80 2010-06-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
81
82         * mathbuiltins.def: Add builtins that do not directly correspond
83         to a Fortran intrinsic, with new macro OTHER_BUILTIN.
84         * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
85         * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
86         code_{r,c}{4,8,10,16} fields. Add
87         {,complex}{float,double,long_double}_built_in fields.
88         (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
89         DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
90         definition of OTHER_BUILTIN.
91         (real_compnt_info): Remove unused struct.
92         (builtin_decl_for_precision, builtin_decl_for_float_kind): New
93         functions.
94         (build_round_expr): Call builtin_decl_for_precision instead of
95         series of if-else.
96         (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
97         instead of a switch.
98         (gfc_build_intrinsic_lib_fndecls): Match
99         {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
100         (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
101         kinds.
102         (gfc_conv_intrinsic_lib_function): Go through all the extended
103         gfc_intrinsic_map.
104         (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
105         instead of a switch.
106         (gfc_conv_intrinsic_abs): Likewise.
107         (gfc_conv_intrinsic_mod): Likewise.
108         (gfc_conv_intrinsic_sign): Likewise.
109         (gfc_conv_intrinsic_fraction): Likewise.
110         (gfc_conv_intrinsic_nearest): Likewise.
111         (gfc_conv_intrinsic_spacing): Likewise.
112         (gfc_conv_intrinsic_rrspacing): Likewise.
113         (gfc_conv_intrinsic_scale): Likewise.
114         (gfc_conv_intrinsic_set_exponent): Likewise.
115
116 2010-06-11  Paul Thomas  <pault@gcc.gnu.org>
117
118         PR fortran/42051
119         PR fortran/43896
120         * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
121         functions with CLASS formal arguments.
122
123 2010-06-10  Janus Weil  <janus@gcc.gnu.org>
124
125         PR fortran/44207
126         * resolve.c (conformable_arrays): Handle allocatable components.
127
128 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
129
130         PR fortran/38273
131         * gfortran.texi: Document that Cray pointers cannot be function
132         results.
133
134 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
135
136         PR fortran/36234
137         * gfortran.texi: Document lack of support for syntax
138         "complex FUNCTION name*16()", and existence of alternative
139         legacy syntax "complex*16 FUNCTION name()".
140
141 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
142
143         PR fortran/43032
144         * intrinsic.texi (FLUSH): Note the difference between FLUSH and
145         POSIX's fsync(), and how to call the latter from Fortran code.
146
147 2010-06-10  Daniel Franke  <franke.daniel@gmail.com>
148
149         PR fortran/44457
150         * interface.c (compare_actual_formal): Reject actual arguments with
151         array subscript passed to ASYNCHRONOUS dummys.
152
153 2010-06-10  Daniel Kraft  <d@domob.eu>
154
155         PR fortran/38936
156         * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
157         (struct gfc_symbol): New field `assoc'.
158         (struct gfc_association_list): New struct.
159         (struct gfc_code): New struct `block' in union, move `ns' there
160         and add association list.
161         (gfc_free_association_list): New method.
162         (gfc_has_vector_subscript): Made public;
163         * match.h (gfc_match_associate): New method.
164         * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
165         * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
166         * interface.c (gfc_has_vector_subscript): Made public.
167         (compare_actual_formal): Rename `has_vector_subscript' accordingly.
168         * match.c (gfc_match_associate): New method.
169         (gfc_match_select_type): Change reference to gfc_code's `ns' field.
170         * primary.c (match_variable): Don't allow names associated to expr here.
171         * parse.c (decode_statement): Try matching ASSOCIATE statement.
172         (case_exec_markers, case_end): Add ASSOCIATE statement.
173         (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
174         (parse_associate): New method.
175         (parse_executable): Handle ST_ASSOCIATE.
176         (parse_block_construct): Change reference to gfc_code's `ns' field.
177         * resolve.c (resolve_select_type): Ditto.
178         (resolve_code): Ditto.
179         (resolve_block_construct): Ditto and add comment.
180         (resolve_select_type): Set association list in generated BLOCK to NULL.
181         (resolve_symbol): Resolve associate names.
182         * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
183         and free association list.
184         (gfc_free_association_list): New method.
185         * symbol.c (gfc_new_symbol): NULL new field `assoc'.
186         * trans-stmt.c (gfc_trans_block_construct): Change reference to
187         gfc_code's `ns' field.
188
189 2010-06-10  Kai Tietz  <kai.tietz@onevision.com>
190
191         * error.c (error_print): Pre-initialize loc by NULL.
192         * openmp.c (resolve_omp_clauses): Add explicit
193         braces to avoid ambigous else.
194         * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
195
196 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
197
198         * gfc-internals.texi: Move to GFDL 1.3.
199         * gfortran.texi: Ditto.
200         * intrinsic.texi: Ditto.
201         * invoke.texi: Ditto.
202
203 2010-06-09  Daniel Franke  <franke.daniel@gmail.com>
204
205         PR fortran/44347
206         * check.c (gfc_check_selected_real_kind): Verify that the
207         actual arguments are scalar.
208
209 2010-06-09  Daniel Franke  <franke.daniel@gmail.com>
210
211         PR fortran/44359
212         * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
213
214 2010-06-09  Janus Weil  <janus@gcc.gnu.org>
215
216         PR fortran/44430
217         * dump-parse-tree.c (show_symbol): Avoid infinite loop.
218
219 2010-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
220
221         * fortran/symbol.c (check_conflict):  Remove an invalid conflict check.
222
223 2010-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
224
225         * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
226         gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
227         * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
228         gfc_check_ibclr, and gfc_check_ibset.  Add prototype for
229         gfc_check_bitfcn.
230         * fortran/check.c (nonnegative_check, less_than_bitsize1, 
231         less_than_bitsize2): New functions.
232         (gfc_check_btest): Renamed to gfc_check_bitfcn.  Use
233         nonnegative_check and less_than_bitsize1.
234         (gfc_check_ibclr, gfc_check_ibset): Removed.
235         (gfc_check_ibits,gfc_check_mvbits): Use nonnegative_check and
236         less_than_bitsize1.
237
238 2010-06-09  Janus Weil  <janus@gcc.gnu.org>
239
240         PR fortran/44211
241         * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
242         Resolve references.
243
244 2010-06-09  Kai Tietz  <kai.tietz@onevision.com>
245
246         * resolve.c (resolve_deallocate_expr): Avoid warning
247         about possible use of iunitialized sym.
248         (resolve_allocate_expr): Pre-initialize sym by NULL.
249
250 2010-06-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
251
252         PR fortran/43040
253         * f95-lang.c (gfc_init_builtin_functions): Remove comment.
254
255 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
256
257         * trans-types.c (gfc_get_nodesc_array_type): Use typed GC
258         allocation.
259         (gfc_get_array_type_bounds): Likewise.
260
261         * trans-decl.c (gfc_allocate_lang_decl): Likewise.
262         (gfc_find_module): Likewise.
263
264         * f95-lang.c (pushlevel): Likewise.
265
266         * trans.h (struct lang_type): Add variable_size GTY option.
267         (struct lang_decl): Likewise.
268
269 2010-06-08  Tobias Burnus  <burnus@net-b.de>
270
271         PR fortran/44446
272         * symbol.c (check_conflict): Move protected--external/procedure check ...
273         * resolve.c (resolve_select_type): ... to the resolution stage.
274
275 2010-06-07  Tobias Burnus  <burnus@net-b.de>
276
277         * options.c (gfc_handle_option): Fix -fno-recursive.
278
279 2010-06-07  Tobias Burnus  <burnus@net-b.de>
280
281         * gfc-internals.texi (copyrights-gfortran): Fix copyright year format.
282         * gfortran.texi (copyrights-gfortran): Ditto.
283
284 2010-06-07  Joseph Myers  <joseph@codesourcery.com>
285
286         * lang.opt (fshort-enums): Define using Var and VarExists.
287         * options.c (gfc_handle_option): Don't set flag_short_enums here.
288
289 2010-06-05  Paul Thomas  <pault@gcc.gnu.org>
290             Janus Weil  <janus@gcc.gnu.org>
291
292         PR fortran/43945
293         * resolve.c (get_declared_from_expr): Move to before
294         resolve_typebound_generic_call.  Make new_ref and class_ref
295         ignorable if set to NULL.
296         (resolve_typebound_generic_call): Once we have resolved the
297         generic call, check that the specific instance is that which
298         is bound to the declared type.
299         (resolve_typebound_function,resolve_typebound_subroutine): Avoid
300         freeing 'class_ref->next' twice.
301
302 2010-06-05  Paul Thomas  <pault@gcc.gnu.org>
303
304         PR fortran/43895
305         * trans-array.c (structure_alloc_comps): Dereference scalar
306         'decl' if it is a REFERENCE_TYPE. Tidy expressions containing
307         TREE_TYPE (decl).
308
309 2010-06-04  Joseph Myers  <joseph@codesourcery.com>
310
311         * gfortranspec.c (append_arg, lang_specific_driver): Use
312         GCC-specific formats in diagnostics.
313
314 2010-06-02  Tobias Burnus  <burnus@net-b.de>
315
316         PR fortran/44360
317         * parse.c (gfc_fixup_sibling_symbols): Do not "fix" use-associated
318         symbols.
319
320 2010-06-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
321
322         PR fortran/44371
323         * match.c (gfc_match_stopcode): Move gfc_match_eos call inside 
324         condition block.
325
326 2010-05-31  Steven G. Kargl  <kargl@gcc.gnu.org>
327
328         * fortran/gfortran.texi:  Fix typos in description of variable-format-
329         expressions.
330
331 2010-05-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
332
333         PR fortran/36928
334         * dependency.c (gfc_check_section_vs_section):  Check
335         for interleaving array assignments without conflicts.
336
337 2010-05-30  Janus Weil  <janus@gcc.gnu.org>
338
339         * gcc/fortran/gfortran.h (CLASS_DATA): New macro for accessing the
340         $data component of a class container.
341         * gcc/fortran/decl.c (attr_decl1): Use macro CLASS_DATA.
342         * gcc/fortran/expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol,
343         gfc_has_ultimate_allocatable,gfc_has_ultimate_pointer): Ditto.
344         * gcc/fortran/interface.c (matching_typebound_op): Ditto.
345         * gcc/fortran/match.c (gfc_match_allocate, gfc_match_deallocate): Ditto.
346         * gcc/fortran/parse.c (parse_derived): Ditto.
347         * gcc/fortran/primary.c (gfc_match_varspec, gfc_variable_attr,
348         gfc_expr_attr): Ditto.
349         * gcc/fortran/resolve.c (resolve_structure_cons, find_array_spec,
350         resolve_deallocate_expr, resolve_allocate_expr, resolve_select_type,
351         resolve_fl_var_and_proc, resolve_typebound_procedure,
352         resolve_fl_derived): Ditto.
353         * gcc/fortran/symbol.c (gfc_type_compatible): Restructured.
354         * gcc/fortran/trans-array.c (structure_alloc_comps): Use macro
355         CLASS_DATA.
356         * gcc/fortran/trans-decl.c (gfc_get_symbol_decl,
357         gfc_trans_deferred_vars): Ditto.
358         * gcc/fortran/trans-stmt.c (gfc_trans_allocate): Ditto.
359
360 2010-05-28  Tobias Burnus  <burnus@net-b.de>
361
362         * options.c (gfc_handle_option): Fix handling of -fno-whole-file.
363
364 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
365
366         * gfortranspec.c (append_arg, lang_specific_driver): Use
367         fatal_error instead of fatal.  Use warning instead of fprintf for
368         warnings.
369
370 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
371
372         * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
373         * module.c (write_char, gfc_dump_module, gfc_use_module): Use
374         xstrerror instead of strerror.
375
376 2010-05-26  Joseph Myers  <joseph@codesourcery.com>
377
378         * cpp.c (cb_cpp_error): Save and restore
379         global_dc->warn_system_headers, not variable warn_system_headers.
380
381 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
382
383         * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h.
384
385 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
386
387         * trans-common.c: Do not include rtl.h, include output.h instead.
388         * trans-decl.c: Likewise.
389
390 2010-05-26  Paul Thomas  <pault@gcc.gnu.org>
391
392         PR fortran/40011
393         * resolve.c (resolve_global_procedure): Resolve the gsymbol's
394         namespace before trying to reorder the gsymbols.
395
396 2010-05-25  Daniel Franke  <franke.daniel@gmail.com>
397
398         PR fortran/30668
399         PR fortran/31346
400         PR fortran/34260
401         * resolve.c (resolve_global_procedure): Add check for global
402         procedures with implicit interfaces and assumed-shape or optional
403         dummy arguments. Verify that function return type, kind and string
404         lengths match.
405
406 2010-05-21  Tobias Burnus  <burnus@net-b.de>
407
408         * gfortran.h: Do not include system.h.
409         * bbt.c: Include system.h.
410         * data.c: Ditto.
411         * dependency.c: Ditto.
412         * dump-parse-tree.c: Ditto.
413         * arith.h: Do not include gfortran.h.
414         * constructor.h: Do not include gfortran.h and splay-tree.h.
415         * match.h: Do not include gfortran.h.
416         * parse.h: Ditto.
417         * target-memory.h: Ditto.
418         * openmp.c: Do not include toplev.h and target.h.
419         * trans-stmt.c: Ditto not include toplev.h.
420         * primary.c: Ditto.
421         * trans-common.c: Tell why toplev.h is needed. And
422         do not include target.h.
423         * trans-expr.c: Tell why toplev.h is needed.
424         * trans-array.c: Ditto.
425         * trans-openmp.c: Ditto.
426         * trans-const.c: Ditto.
427         * trans.c: Ditto.
428         * trans-types.c: Ditto.
429         * trans-io.c: Ditto.
430         * trans-decl.c: Ditto.
431         * scanner.c: Ditto.
432         * convert.c: Ditto.
433         * trans-intrinsic.c: Ditto.
434         * options.c: Ditto.
435
436 2010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
437
438         PR fortran/43851
439         * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to cleanup
440         before returning MATCH_ERROR. Add check for scalar. Add check for
441         default integer kind.
442
443 2010-05-22  Janus Weil  <janus@gcc.gnu.org>
444
445         PR fortran/44212
446         * match.c (gfc_match_select_type): On error jump back out of the local
447         namespace.
448         * parse.c (parse_derived): Defer creation of vtab symbols to resolution
449         stage, more precisely to ...
450         * resolve.c (resolve_fl_derived): ... this place.
451
452 2010-05-22  Janus Weil  <janus@gcc.gnu.org>
453
454         PR fortran/44213
455         * resolve.c (ensure_not_abstract): Allow abstract types with
456         non-abstract ancestors.
457
458 2010-05-21  Steven Bosscher  <steven@gcc.gnu.org>
459
460         * trans-const.c: Include realmpfr.h.
461         * Make-lang.in: Update dependencies.
462
463 2010-05-21  Steven Bosscher  <steven@gcc.gnu.org>
464
465         * trans-const.c, trans-types.c, trans-intrinsic.c:
466         Clean up redundant includes.
467
468 2010-05-20  Daniel Franke  <franke.daniel@gmail.com>
469
470         PR fortran/38407
471         * lang.opt (Wunused-dummy-argument): New option.
472         * gfortran.h (gfc_option_t): Add warn_unused_dummy_argument.
473         * options.c (gfc_init_options): Disable warn_unused_dummy_argument.
474         (set_Wall): Enable warn_unused_dummy_argument.
475         (gfc_handle_option): Set warn_unused_dummy_argument according to
476         command line.
477         * trans-decl.c (generate_local_decl): Separate warnings about
478         unused variables and unused dummy arguments.
479         * invoke.texi: Documented new option.
480
481 2010-05-20  Steven Bosscher  <steven@gcc.gnu.org>
482
483         * trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
484         (gfc_conv_string_tmp): Do not assert type comparibilty.
485         *  trans-array.c: Do not include gimple.h, ggc.h, and real.h.
486         (gfc_conv_expr_descriptor): Remove assert.
487         * trans-common.c: Clarify why rtl.h and tm.h are included.
488         * trans-openmp.c: Do not include ggc.h and real.h.
489         Explain why gimple.h is included.
490         * trans-const.c: Do not include ggc.h.
491         * trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
492         * trans.c: Do not include ggc.h and real.h.
493         Explain why gimple.h is included.
494         * trans-types.c: Do not include tm.h.  Explain why langhooks.h
495         and dwarf2out.h are included.
496         * trans-io.c: Do not include gimple.h and real.h.
497         * trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
498         * trans-intrinsic.c: Do not include gimple.h.  Explain why tm.h
499         is included.
500
501 2010-05-20  Tobias Burnus  <burnus@net-b.de>
502
503         * options.c (gfc_init_options,gfc_post_options): Enable
504         flag_associative_math by default.
505
506 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
507
508         PR fortran/43851
509         * trans-stmt.c (gfc_trans_stop): Add generation of call to
510         gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
511         blank STOP, handling a null expression. (gfc_trans_pause): Use
512         pause_string for blank PAUSE.
513         * trans.h: Add external function declaration for error_stop_numeric.
514         * trans-decl.c (gfc_build_builtin_function_decls): Add the building of
515         the declaration for the library call. Adjust whitespaces.
516         * match.c (gfc_match_stopcode): Remove use of the actual stop code to
517         signal no stop code. Match the expression following the stop and pass
518         that to the translators. Remove the old use of digit matching.  Add
519         checks that the stop_code expression is INTEGER or CHARACTER, constant,
520         and if CHARACTER, default character KIND.
521
522 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
523
524         PR fortran/44055
525         * lang.opt (Wconversion-extra): New option.
526         * gfortran.h (gfc_option_t): Add warn_conversion_extra.
527         * options.c (gfc_init_options): Disable -Wconversion-extra by default.
528         (set_Wall): Enable -Wconversion.
529         (gfc_handle_option): Set warn_conversion_extra.
530         * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions
531         introduced for -Wconversion if -Wconversion-extra is present.
532         * invoke.texi: Add -Wconversion to -Wall; document new behaviour of
533         -Wconversion; document -Wconversion-extra.
534
535 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
536
537         PR fortran/42360
538         * gfortran.h (gfc_has_default_initializer): New.
539         * expr.c (gfc_has_default_initializer): New.
540         * resolve.c (has_default_initializer): Removed, use
541         gfc_has_default_initializer() instead. Updated all callers.
542         * trans-array.c (has_default_initializer): Removed, use
543         gfc_has_default_initializer() instead. Updated all callers.
544         * trans-decl.c (generate_local_decl): Do not check the
545         first component only to check for initializers, but use
546         gfc_has_default_initializer() instead.
547
548 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
549
550         PR fortran/38404
551         * primary.c (match_string_constant): Move start_locus just inside 
552         the string.
553         * data.c (create_character_intializer): Clarified truncation warning.
554
555 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
556
557         PR fortran/34505
558         * intrinsic.h (gfc_check_float): New prototype.
559         (gfc_check_sngl): New prototype.
560         * check.c (gfc_check_float): New.
561         (gfc_check_sngl): New.
562         * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE
563         to be a specific for REAL. Added check routines for FLOAT, DFLOAT
564         and SNGL.
565         * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL,
566         added them to the list of specifics of REAL instead.
567
568 2010-05-17  Janus Weil  <janus@gcc.gnu.org>
569
570         PR fortran/43990
571         * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
572         This is now handled via 'gfc_class_null_initializer'.
573
574 2010-05-17  Janus Weil  <janus@gcc.gnu.org>
575
576         * class.c (gfc_add_component_ref,gfc_class_null_initializer,
577         gfc_build_class_symbol,add_proc_component,add_proc_comps, 
578         add_procs_to_declared_vtab1,copy_vtab_proc_comps,
579         add_procs_to_declared_vtab,add_generic_specifics, 
580         add_generics_to_declared_vtab,gfc_find_derived_vtab,
581         find_typebound_proc_uop,gfc_find_typebound_proc,
582         gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op, 
583         gfc_get_tbp_symtree): Moved here from other places.
584         * expr.c (gfc_add_component_ref,gfc_class_null_initializer): Move to
585         class.c.
586         * gfortran.h (gfc_build_class_symbol,gfc_find_derived_vtab,
587         gfc_find_typebound_proc,gfc_find_typebound_user_op,
588         gfc_find_typebound_intrinsic_op,gfc_get_tbp_symtree,
589         gfc_add_component_ref, gfc_class_null_initializer): Moved to class.c.
590         * Make-lang.in: Add class.o.
591         * symbol.c (gfc_build_class_symbol,add_proc_component,add_proc_comps,
592         add_procs_to_declared_vtab1,copy_vtab_proc_comps,
593         add_procs_to_declared_vtab,add_generic_specifics,
594         add_generics_to_declared_vtab,gfc_find_derived_vtab,
595         find_typebound_proc_uop,gfc_find_typebound_proc,
596         gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
597         gfc_get_tbp_symtree): Move to class.c.
598
599 2010-05-17  Nathan Froyd  <froydnj@codesourcery.com>
600
601         * trans-types.c (gfc_init_types): Use build_function_type_list.
602         (gfc_get_ppc_type): Likewise.
603         * trans-decl.c (gfc_generate_constructors): Likewise.
604         * f95-lang.c (build_builtin_fntypes): Likewise.
605         (gfc_init_builtin_functions): Likewise.
606         (DEF_FUNCTION_TYPE_0): Likewise.
607         (DEF_FUNCTION_TYPE_1): Likewise.
608         (DEF_FUNCTION_TYPE_2): Likewise.
609         (DEF_FUNCTION_TYPE_3): Likewise.
610         (DEF_FUNCTION_TYPE_4): Likewise.
611         (DEF_FUNCTION_TYPE_5): Likewise.
612         (DEF_FUNCTION_TYPE_6): Likewise.
613         (DEF_FUNCTION_TYPE_7): Likewise.  Use ARG7.
614         (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list.
615  
616 2010-05-17  Nathan Froyd  <froydnj@codesourcery.com>
617
618         * trans-array.c (gfc_trans_array_constructor_value): Use
619         build_constructor instead of build_constructor_from_list.
620         (gfc_build_constant_array_constructor): Likewise.
621         * trans-decl.c (create_main_function): Likewise.
622         * trans-stmt.c (gfc_trans_character_select): Likewise.
623
624 2010-05-17  Janus Weil  <janus@gcc.gnu.org>
625
626         PR fortran/44044
627         * resolve.c (resolve_fl_var_and_proc): Move error messages here from ...
628         (resolve_fl_variable_derived): ... this place.
629         (resolve_symbol): Make sure function symbols (and their result
630         variables) are not resolved twice.
631
632 2010-05-16  Daniel Franke  <franke.daniel@gmail.com>
633
634         PR fortran/35779
635         * array.c (match_array_list): Revert change from 2010-05-13.
636
637 2010-05-16  Richard Guenther  <rguenther@suse.de>
638
639         * trans-decl.c (module_htab_decls_hash): Revert last change.
640
641 2010-05-16  Richard Guenther  <rguenther@suse.de>
642
643         * trans-decl.c (module_htab_decls_hash): Use IDENTIFIER_HASH_VALUE.
644
645 2010-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
646
647         * options.c (set_Wall): Remove special logic for Wuninitialized
648         without -O.
649
650 2010-05-15  Janus Weil  <janus@gcc.gnu.org>
651
652         PR fortran/44154
653         PR fortran/42647
654         * trans-decl.c (gfc_trans_deferred_vars): Modify ordering of
655         if branches.
656
657 2010-05-15  Janus Weil  <janus@gcc.gnu.org>
658
659         PR fortran/43207
660         PR fortran/43969
661         * gfortran.h (gfc_class_null_initializer): New prototype.
662         * expr.c (gfc_class_null_initializer): New function to build a NULL
663         initializer for CLASS pointers.
664         * symbol.c (gfc_build_class_symbol): Modify internal naming of class
665         containers. Remove default NULL initialization of $data component.
666         * trans.c (gfc_allocate_array_with_status): Fix wording of an error 
667         message.
668         * trans-expr.c (gfc_conv_initializer,gfc_trans_subcomponent_assign):
669         Use new function 'gfc_class_null_initializer'.
670         * trans-intrinsic.c (gfc_conv_allocated): Handle allocatable scalar
671         class variables.
672
673 2010-05-14  Steven G. Kargl  <kargl@gcc.gnu.org>
674
675         PR fortran/44135
676         * fortran/interface.c (get_sym_storage_size): Use signed instead of
677         unsigned mpz_get_?i routines.
678
679 2010-05-14  Jakub Jelinek  <jakub@redhat.com>
680
681         * trans.c (trans_code): Set backend locus early.
682         * trans-decl.c (gfc_get_fake_result_decl): Use source location
683         of the function instead of current input_location.
684
685 2010-05-13  Daniel Franke  <franke.daniel@gmail.com>
686
687         PR fortran/35779
688         * intrinsic.c (gfc_init_expr): Renamed to gfc_init_expr_flag.
689         Updated all usages.
690         * expr.c (init_flag): Removed; use gfc_init_expr_flag everywhere.
691         * array.c (match_array_list): Pass on gfc_init_expr_flag when matching
692         iterators.
693
694 2010-05-13  Jakub Jelinek  <jakub@redhat.com>
695
696         PR fortran/44036
697         * openmp.c (resolve_omp_clauses): Allow procedure pointers in clause
698         variable lists.
699         * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
700         by reference dummy procedures or non-dummy procedure pointers.
701         (gfc_omp_predetermined_sharing): Return
702         OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for dummy procedures.
703
704 2010-05-11  Daniel Franke  <franke.daniel@gmail.com>
705
706         PR fortran/43711
707         * openmp.c (gfc_match_omp_taskwait): Report unexpected characters
708         after OMP statement.
709         (gfc_match_omp_critical): Likewise.
710         (gfc_match_omp_flush): Likewise.
711         (gfc_match_omp_workshare): Likewise.
712         (gfc_match_omp_master): Likewise.
713         (gfc_match_omp_ordered): Likewise.
714         (gfc_match_omp_atomic): Likewise.
715         (gfc_match_omp_barrier): Likewise.
716         (gfc_match_omp_end_nowait): Likewise.
717
718 2010-05-11  Daniel Franke  <franke.daniel@gmail.com>
719
720         PR fortran/31820
721         * resolve.c (validate_case_label_expr): Removed FIXME.
722         (resolve_select): Raise default warning on case labels out of range
723         of the case expression.
724
725 2010-05-10  Daniel Franke  <franke.daniel@gmail.com>
726
727         PR fortran/27866
728         PR fortran/35003
729         PR fortran/42809
730         * intrinsic.c (gfc_convert_type_warn): Be more discriminative
731         about conversion warnings.
732
733 2010-05-10  Janus Weil  <janus@gcc.gnu.org>
734
735         PR fortran/44044
736         * match.c (gfc_match_select_type): Move error message to
737         resolve_select_type.
738         * resolve.c (resolve_select_type): Error message moved here from
739         gfc_match_select_type. Correctly set type of temporary.
740
741 2010-05-10  Richard Guenther  <rguenther@suse.de>
742
743         * trans-decl.c (gfc_build_library_function_decl): Split out
744         worker to ...
745         (build_library_function_decl_1): ... this new function.
746         Set a fnspec attribute if a specification was provided.
747         (gfc_build_library_function_decl_with_spec): New function.
748         (gfc_build_intrinsic_function_decls): Annotate internal_pack
749         and internal_unpack.
750
751 2010-05-07  Daniel Franke  <franke.daniel@gmail.com>
752
753         PR fortran/40728
754         * intrinc.c (gfc_is_intrinsic): Do not prematurely mark symbol
755         as external.
756
757 2010-05-07  Jason Merrill  <jason@redhat.com>
758
759         * trans-expr.c (gfc_conv_procedure_call): Rename nullptr to null_ptr
760         to avoid -Wc++-compat warning.
761
762 2010-05-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
763
764         PR 40989
765         * options.c (gfc_handle_option): Add argument kind.
766         * gfortran.h (gfc_handle_option): Update declaration.
767
768 2010-05-06  Tobias Burnus  <burnus@net-b.de>
769
770         PR fortran/43985
771         * trans-types.c (gfc_sym_type): Mark Cray pointees as
772         GFC_POINTER_TYPE_P.
773
774 2010-05-05  Daniel Franke  <franke.daniel@gmail.com>
775
776         PR fortran/32331
777         * resolve.c (traverse_data_list): Rephrase error message for
778         non-constant bounds in data-implied-do.
779
780 2010-05-05  Daniel Franke  <franke.daniel@gmail.com>
781
782         PR fortran/24978
783         * gfortran.h: Removed repeat count from constructor, removed
784         all usages.
785         * data.h (gfc_assign_data_value_range): Changed return value from
786         void to gfc_try.
787         * data.c (gfc_assign_data_value): Add location to constructor element.
788         (gfc_assign_data_value_range): Call gfc_assign_data_value()
789         for each element in range. Return early if an error was generated.
790         * resolve.c (check_data_variable): Stop early if range assignment
791         generated an error.
792
793 2010-05-05  Janus Weil  <janus@gcc.gnu.org>
794
795         PR fortran/43696
796         * resolve.c (resolve_fl_derived): Some fixes for class variables.
797         * symbol.c (gfc_build_class_symbol): Add separate class container for
798         class pointers.
799
800 2010-05-03  Steven G. Kargl  <kargl@gcc.gnu.org>
801
802         PR fortran/43592
803         * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
804
805 2010-05-02  Tobias Burnus  <burnus@net-b.de>
806
807         PR fortran/18918
808         * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_ calls
809         for lcobound, ucobound, image_index and this_image.
810         * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
811         gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
812         * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
813         gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
814         functions.
815         (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.
816
817 2010-04-30  Tobias Burnus  <burnus@net-b.de>
818
819         PR fortran/18918
820         PR fortran/43931
821         *  trans-types.c (gfc_get_array_descriptor_base): Fix index
822         calculation for array descriptor types.
823
824 2010-04-29  Janus Weil  <janus@gcc.gnu.org>
825
826         PR fortran/43896
827         * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
828         initializers for PPC members of the vtabs.
829
830 2010-04-29  Janus Weil  <janus@gcc.gnu.org>
831
832         PR fortran/42274
833         * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
834         attribute for all PPC members of the vtypes.
835         (copy_vtab_proc_comps): Copy the correct interface.
836         * trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
837         * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
838         a dummy argument and make sure all PPC members of the vtab are
839         initialized correctly.
840         (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
841         in call to gfc_trans_assign_vtab_procs.
842         * trans-stmt.c (gfc_trans_allocate): Ditto.
843
844 2010-04-29  Paul Thomas  <pault@gcc.gnu.org>
845
846         PR fortran/43326
847         * resolve.c (resolve_typebound_function): Renamed
848         resolve_class_compcall.Do all the detection of class references
849         here.
850         (resolve_typebound_subroutine): resolve_class_typebound_call
851         renamed. Otherwise same as resolve_typebound_function.
852         (gfc_resolve_expr): Call resolve_typebound_function.
853         (resolve_code): Call resolve_typebound_subroutine.
854
855 2010-04-29  Janus Weil  <janus@gcc.gnu.org>
856
857         PR fortran/43492
858         * resolve.c (resolve_typebound_generic_call): For CLASS methods
859         pass back the specific symtree name, rather than the target
860         name.
861
862 2010-04-29  Paul Thomas  <pault@gcc.gnu.org>
863
864         PR fortran/42353
865         * resolve.c (resolve_structure_cons): Make the initializer of
866         the vtab component 'extends' the same type as the component.
867
868 2010-04-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
869
870         PR fortran/42680
871         * interface.c (check_interface1): Pass symbol name rather than NULL to
872         gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
873         trap MULL. (gfc_compare_derived_types): Revert previous change
874         incorporated incorrectly during merge from trunk, r155778.
875         * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
876         than NULL to gfc_compare_interfaces.
877         * symbol.c (add_generic_specifics): Likewise.
878
879 2010-02-29  Janus Weil  <janus@gcc.gnu.org>
880
881         PR fortran/42353
882         * interface.c (gfc_compare_derived_types): Add condition for vtype.
883         * symbol.c (gfc_find_derived_vtab): Sey access to private.
884         (gfc_find_derived_vtab): Likewise.
885         * module.c (ab_attribute): Add enumerator AB_VTAB.
886         (mio_symbol_attribute): Use new attribute, AB_VTAB.
887         (check_for_ambiguous): Likewise.
888
889 2010-04-29  Paul Thomas  <pault@gcc.gnu.org>
890             Janus Weil  <janus@gcc.gnu.org>
891
892         PR fortran/41829
893         * trans-expr.c (select_class_proc): Remove function.
894         (conv_function_val): Delete reference to previous.
895         (gfc_conv_derived_to_class): Add second argument to the call to
896         gfc_find_derived_vtab.
897         (gfc_conv_structure): Exclude proc_pointer components when
898         accessing $data field of class objects.
899         (gfc_trans_assign_vtab_procs): New function.
900         (gfc_trans_class_assign): Add second argument to the call to
901         gfc_find_derived_vtab.
902         * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
903         implement holding off searching for the vptr derived type.
904         (add_proc_component): New function.
905         (add_proc_comps): New function.
906         (add_procs_to_declared_vtab1): New function.
907         (copy_vtab_proc_comps): New function.
908         (add_procs_to_declared_vtab): New function.
909         (void add_generic_specifics): New function.
910         (add_generics_to_declared_vtab): New function.
911         (gfc_find_derived_vtab): Add second argument to the call to
912         gfc_find_derived_vtab. Add the calls to
913         add_procs_to_declared_vtab and add_generics_to_declared_vtab.
914         * decl.c (build_sym, build_struct): Use new arg in calls to
915         gfc_build_class_symbol.
916         * gfortran.h : Add vtype bitfield to symbol_attr. Remove the
917         definition of struct gfc_class_esym_list. Modify prototypes
918         of gfc_build_class_symbol and gfc_find_derived_vtab.
919         * trans-stmt.c (gfc_trans_allocate): Add second argument to the
920         call to gfc_find_derived_vtab.
921         * module.c : Add the vtype attribute.
922         * trans.h : Add prototype for gfc_trans_assign_vtab_procs.
923         * resolve.c (resolve_typebound_generic_call): Add second arg
924         to pass along the generic name for class methods.
925         (resolve_typebound_call): The same.
926         (resolve_compcall): Use the second arg to carry the generic
927         name from the above. Remove the reference to class_esym.
928         (check_members, check_class_members, resolve_class_esym,
929         hash_value_expr): Remove functions.
930         (resolve_class_compcall, resolve_class_typebound_call): Modify
931         to use vtable rather than member by member calls.
932         (gfc_resolve_expr): Modify second arg in call to
933         resolve_compcall.
934         (resolve_select_type): Add second arg in call to
935         gfc_find_derived_vtab.
936         (resolve_code): Add second arg in call resolve_typebound_call.
937         (resolve_fl_derived): Exclude vtypes from check for late
938         procedure definitions. Likewise for checking of explicit
939         interface and checking of pass arg.
940         * iresolve.c (gfc_resolve_extends_type_of): Add second arg in
941         calls to gfc_find_derived_vtab.
942         * match.c (select_type_set_tmp): Use new arg in call to
943         gfc_build_class_symbol.
944         * trans-decl.c (gfc_get_symbol_decl): Complete vtable if
945         necessary.
946         * parse.c (endType): Finish incomplete classes.
947
948 2010-04-28  Tobias Burnus  <burnus@net-b.de>
949
950         PR fortran/18918
951         PR fortran/43919
952         * simplify.c (simplify_cobound): Handle scalar coarrays.
953
954 2010-04-27  Tobias Burnus  <burnus@net-b.de>
955
956         * gfc-internals.texi: Update copyright year.
957         * gfortran.texi: Ditto.
958         * invoke.texi: Ditto.
959
960 2010-04-27  Tobias Burnus  <burnus@net-b.de>
961
962         PR fortran/18918
963         * resolve.c (resolve_allocate_expr): Allow array coarrays.
964         * trans-types.h (gfc_get_array_type_bounds): Update prototype.
965         * trans-types.c (gfc_get_array_type_bounds,
966         gfc_get_array_descriptor_base): Add corank argument.
967         * trans-array.c (gfc_array_init_size): Handle corank.
968         (gfc_trans_create_temp_array, gfc_array_allocate,
969         gfc_conv_expr_descriptor): Add corank argument to call.
970         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
971
972 2010-04-24  Steven G. Kargl  <kargl@gcc.gnu.org>
973
974         PR fortran/30073
975         PR fortran/43793
976         * trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
977         of mucking with a tree directly.
978
979 2010-04-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
980
981         PR fortran/43832
982         * io.c (gfc_match_open): Remove branch to syntax error. Add call to
983         gfc_error with new error message.
984
985 2010-04-24  Paul Thomas  <pault@gcc.gnu.org>
986
987         PR fortran/43841
988         PR fortran/43843
989         * trans-expr.c (gfc_conv_expr): Supply an address expression for
990         GFC_SS_REFERENCE.
991         (gfc_conv_expr_reference): Call gfc_conv_expr and return for
992         GFC_SS_REFERENCE.
993         * trans-array.c (gfc_add_loop_ss_code): Store the value rather
994         than the address of a GFC_SS_REFERENCE.
995         * trans.h : Change comment on GFC_SS_REFERENCE. 
996
997 2010-04-22  Richard Guenther  <rguenther@suse.de>
998
999         PR fortran/43829
1000         * resolve.c (gfc_resolve_index): Wrap around ...
1001         (gfc_resolve_index_1): ... this.  Add parameter to allow
1002         any integer kind index type.
1003         (resolve_array_ref): Allow any integer kind for the start
1004         index of an array ref.
1005
1006 2010-04-21  Jakub Jelinek  <jakub@redhat.com>
1007
1008         PR fortran/43836
1009         * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
1010         the decl.
1011
1012 2010-04-20  Harald Anlauf  <anlauf@gmx.de>
1013
1014         * intrinsic.c (sort_actual): Remove 'is' in error message.
1015
1016 2010-04-20  Paul Thomas  <pault@gcc.gnu.org>
1017
1018         PR fortran/43227
1019         * resolve.c (resolve_fl_derived): If a component character
1020         length has not been resolved, do so now.
1021         (resolve_symbol): The same as above for a symbol character
1022         length.
1023         * trans-decl.c (gfc_create_module_variable): A 'length' decl is
1024         not needed for a character valued, procedure pointer.
1025
1026         PR fortran/43266
1027         * resolve.c (ensure_not_abstract_walker): If 'overriding' is
1028         not found, return FAILURE rather than ICEing.
1029
1030 2010-04-19  Jakub Jelinek  <jakub@redhat.com>
1031
1032         PR fortran/43339
1033         * openmp.c (gfc_resolve_do_iterator): Only make iteration vars for
1034         sequential loops private in the innermost containing task region.
1035
1036 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
1037
1038         * f95-lang.c (gfc_init_decl_processing): Remove second argument in call
1039         to build_common_tree_nodes.
1040
1041 2010-04-17  Steven G. Kargl  <kargl@gcc.gnu.org>
1042
1043         PR fortran/31538
1044         * fortran/trans-array.c (gfc_conv_ss_startstride): Remove the use of
1045         gfc_msg_bounds by using 'Array bound mismatch' directly.
1046         (gfc_trans_dummy_array_bias):  Remove the use of gfc_msg_bounds.  Reword
1047         error message to include the mismatch in the extent of array bound.
1048         * fortran/trans.c: Remove gfc_msg_bounds.  It is only used in one place.
1049         * fortran/trans.h: Remove extern definition of gfc_msg_bounds.
1050
1051 2010-04-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1052
1053         * gfortran.texi: Update information on temporary file locations.
1054
1055 2010-04-16  Jakub Jelinek  <jakub@redhat.com>
1056
1057         * trans-decl.c (gfc_build_qualified_array): Ensure
1058         ubound.N and lbound.N artificial variable names don't appear
1059         in debug info.
1060
1061 2010-04-15  Steven G. Kargl  <kargl@gcc.gnu.org>
1062
1063         PR fortran/30073
1064         * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
1065         block of code.  Set name to the variable associated with the descriptor.
1066
1067 2010-04-15  Jakub Jelinek  <jakub@redhat.com>
1068
1069         * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
1070         on VAR_DECL LBOUND and/or UBOUND, even for -O1.
1071
1072 2010-04-14  Steven G. Kargl  <kargl@gcc.gnu.org>
1073
1074         * intrinsic.texi: Add the missing specific name of intrinsic
1075         procedure where the specific name is identical to the generic name.
1076         Fix inconsistent or mismatch in the argument names in intrinsic
1077         procedure descriptions.  Add the SCALAR allocatable description to
1078         ALLOCATED.
1079
1080 2010-04-14  Tobias Burnus  <burnus@net-b.de>
1081
1082         PR fortran/18918
1083         * array.c (gfc_find_array_ref): Handle codimensions.
1084         (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
1085         * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
1086         gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
1087         New functions.
1088         * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
1089         GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
1090         GFC_ISYM_UCOBOUND.
1091         * intrinsic.h (add_functions): Add this_image, image_index,
1092         lcobound and ucobound intrinsics.
1093         * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
1094         gfc_check_image_index, gfc_check_this_image,
1095         gfc_simplify_image_index, gfc_simplify_lcobound,
1096         gfc_simplify_this_image, gfc_simplify_ucobound):
1097         New function prototypes.
1098         * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
1099         IMAGE_INDEX): Document new intrinsic functions.
1100         * match.c (gfc_match_critical, sync_statement): Make -fcoarray=none
1101         error fatal.
1102         * simplify.c (simplify_bound_dim): Handle coarrays.
1103         (simplify_bound): Update simplify_bound_dim call.
1104         (gfc_simplify_num_images): Add -fcoarray=none check.
1105         (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
1106         gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.
1107
1108 2010-04-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1109
1110         PR fortran/43747
1111         * constructor.c: Fix typo in comment.
1112         * expr.c (find_array_section): Add check for max array limit.
1113
1114 2010-04-13  Iain Sandoe  <iains@gcc.gnu.org>
1115
1116         PR bootstrap/31400
1117         * gfortranspec.c (lookup_option): Check for -static and return
1118         OPTION_static.
1119         (lang_specific_driver): Break when OPTION_static is discovered.
1120
1121 2010-04-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1122
1123         * array.c (extract_element): Restore function from trunk.
1124         (gfc_get_array_element): Restore function from trunk.
1125         (gfc_expand_constructor): Restore check against
1126         flag_max_array_constructor.
1127         * constructor.c (node_copy_and_append): Delete unused.
1128         * gfortran.h: Delete comment and extra include.
1129         * constructor.h: Bump copyright and clean up TODO comments.
1130         * resolve.c: Whitespace.
1131
1132 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
1133
1134         * simplify.c (compute_dot_product): Replaced usage of ADVANCE macro
1135         with direct access access to elements. Adjusted prototype, fixed all
1136         callers.
1137         (gfc_simplify_dot_product): Removed duplicate check for zero-sized
1138         array.
1139         (gfc_simplify_matmul): Removed usage of ADVANCE macro.
1140         (gfc_simplify_spread): Removed workaround, directly insert elements
1141         at a given array position.
1142         (gfc_simplify_transpose): Likewise.
1143         (gfc_simplify_pack): Replaced usage of ADVANCE macro with corresponding
1144         function calls.
1145         (gfc_simplify_unpack): Likewise.
1146
1147 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
1148
1149         * simplify.c (only_convert_cmplx_boz): Renamed to ...
1150         (convert_boz): ... this and moved to start of file.
1151         (gfc_simplify_abs): Whitespace fix.
1152         (gfc_simplify_acos): Whitespace fix.
1153         (gfc_simplify_acosh): Whitespace fix.
1154         (gfc_simplify_aint): Whitespace fix.
1155         (gfc_simplify_dint): Whitespace fix.
1156         (gfc_simplify_anint): Whitespace fix.
1157         (gfc_simplify_and): Replaced if-gate by more common switch-over-type.
1158         (gfc_simplify_dnint): Whitespace fix.
1159         (gfc_simplify_asin): Whitespace fix.
1160         (gfc_simplify_asinh): Moved creation of result-expr out of switch.
1161         (gfc_simplify_atan): Likewise.
1162         (gfc_simplify_atanh): Whitespace fix.
1163         (gfc_simplify_atan2): Whitespace fix.
1164         (gfc_simplify_bessel_j0): Removed ATTRIBUTE_UNUSED.
1165         (gfc_simplify_bessel_j1): Likewise.
1166         (gfc_simplify_bessel_jn): Likewise.
1167         (gfc_simplify_bessel_y0): Likewise.
1168         (gfc_simplify_bessel_y1): Likewise.
1169         (gfc_simplify_bessel_yn): Likewise.
1170         (gfc_simplify_ceiling): Reorderd statements.
1171         (simplify_cmplx): Use convert_boz(), check for constant arguments.
1172         Whitespace fix.
1173         (gfc_simplify_cmplx): Use correct default kind. Removed check for
1174         constant arguments.
1175         (gfc_simplify_complex): Replaced if-gate. Removed check for
1176         constant arguments.
1177         (gfc_simplify_conjg): Whitespace fix.
1178         (gfc_simplify_cos): Whitespace fix.
1179         (gfc_simplify_cosh): Replaced if-gate by more common switch-over-type.
1180         (gfc_simplify_dcmplx): Removed check for constant arguments.
1181         (gfc_simplify_dble): Use convert_boz() and gfc_convert_constant().
1182         (gfc_simplify_digits): Whitespace fix.
1183         (gfc_simplify_dim): Whitespace fix.
1184         (gfc_simplify_dprod): Reordered statements.
1185         (gfc_simplify_erf): Whitespace fix.
1186         (gfc_simplify_erfc): Whitespace fix.
1187         (gfc_simplify_epsilon): Whitespace fix.
1188         (gfc_simplify_exp): Whitespace fix.
1189         (gfc_simplify_exponent): Use convert_boz().
1190         (gfc_simplify_floor): Reorderd statements.
1191         (gfc_simplify_gamma): Whitespace fix.
1192         (gfc_simplify_huge): Whitespace fix.
1193         (gfc_simplify_iand): Whitespace fix.
1194         (gfc_simplify_ieor): Whitespace fix.
1195         (simplify_intconv): Use gfc_convert_constant().
1196         (gfc_simplify_int): Use simplify_intconv().
1197         (gfc_simplify_int2): Reorderd statements.
1198         (gfc_simplify_idint): Reorderd statements.
1199         (gfc_simplify_ior): Whitespace fix.
1200         (gfc_simplify_ishftc): Removed duplicate type check.
1201         (gfc_simplify_len): Use range_check() instead of manual range check.
1202         (gfc_simplify_lgamma): Removed ATTRIBUTE_UNUSED. Whitespace fix.
1203         (gfc_simplify_log): Whitespace fix.
1204         (gfc_simplify_log10): Whitespace fix.
1205         (gfc_simplify_minval): Whitespace fix.
1206         (gfc_simplify_maxval): Whitespace fix.
1207         (gfc_simplify_mod): Whitespace fix.
1208         (gfc_simplify_modulo): Whitespace fix.
1209         (simplify_nint): Reorderd statements.
1210         (gfc_simplify_not): Whitespace fix.
1211         (gfc_simplify_or): Replaced if-gate by more common switch-over-type.
1212         (gfc_simplify_radix): Removed unused result-variable. Whitespace fix.
1213         (gfc_simplify_range): Removed unused result-variable. Whitespace fix.
1214         (gfc_simplify_real): Use convert_boz() and gfc_convert_constant().
1215         (gfc_simplify_realpart): Whitespace fix.
1216         (gfc_simplify_selected_char_kind): Removed unused result-variable.
1217         (gfc_simplify_selected_int_kind): Removed unused result-variable.
1218         (gfc_simplify_selected_real_kind): Removed unused result-variable.
1219         (gfc_simplify_sign): Whitespace fix.
1220         (gfc_simplify_sin): Whitespace fix.
1221         (gfc_simplify_sinh): Replaced if-gate by more common switch-over-type.
1222         (gfc_simplify_sqrt): Avoided goto by inlining check. Whitespace fix.
1223         (gfc_simplify_tan): Replaced if-gate by more common switch-over-type.
1224         (gfc_simplify_tanh): Replaced if-gate by more common switch-over-type.
1225         (gfc_simplify_xor): Replaced if-gate by more common switch-over-type.
1226
1227 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
1228
1229         * gfortran.h (gfc_start_constructor): Removed.
1230         (gfc_get_array_element): Removed.
1231         * array.c (gfc_start_constructor): Removed, use gfc_get_array_expr 
1232         instead. Fixed all callers.
1233         (extract_element): Removed.
1234         (gfc_expand_constructor): Temporarily removed check for
1235         max-array-constructor. Will be re-introduced later if still required.
1236         (gfc_get_array_element): Removed, use gfc_constructor_lookup_expr
1237         instead. Fixed all callers.
1238         * expr.c (find_array_section): Replaced manual lookup of elements
1239         by gfc_constructor_lookup.
1240
1241 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
1242
1243         * gfortran.h (gfc_get_null_expr): New prototype.
1244         (gfc_get_operator_expr): New prototype.
1245         (gfc_get_character_expr): New prototype.
1246         (gfc_get_iokind_expr): New prototype.
1247         * expr.c (gfc_get_null_expr): New.
1248         (gfc_get_character_expr): New.
1249         (gfc_get_iokind_expr): New.
1250         (gfc_get_operator_expr): Moved here from matchexp.c (build_node).
1251         * matchexp.c (build_node): Renamed and moved to
1252         expr.c (gfc_get_operator_expr). Reordered arguments to match 
1253         other functions. Fixed all callers.
1254         (gfc_get_parentheses): Use specific function to build expr.
1255         * array.c (gfc_match_array_constructor): Likewise.
1256         * arith.c (eval_intrinsic): Likewise.
1257         (gfc_hollerith2int): Likewise.
1258         (gfc_hollerith2real): Likewise.
1259         (gfc_hollerith2complex): Likewise.
1260         (gfc_hollerith2logical): Likewise.
1261         * data.c (create_character_intializer): Likewise.
1262         * decl.c (gfc_match_null): Likewise.
1263         (enum_initializer): Likewise.
1264         * io.c (gfc_match_format): Likewise.
1265         (match_io): Likewise.
1266         * match.c (gfc_match_nullify): Likewise.
1267         * primary.c (match_string_constant): Likewise.
1268         (match_logical_constant): Likewise.
1269         (build_actual_constructor): Likewise.
1270         * resolve.c (build_default_init_expr): Likewise.
1271         * symbol.c (generate_isocbinding_symbol): Likewise.
1272         (gfc_build_class_symbol): Likewise.
1273         (gfc_find_derived_vtab): Likewise.
1274         * simplify.c (simplify_achar_char): Likewise.
1275         (gfc_simplify_adjustl): Likewise.
1276         (gfc_simplify_adjustr): Likewise.
1277         (gfc_simplify_and): Likewise.
1278         (gfc_simplify_bit_size): Likewise.
1279         (gfc_simplify_is_iostat_end): Likewise.
1280         (gfc_simplify_is_iostat_eor): Likewise.
1281         (gfc_simplify_isnan): Likewise.
1282         (simplify_bound): Likewise.
1283         (gfc_simplify_leadz): Likewise.
1284         (gfc_simplify_len_trim): Likewise.
1285         (gfc_simplify_logical): Likewise.
1286         (gfc_simplify_maxexponent): Likewise.
1287         (gfc_simplify_minexponent): Likewise.
1288         (gfc_simplify_new_line): Likewise.
1289         (gfc_simplify_null): Likewise.
1290         (gfc_simplify_or): Likewise.
1291         (gfc_simplify_precision): Likewise.
1292         (gfc_simplify_repeat): Likewise.
1293         (gfc_simplify_scan): Likewise.
1294         (gfc_simplify_size): Likewise.
1295         (gfc_simplify_trailz): Likewise.
1296         (gfc_simplify_trim): Likewise.
1297         (gfc_simplify_verify): Likewise.
1298         (gfc_simplify_xor): Likewise.
1299         * trans-io.c (build_dt): Likewise.
1300         (gfc_new_nml_name_expr): Removed.
1301
1302 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
1303
1304         * arith.h (gfc_constant_result): Removed prototype.
1305         * constructor.h (gfc_build_array_expr): Removed prototype.
1306         (gfc_build_structure_constructor_expr): Removed prototype.
1307         * gfortran.h (gfc_int_expr): Removed prototype.
1308         (gfc_logical_expr): Removed prototype.
1309         (gfc_get_array_expr): New prototype.
1310         (gfc_get_structure_constructor_expr): New prototype.
1311         (gfc_get_constant_expr): New prototype.
1312         (gfc_get_int_expr): New prototype.
1313         (gfc_get_logical_expr): New prototype.
1314         * arith.c (gfc_constant_result): Moved and renamed to
1315         expr.c (gfc_get_constant_expr). Fixed all callers.
1316         * constructor.c (gfc_build_array_expr): Moved and renamed to
1317         expr.c (gfc_get_array_expr). Split gfc_typespec argument to type
1318         and kind. Fixed all callers.
1319         (gfc_build_structure_constructor_expr): Moved and renamed to
1320         expr.c (gfc_get_structure_constructor_expr). Split gfc_typespec argument
1321         to type and kind. Fixed all callers.
1322         * expr.c (gfc_logical_expr): Renamed to ...
1323         (gfc_get_logical_expr): ... this. Added kind argument. Fixed all callers.
1324         (gfc_int_expr): Renamed to ...
1325         (gfc_get_int_expr): ... this. Added kind and where arguments. Fixed all
1326         callers.
1327         (gfc_get_constant_expr): New.
1328         (gfc_get_array_expr): New.
1329         (gfc_get_structure_constructor_expr): New.
1330         * simplify.c (int_expr_with_kind): Removed, callers use gfc_get_int_expr
1331         instead.
1332
1333 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
1334
1335         * constructor.h: New.
1336         * constructor.c: New.
1337         * Make-lang.in: Add new files to F95_PARSER_OBJS.
1338         * arith.c (reducy_unary): Use constructor API.
1339         (reduce_binary_ac): Likewise.
1340         (reduce_binary_ca): Likewise.
1341         (reduce_binary_aa): Likewise.
1342         * check.c (gfc_check_pack): Likewise.
1343         (gfc_check_reshape): Likewise.
1344         (gfc_check_unpack): Likewise.
1345         * decl.c (add_init_expr_to_sym): Likewise.
1346         (build_struct): Likewise.
1347         * dependency.c (gfc_check_dependency): Likewise.
1348         (contains_forall_index_p): Likewise.
1349         * dump-parse-tree.c (show_constructor): Likewise.
1350         * expr.c (free_expr0): Likewise.
1351         (gfc_copy_expr): Likewise.
1352         (gfc_is_constant_expr): Likewise.
1353         (simplify_constructor): Likewise.
1354         (find_array_element): Likewise.
1355         (find_component_ref): Likewise.
1356         (find_array_section): Likewise.
1357         (find_substring_ref): Likewise.
1358         (simplify_const_ref): Likewise.
1359         (scalarize_intrinsic_call): Likewise.
1360         (check_alloc_comp_init): Likewise.
1361         (gfc_default_initializer): Likewise.
1362         (gfc_traverse_expr): Likewise.
1363         * iresolve.c (check_charlen_present): Likewise.
1364         (gfc_resolve_reshape): Likewise.
1365         (gfc_resolve_transfer): Likewise.
1366         * module.c (mio_constructor): Likewise.
1367         * primary.c (build_actual_constructor): Likewise.
1368         (gfc_match_structure_constructor): Likewise.
1369         * resolve.c (resolve_structure_cons): Likewise.
1370         * simplify.c (is_constant_array_expr): Likewise.
1371         (init_result_expr): Likewise.
1372         (transformational_result): Likewise.
1373         (simplify_transformation_to_scalar): Likewise.
1374         (simplify_transformation_to_array): Likewise.
1375         (gfc_simplify_dot_product): Likewise.
1376         (simplify_bound): Likewise.
1377         (simplify_matmul): Likewise.
1378         (simplify_minval_maxval): Likewise.
1379         (gfc_simplify_pack): Likewise.
1380         (gfc_simplify_reshape): Likewise.
1381         (gfc_simplify_shape): Likewise.
1382         (gfc_simplify_spread): Likewise.
1383         (gfc_simplify_transpose): Likewise.
1384         (gfc_simplify_unpack): Likewise.q
1385         (gfc_convert_constant): Likewise.
1386         (gfc_convert_char_constant): Likewise.
1387         * target-memory.c (size_array): Likewise.
1388         (encode_array): Likewise.
1389         (encode_derived): Likewise.
1390         (interpret_array): Likewise.
1391         (gfc_interpret_derived): Likewise.
1392         (expr_to_char): Likewise.
1393         (gfc_merge_initializers): Likewise.
1394         * trans-array.c (gfc_get_array_constructor_size): Likewise.
1395         (gfc_trans_array_constructor_value): Likewise.
1396         (get_array_ctor_strlen): Likewise.
1397         (gfc_constant_array_constructor_p): Likewise.
1398         (gfc_build_constant_array_constructor): Likewise.
1399         (gfc_trans_array_constructor): Likewise.
1400         (gfc_conv_array_initializer): Likewise.
1401         * trans-decl.c (check_constant_initializer): Likewise.
1402         * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
1403         (gfc_apply_interface_mapping_to_cons): Likewise.
1404         (gfc_trans_structure_assign): Likewise.
1405         (gfc_conv_structure): Likewise.
1406         * array.c (check_duplicate_iterator): Likewise.
1407         (match_array_list): Likewise.
1408         (match_array_cons_element): Likewise.
1409         (gfc_match_array_constructor): Likewise.
1410         (check_constructor_type): Likewise.
1411         (check_constructor): Likewise.
1412         (expand): Likewise.
1413         (expand_constructor): Likewise.
1414         (extract_element): Likewise.
1415         (gfc_expanded_ac): Likewise.
1416         (resolve_array_list): Likewise.
1417         (gfc_resolve_character_array_constructor): Likewise.
1418         (copy_iterator): Renamed to ...
1419         (gfc_copy_iterator): ... this.
1420         (gfc_append_constructor): Removed.
1421         (gfc_insert_constructor): Removed unused function.
1422         (gfc_get_constructor): Removed.
1423         (gfc_free_constructor): Removed.
1424         (qgfc_copy_constructor): Removed.
1425         * gfortran.h (struct gfc_expr): Removed member 'con_by_offset'.
1426         Removed all references. Replaced constructor list by splay-tree.
1427         (struct gfc_constructor): Removed member 'next', moved 'offset' from
1428         the inner struct, added member 'base'.
1429         (gfc_append_constructor): Removed prototype.
1430         (gfc_insert_constructor): Removed prototype.
1431         (gfc_get_constructor): Removed prototype.
1432         (gfc_free_constructor): Removed prototype.
1433         (qgfc_copy_constructor): Removed prototype.
1434         (gfc_copy_iterator): New prototype.
1435         * trans-array.h (gfc_constant_array_constructor_p): Adjusted prototype.
1436
1437 2010-04-10  Tobias Burnus  <burnus@net-b.de>
1438
1439         PR fortran/43591
1440         * expr.c (gfc_is_constant_expr, gfc_traverse_expr): Handle
1441         proc-pointers and type-bound procedures.
1442         (gfc_specification_expr): Check proc-pointers for pureness.
1443
1444 2010-04-09  Iain Sandoe  <iains@gcc.gnu.org>
1445
1446         PR bootstrap/43684
1447         * gfortranspec.c (lang_specific_driver): Do not expose vars 
1448         only used by HAVE_LD_STATIC_DYNAMIC targets unless compiling
1449         for such.
1450
1451 2010-04-09  Tobias Burnus  <burnus@net-b.de>
1452
1453         PR fortran/18918
1454         * decl.c (variable_decl, match_attr_spec): Fix setting the array
1455         spec.
1456         * array.c (match_subscript,gfc_match_array_ref): Add coarray support.
1457         * data.c (gfc_assign_data_value): Ditto.
1458         * expr.c (gfc_check_pointer_assign): Add check for coarray constraint.
1459         (gfc_traverse_expr): Traverse also through codimension expressions.
1460         (gfc_is_coindexed, gfc_has_ultimate_allocatable,
1461         gfc_has_ultimate_pointer): New functions.
1462         * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_STAR for coarrays.
1463         (gfc_array_ref): Add codimen.
1464         (gfc_array_ref): Add in_allocate.
1465         (gfc_is_coindexed, gfc_has_ultimate_allocatable,
1466         gfc_has_ultimate_pointer): Add prototypes.
1467         * interface.c (compare_parameter, compare_actual_formal,
1468         check_intents): Add coarray constraints.
1469         * match.c (gfc_match_iterator): Add coarray constraint.
1470         * match.h (gfc_match_array_ref): Update interface.
1471         * primary.c (gfc_match_varspec): Handle codimensions.
1472         * resolve.c (coarray_alloc, inquiry_argument): New static variables.
1473         (check_class_members): Return gfc_try instead for error recovery.
1474         (resolve_typebound_function,resolve_typebound_subroutine,
1475         check_members): Handle return value of check_class_members.
1476         (resolve_structure_cons, resolve_actual_arglist, resolve_function,
1477         check_dimension, compare_spec_to_ref, resolve_array_ref,
1478         resolve_ref, resolve_variable, gfc_resolve_expr, conformable_arrays,
1479         resolve_allocate_expr, resolve_ordinary_assign): Add coarray
1480         support.
1481         * trans-array.c (gfc_conv_array_ref, gfc_walk_variable_expr):
1482         Skip over coarray refs.
1483         (gfc_array_allocate) Add support for references containing coindexes.
1484         * trans-expr.c (gfc_add_interface_mapping): Copy coarray attribute.
1485         (gfc_map_intrinsic_function): Ignore codimensions.
1486
1487 2010-04-08  Bud Davis  <bdavis9659@sbcglobal.net>
1488
1489         PR fortran/28039
1490         * io.c (check_format_string):  Added check for additional non 
1491         blank characters after the format string was successfully 
1492         parsed.
1493         * io.c (check_format): Changed the error messages for positive
1494         int required and period required to drop through the error logic
1495         and report with gfc_error instead of gfc_error_now.  Corrected
1496         format postion for hollerith strings.
1497
1498 2010-04-08  Tobias Burnus  <burnus@net-b.de>
1499
1500         * module.c (use_iso_fortran_env_module): Fix standard check.
1501
1502 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
1503
1504         * parse.c (parse_derived, parse_enum): Avoid set but not used
1505         warning.
1506
1507 2010-04-07  Janne Blomqvist  <jb@gcc.gnu.org>
1508
1509         PR fortran/40539
1510         * gfortran.texi: Add section about representation of
1511         LOGICAL variables.
1512
1513 2010-04-07  Simon Baldwin  <simonb@google.com>
1514
1515         * cpp.c (cb_cpp_error): Add warning reason argument, set a value
1516         for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE.
1517
1518 2010-04-07  Richard Guenther  <rguenther@suse.de>
1519
1520         * options.c (gfc_init_options): Do not set.
1521
1522 2010-04-06  Tobias Burnus  <burnus@net-b.de>
1523
1524         PR fortran/18918
1525         * array.c (gfc_match_array_spec): Add error for -fcoarray=none.
1526         * match.c (gfc_match_critical, sync_statement): Ditto.
1527         * gfortran.h (gfc_fcoarray): New enum.
1528         (gfc_option_t): Use it.
1529         * lang.opt (fcoarray): Add new flag.
1530         * invoke.texi (fcoarray): Document it.
1531         * options.c (gfc_init_options,gfc_handle_option): Handle -fcoarray=.
1532         (gfc_handle_coarray_option): New function.
1533
1534 2010-04-06  Tobias Burnus  <burnus@net-b.de>
1535
1536         PR fortran/18918
1537         * gfortran.h (gfc_array_spec): Add cotype.
1538         * array.c (gfc_match_array_spec,gfc_set_array_spec): Use it
1539         and defer error diagnostic.
1540         * resolve.c (resolve_fl_derived): Add missing check.
1541         (resolve_symbol): Add cotype/type check.
1542         * parse.c (parse_derived): Fix setting of coarray_comp.
1543
1544 2010-04-06  Tobias Burnus  <burnus@net-b.de>
1545
1546         PR fortran/18918
1547         * array.c (gfc_free_array_spec,gfc_resolve_array_spec,
1548         match_array_element_spec,gfc_copy_array_spec,
1549         gfc_compare_array_spec): Include corank.
1550         (match_array_element_spec,gfc_set_array_spec): Support codimension.
1551         * decl.c (build_sym,build_struct,variable_decl,
1552         match_attr_spec,attr_decl1,cray_pointer_decl,
1553         gfc_match_volatile): Add codimension.
1554         (gfc_match_codimension): New function.
1555         * dump-parse-tree.c (show_array_spec,show_attr): Support codimension.
1556         * gfortran.h (symbol_attribute,gfc_array_spec): Ditto.
1557         (gfc_add_codimension): New function prototype.
1558         * match.h (gfc_match_codimension): New function prototype.
1559         (gfc_match_array_spec): Update prototype
1560         * match.c (gfc_match_common): Update gfc_match_array_spec call.
1561         * module.c (MOD_VERSION): Bump.
1562         (mio_symbol_attribute): Support coarray attributes.
1563         (mio_array_spec): Add corank support.
1564         * parse.c (decode_specification_statement,decode_statement,
1565         parse_derived): Add coarray support.
1566         * resolve.c (resolve_formal_arglist, was_declared,
1567         is_non_constant_shape_array, resolve_fl_variable,
1568         resolve_fl_derived, resolve_symbol): Add coarray support.
1569         * symbol.c (check_conflict, gfc_add_volatile, gfc_copy_attr,
1570         gfc_build_class_symbol): Add coarray support.
1571         (gfc_add_codimension): New function.
1572
1573 2010-04-06  Tobias Burnus  <burnus@net-b.de>
1574
1575         PR fortran/18918
1576         * iso-fortran-env.def: Add the integer parameters atomic_int_kind,
1577         atomic_logical_kind, iostat_inquire_internal_unit, stat_locked,
1578         stat_locked_other_image, stat_stopped_image and stat_unlocked of
1579         Fortran 2008.
1580         * intrinsic.texi (iso_fortran_env): Ditto.
1581         * libgfortran.h (libgfortran_stat_codes): New enum.
1582         * module.c (use_iso_fortran_env_module): Honour -std= when loading
1583         constants from the intrinsic module.
1584
1585 2010-04-06  Tobias Burnus  <burnus@net-b.de>
1586
1587         PR fortran/39997
1588         * intrinsic.c (add_functions): Add num_images.
1589         * decl.c (gfc_match_end): Handle END CRITICAL.
1590         * intrinsic.h (gfc_simplify_num_images): Add prototype.
1591         * dump-parse-tree.c (show_code_node): Dump CRITICAL, ERROR STOP,
1592         and SYNC.
1593         * gfortran.h (gfc_statement): Add enum items for those.
1594         (gfc_exec_op) Ditto.
1595         (gfc_isym_id): Add num_images.
1596         * trans-stmt.c (gfc_trans_stop): Handle ERROR STOP.
1597         (gfc_trans_sync,gfc_trans_critical): New functions.
1598         * trans-stmt.h (gfc_trans_stop,gfc_trans_sync,
1599         gfc_trans_critical): Add/update prototypes.
1600         * trans.c (gfc_trans_code): Handle CRITICAL, ERROR STOP,
1601         and SYNC statements.
1602         * trans.h (gfor_fndecl_error_stop_string) Add variable.
1603         * resolve.c (resolve_sync): Add function.
1604         (gfc_resolve_blocks): Handle CRITICAL.
1605         (resolve_code): Handle CRITICAL, ERROR STOP,
1606         (resolve_branch): Add CRITICAL constraint check.
1607         and SYNC statements.
1608         * st.c (gfc_free_statement): Add new statements.
1609         * trans-decl.c (gfor_fndecl_error_stop_string): Global variable.
1610         (gfc_build_builtin_function_decls): Initialize it.
1611         * match.c (gfc_match_if): Handle ERROR STOP and SYNC.
1612         (gfc_match_critical, gfc_match_error_stop, sync_statement,
1613         gfc_match_sync_all, gfc_match_sync_images, gfc_match_sync_memory):
1614         New functions.
1615         (match_exit_cycle): Handle CRITICAL constraint.
1616         (gfc_match_stopcode): Handle ERROR STOP.
1617         * match.h (gfc_match_critical, gfc_match_error_stop,
1618         gfc_match_sync_all, gfc_match_sync_images,
1619         gfc_match_sync_memory): Add prototype.
1620         * parse.c (decode_statement, gfc_ascii_statement,
1621         parse_executable): Handle new statements.
1622         (parse_critical_block): New function.
1623         * parse.h (gfc_compile_state): Add COMP_CRITICAL.
1624         * intrinsic.texi (num_images): Document new function.
1625         * simplify.c (gfc_simplify_num_images): Add function.
1626
1627 2010-04-06  Tobias Burnus  <burnus@net-b.de>
1628
1629         PR fortran/43178
1630         * trans-array.c (gfc_conv_expr_descriptor): Update
1631         gfc_trans_scalar_assign call.
1632         (has_default_initializer): New function.
1633         (gfc_trans_deferred_array): Nullify less often.
1634         * trans-expr.c (gfc_conv_subref_array_arg,
1635         gfc_trans_subcomponent_assign): Update call to
1636         gfc_trans_scalar_assign.
1637         (gfc_trans_scalar_assign): Add parameter and pass it on.
1638         (gfc_trans_assignment_1): Optionally, do not dealloc before
1639         assignment.
1640         * trans-openmp.c (gfc_trans_omp_array_reduction): Update
1641         call to gfc_trans_scalar_assign.
1642         * trans-decl.c (gfc_get_symbol_decl): Do not always apply
1643         initializer to static variables.
1644         (gfc_init_default_dt): Add dealloc parameter and pass it on.
1645         * trans-stmt.c (forall_make_variable_temp,
1646         generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
1647         gfc_trans_forall_1, gfc_trans_where_assign, gfc_trans_where_3
1648         gfc_trans_allocate): Update gfc_trans_assignment call.
1649         * trans.h (gfc_trans_scalar_assign, gfc_init_default_dt,
1650         gfc_init_default_dt, gfc_trans_assignment): Add bool dealloc
1651         parameter to prototype.
1652
1653 2010-03-31  Paul Thomas  <pault@gcc.gnu.org>
1654
1655         * ioparm.def : Update copyright.
1656         * lang.opt : ditto
1657         * trans-array.c : ditto
1658         * trans-array.h : ditto
1659         * expr.c: ditto
1660         * trans-types.c: ditto
1661         * dependency.c : ditto
1662         * gfortran.h : ditto
1663         * options.c : ditto
1664         * trans-io.c : ditto
1665         * trans-intrinsic.c : ditto
1666         * libgfortran.h : ditto
1667         * invoke.texi : ditto
1668         * intrinsic.texi : ditto
1669         * trans.c : ditto
1670         * trans.h : ditto
1671         * intrinsic.c : ditto
1672         * interface.c : ditto
1673         * iresolve.c : ditto
1674         * trans-stmt.c : ditto
1675         * trans-stmt.h : ditto
1676         * parse,c : ditto
1677         * match.h : ditto
1678         * error.c : ditto
1679
1680 2010-03-20  Paul Thomas  <pault@gcc.gnu.org>
1681
1682         PR fortran/43450
1683         * trans-decl.c (gfc_create_module_variable): With -fwhole-file
1684         do not assert the context of derived types.
1685
1686 2010-03-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1687
1688         PR fortran/43409
1689         * ioparm.def: Change inquire size variable to type pointer to
1690         GFC_IO_INT type.
1691
1692 2010-03-18  Paul Thomas  <pault@gcc.gnu.org>
1693
1694         PR fortran/43039
1695         * trans-expr.c (conv_parent_component_references): Ensure that
1696         'dt' has a backend_decl.
1697
1698         PR fortran/43043
1699         * trans-expr.c (gfc_conv_structure): Ensure that the derived
1700         type has a backend_decl.
1701
1702         PR fortran/43044
1703         * resolve.c (resolve_global_procedure): Check that the 'cl'
1704         structure is not NULL.
1705
1706 2010-03-18  Shujing Zhao  <pearly.zhao@oracle.com>
1707
1708         * lang.opt (-ffixed-line-length-, ffree-line-length-): Remove
1709         redundant tab.
1710
1711 2010-03-17  Tobias Burnus  <burnus@net-b.de>
1712
1713         PR fortran/43331
1714         * trans-array.c (gfc_conv_array_index_offset,gfc_conv_array_ref,
1715         gfc_conv_ss_startstride): Remove no-longer-needed cp_was_assumed
1716         check.
1717         * decl.c (gfc_match_derived_decl): Don't mark assumed-size Cray
1718         pointees as having explizit size.
1719         * expr.c (gfc_check_assign): Remove now unreachable Cray pointee
1720         check.
1721         * trans-types.c (gfc_is_nodesc_array): Add cp_was_assumed to assert.
1722         (gfc_sym_type): Don't mark Cray pointees as restricted pointers.
1723         * resolve.c (resolve_symbol): Handle cp_was_assumed.
1724         * trans-decl.c (gfc_trans_deferred_vars): Ditto.
1725         (gfc_finish_var_decl): Don't mark Cray pointees as restricted
1726         pointers.
1727
1728 2010-03-14  Tobias Burnus  <burnus@net-b.de>
1729
1730         PR fortran/43362
1731         * resolve.c (resolve_structure_cons): Add missing PURE constraint.
1732         (resolve_ordinary_assign): Add check to avoid segfault.
1733
1734 2010-03-12  Paul Thomas  <pault@gcc.gnu.org>
1735
1736         PR fortran/43291
1737         PR fortran/43326
1738         * resolve.c (resolve_compcall): Add new boolean dummy argument
1739         'class_members'. Only resolve expression at end if false.
1740         Remove redundant, static variable 'class_object'.
1741         (check_class_members): Add extra argument to call of
1742         resolve_compcall.
1743         (resolve_typebound_function): Renamed resolve_class_compcall.
1744         Do all the detection of class references here. Correct calls to
1745         resolve_compcall for extra argument.
1746         (resolve_typebound_subroutine): resolve_class_typebound_call
1747         renamed. Otherwise same as resolve_typebound_function.
1748         (gfc_resolve_expr): Call resolve_typebound_function.
1749         (resolve_code): Call resolve_typebound_subroutine.
1750
1751 2010-03-10  Tobias Burnus  <burnus@net-b.de
1752
1753         PR fortran/43303
1754         * symbol.c (get_iso_c_sym): Set sym->result.
1755
1756 2010-03-08  Janus Weil  <janus@gcc.gnu.org>
1757
1758         PR fortran/43256
1759         * resolve.c (resolve_compcall): Don't set 'value.function.name' here
1760         for TBPs, otherwise they will not be resolved properly.
1761         (resolve_function): Use 'value.function.esym' instead of
1762         'value.function.name' to check if we're dealing with a TBP.
1763         (check_class_members): Set correct type of passed object for all TBPs,
1764         not only generic ones, except if the type is abstract.
1765
1766 2010-03-04  Janus Weil  <janus@gcc.gnu.org>
1767
1768         PR fortran/43244
1769         * decl.c (gfc_match_final_decl): Make sure variable names starting with
1770         'final...' are not misinterpreted as FINAL statements.
1771
1772 2010-03-03  Paul Thomas  <pault@gcc.gnu.org>
1773
1774         PR fortran/43243
1775         * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
1776         allocatable ultimate components do not need temporaries, whilst
1777         ultimate pointer components do.
1778
1779 2010-03-03  Janus Weil  <janus@gcc.gnu.org>
1780
1781         PR fortran/43169
1782         * resolve.c (resolve_code): Correctly set gfc_current_ns for
1783         EXEC_SELECT_TYPE.
1784         (gfc_impure_variable): Make it work with sub-namespaces (BLOCK etc).
1785         (gfc_pure): Ditto.
1786
1787 2010-03-02  Paul Thomas  <pault@gcc.gnu.org>
1788
1789         PR fortran/43180
1790         * trans-array.c (gfc_conv_array_parameter): A full array of
1791         derived type need not be restricted to a symbol without an
1792         array spec to use the call to gfc_conv_expr_descriptor.
1793
1794         PR fortran/43173
1795         * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
1796         allocatable arrays do not need temporaries.
1797
1798 2010-03-01  Tobias Burnus  <burnus@net-b.de>
1799
1800         PR fortran/43199
1801         * resolve.c (find_array_spec): Handle REF_COMPONENT with
1802         CLASS components.
1803
1804 2010-02-28  Tobias Burnus  <burnus@net-b.de>
1805
1806         PR fortran/43205
1807         * trans-expr.c (is_zero_initializer_p): Move up in the file.
1808         (gfc_conv_initializer): Handle zero initializer as special case.
1809
1810 2010-02-27  Tobias Burnus  <burnus@net-b.de>
1811
1812         PR fortran/43185
1813         * resolve.c (resolve_fl_variable_derived): Imply SAVE
1814         for module variables for Fortran 2008.
1815
1816 2010-02-25  Jakub Jelinek  <jakub@redhat.com>
1817
1818         PR debug/43166
1819         * trans-common.c (build_common_decl): Also update DECL_MODE,
1820         and DECL_SIZE when encountering a larger common block and call
1821         layout_decl.
1822
1823 2010-02-24  Tobias Burnus  <burnus@net-b.de>
1824
1825         PR fortran/43042
1826         * trans-expr.c (gfc_conv_initializer): Call directly
1827         gfc_conv_constant for C_NULL_(FUN)PTR.
1828
1829 2010-02-22  Paul Thomas  <pault@gcc.gnu.org>
1830
1831         PR fortran/43072
1832         * dependency.c (gfc_full_array_ref_p): Check for contiguous by
1833         checking the rest of the dimensions for elements.
1834
1835 2010-02-21  Tobias Burnus  <burnus@net-b.de>
1836
1837         PR fortran/35259
1838         * gfortran.h (gfc_option_t): New flag -fprotect-parens.
1839         * lang.opt: Ditto.
1840         * option.c (gfc_init_options,gfc_handle_option): Ditto.
1841         * trans-expr.c (gfc_conv_expr_op): Use the flag.
1842         * invoke.texi: Document new -fno-protect-parens flag.
1843
1844 2010-02-20  Paul Thomas  <pault@gcc.gnu.org>
1845
1846         PR fortran/36932
1847         PR fortran/36933
1848         PR fortran/43072
1849         PR fortran/43111
1850         * dependency.c (gfc_check_argument_var_dependency): Use enum
1851         value instead of arithmetic vaue for 'elemental'.
1852         (check_data_pointer_types): New function.
1853         (gfc_check_dependency): Call check_data_pointer_types.
1854         * trans-array.h : Change fourth argument of
1855         gfc_conv_array_parameter to boolean.
1856         * trans-array.c (gfc_conv_array_parameter): A contiguous array
1857         can be a dummy but it must not be assumed shape or deferred.
1858         Change fourth argument to boolean. Array constructor exprs will
1859         always be contiguous and do not need packing and unpacking.
1860         * trans-expr.c (gfc_conv_procedure_call): Clean up some white
1861         space and change fourth argument of gfc_conv_array_parameter
1862         to boolean.
1863         (gfc_trans_arrayfunc_assign): Change fourth argument of
1864         gfc_conv_array_parameter to boolean.
1865         * trans-io.c (gfc_convert_array_to_string): The same.
1866         * trans-intrinsic.c (gfc_conv_intrinsic_loc): The same.
1867
1868 2010-02-20  Tobias Burnus  <burnus@net-b.de>
1869
1870         PR fortran/42958
1871         * libgfortran.h: Add GFC_RTCHECK_MEM.
1872         * invoke.texi (-fcheck=): Document -fcheck=mem.
1873         * tranc.c (gfc_call_malloc): Remove negative-size run-time error
1874         and enable malloc-success check only with -fcheck=mem.
1875         * option.c (gfc_handle_runtime_check_option): Add -fcheck=mem.
1876
1877 2010-02-16  Tobias Burnus  <burnus@net-b.de>
1878
1879         PR fortran/43040
1880         * gfortran.h (gfc_isym_id): Rename GFS_ISYM_GAMMA to GFS_ISYM_TGAMMA.
1881         * intrinsic.c (add_functions): Ditto.
1882         * iresolve.c (gfc_resolve_gamma): Call tgamma instead of gamma.
1883         * mathbuiltins.def: Use TGAMMA instead of GAMMA with "tgamma".
1884
1885 2010-02-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1886
1887         PR fortran/32382
1888         * trans-stmt.h: Add prototype for gfc_trans_code_cond. Add tree cond to
1889         gfc_trans_do prototype.
1890         * trans-stmt.c (gfc_trans_simple_do): Add optional argument to pass in
1891         a loop exit condition.  If exit condition is given, build the loop exit
1892         code, checking IO results of implied do loops in READ and WRITE.
1893         (gfc_trans_do): Likewise.
1894         * trans.c (trans_code): New static work function, previously
1895         gfc_trans_code. Passes exit condition to gfc_trans_do.
1896         (gfc_trans_code): Calls trans_code with NULL_TREE condition.
1897         (gfc_trans_code_cond): Calls trans_code with loop exit condition.
1898         * trans-io.c (build_dt): Build an exit condition to allow checking IO
1899         result status bits in the dtparm structure. Use this condition in call
1900         to gfc_trans_code_cond.
1901
1902 2010-02-13  Paul Thomas  <pault@gcc.gnu.org>
1903
1904         PR fortran/41113
1905         PR fortran/41117
1906         * trans-array.c (gfc_conv_array_parameter): Use
1907         gfc_full_array_ref_p to detect full and contiguous variable
1908         arrays. Full array components and contiguous arrays do not need
1909         internal_pack and internal_unpack.
1910
1911 2010-02-11  Jakub Jelinek  <jakub@redhat.com>
1912
1913         PR fortran/43030
1914         * resolve.c (gfc_resolve_dim_arg): Call gfc_clear_ts.
1915
1916         PR fortran/43029
1917         * decl.c (enumerator_decl): Don't call gfc_free_enum_history
1918         here.
1919         (gfc_match_enumerator_def): But here whenever enumerator_decl returns
1920         MATCH_ERROR.
1921
1922 2010-02-10  Joost VandeVondele <jv244@cam.ac.uk>
1923             Tobias Burnus <burnus@net-b.de>
1924
1925         PR fortran/40823
1926         * decl.c (gfc_match_subroutine): Explicitly set sym->declared_at.
1927
1928 2010-02-10  Tobias Burnus  <burnus@net-b.de>
1929
1930         PR fortran/43015
1931         * trans-decl.c (gfc_generate_function_code): Only check
1932         actual-vs.-dummy character bounds if not bind(C).
1933
1934 2010-02-10  Jakub Jelinek  <jakub@redhat.com>
1935
1936         PR fortran/42309
1937         * trans-expr.c (gfc_conv_subref_array_arg): Avoid accessing
1938         info->dimen after info has been freed.
1939
1940 2010-02-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1941
1942         PR fortran/42999
1943         * array.c (gfc_constant_ac): Do not prevent expansion of constructors
1944         with iterators.
1945
1946 2010-02-09  Jakub Jelinek  <jakub@redhat.com>
1947
1948         * module.c (fix_mio_expr): Declare sym.
1949
1950 2010-02-09  Paul Thomas  <pault@gcc.gnu.org>
1951
1952         PR fortran/41869
1953         * module.c (fix_mio_expr): Fix for private generic procedures.
1954
1955 2010-02-09  Daniel Kraft  <d@domob.eu>
1956
1957         PR fortran/39171
1958         * resolve.c (resolve_charlen): Change warning about negative CHARACTER
1959         length to be correct and issue only with -Wsurprising.
1960         * invoke.texi (Wsurprising): Mention this new warning that is
1961         turned on by -Wsurprising.
1962
1963 2010-02-09  Daniel Kraft  <d@domob.eu>
1964
1965         PR fortran/41507
1966         * intrinsic.texi (MAXVAL): Remove wrong claim that array argument
1967         can be CHARACTER type.
1968         (MINVAL), (MAXLOC), (MINLOC): Ditto.
1969
1970 2010-02-05  Paul Thomas  <pault@gcc.gnu.org>
1971
1972         PR fortran/42309
1973         * trans-expr.c (gfc_conv_subref_array_arg): Add new argument
1974         'formal_ptr'. If this is true, give returned descriptor unity
1975         lbounds, in all dimensions, and the appropriate offset.
1976         (gfc_conv_procedure_call); If formal is a pointer, set the last
1977         argument of gfc_conv_subref_array_arg to true.
1978         * trans.h : Add last argument for gfc_conv_subref_array_arg.
1979         * trans-io.c (set_internal_unit, gfc_trans_transfer): Set the
1980         new arg of gfc_conv_subref_array_arg to false.
1981         * trans-stmt.c (forall_make_variable_temp): The same.
1982
1983 2010-02-03  Tobias Burnus  <burnus@net-b.de>
1984
1985         PR fortran/42936
1986         * interface.c (compare_parameter): Disable rank-checking
1987         for NULL().
1988
1989 2010-02-02  Tobias Burnus  <burnus@net-b.de>
1990
1991         PR fortran/42650
1992         * parse.c (decode_specification_statement): Use sym->result not sym.
1993
1994 2010-02-01  Tobias Burnus  <burnus@net-b.de>
1995
1996         PR fortran/42922
1997         * decl.c (variable_decl): Allow default initializer in
1998         TYPE declarations in PURE functions.
1999
2000 2010-01-31  Janus Weil  <janus@gcc.gnu.org>
2001
2002         PR fortran/42888
2003         * resolve.c (resolve_allocate_expr): Move default initialization code
2004         here from gfc_trans_allocate.
2005         * trans.c (gfc_trans_code): Call gfc_trans_class_assign also for
2006         EXEC_INIT_ASSIGN.
2007         * trans-expr.c (gfc_trans_class_assign): Handle default initialization
2008         of CLASS variables via memcpy.
2009         * trans-stmt.c (gfc_trans_allocate): Move default initialization code
2010         to resolve_allocate_expr.
2011
2012 2010-01-31  Paul Thomas  <pault@gcc.gnu.org>
2013
2014         PR fortran/38324
2015         * expr.c (gfc_get_full_arrayspec_from_expr): New function.
2016         * gfortran.h : Add prototype for above.
2017         * trans-expr.c (gfc_trans_alloc_subarray_assign): New function.
2018         (gfc_trans_subcomponent_assign): Call new function to replace
2019         the code to deal with allocatable components.
2020         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Call
2021         gfc_get_full_arrayspec_from_expr to replace existing code.
2022
2023 2010-01-25  Tobias Burnus  <burnus@net-b.de>
2024
2025         PR fortran/42858
2026         * array.c (gfc_array_dimen_size): Fix intrinsic procedure
2027         check.
2028
2029 2010-01-24  Paul Thomas  <pault@gcc.gnu.org>
2030
2031         PR fortran/41044
2032         PR fortran/41167
2033         * expr.c (remove_subobject_ref): If the constructor is NULL use
2034         the expression as the source.
2035         (simplify_const_ref): Change the type of expression if
2036         there are component references.  Allow for substring to be at
2037         the end of an arbitrarily long chain of references.  If an
2038         element is found that is not in an EXPR_ARRAY, assume that this
2039         is scalar initialization of array. Call remove_subobject_ref in
2040         this case with NULL second argument.
2041
2042 2010-01-24  Tobias Burnus  <burnus@net-b.de>
2043
2044         PR fortran/39304
2045         * array.c (gfc_array_dimen_size): Use correct specific
2046         function in the check.
2047
2048 2010-01-21  Paul Thomas  <pault@gcc.gnu.org>
2049
2050         PR fortran/42736
2051         * trans-stmt.c (gfc_conv_elemental_dependencies): If temporary
2052         is required, turn any trailing array elements after a range
2053         into ranges so that offsets can be calculated.
2054
2055 2010-01-20  Joern Rennecke  <amylaar@spamcop.net>
2056
2057         * module.c (mio_f2k_derived): Use enumerator as initializer of
2058         enum variable.
2059
2060         PR bootstrap/42812
2061         * gfortran.h  (struct gfc_namespace) <resolved>: Change to signed
2062         bitfield of width 2.
2063
2064 2010-01-19  Janus Weil  <janus@gcc.gnu.org>
2065
2066         PR fortran/42804
2067         * resolve.c (extract_compcall_passed_object): Set locus for
2068         passed-object argument.
2069         (extract_ppc_passed_object): Set locus and correctly remove PPC
2070         reference.
2071
2072 2010-01-19  Paul Thomas  <pault@gcc.gnu.org>
2073
2074         PR fortran/42783
2075         * trans-decl.c (add_argument_checking): Do not use the backend
2076         decl directly to test for the presence of an optional dummy
2077         argument.  Use gfc_conv_expr_present, remembering to set the
2078         symbol referenced.
2079
2080         PR fortran/42772
2081         * trans-decl.c (gfc_generate_function_code): Small white space
2082         changes. If 'recurcheckvar' is NULL do not try to reset it.
2083
2084 2010-01-19  Janus Weil  <janus@gcc.gnu.org>
2085
2086         PR fortran/42545
2087         * resolve.c (resolve_fl_derived): Set the accessibility of the parent
2088         component for extended types.
2089         * symbol.c (gfc_find_component): Remove a wrongly-worded error message
2090         and take care of parent component accessibility.
2091
2092 2010-01-17  Janus Weil  <janus@gcc.gnu.org>
2093
2094         PR fortran/42677
2095         * gfortran.h (symbol_attribute): Remove 'ambiguous_interfaces'.
2096         * interface.c (check_interface1): Move a warning message here from
2097         resolve_fl_procedure.
2098         (check_sym_interfaces): Removed 'attr.ambiguous_interfaces'.
2099         * module.c (read_module): Remove call to gfc_check_interfaces, since
2100         this comes too early here.
2101         * resolve.c (resolve_fl_procedure): Move warning message to
2102         check_interface1.
2103
2104 2010-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2105
2106         PR fortran/42684
2107         * interface.c (check_interface1): Pass symbol name rather than NULL to
2108         gfc_compare_interfaces. (gfc_compare_interfaces): Add assert to
2109         trap MULL.
2110         * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
2111         than NULL to gfc_compare_interfaces.
2112
2113 2010-01-14  Paul Thomas  <pault@gcc.gnu.org>
2114
2115         PR fortran/41478
2116         * trans-array.c (duplicate_allocatable):  Static version of
2117         gfc_duplicate_allocatable with provision to handle scalar
2118         components. New boolean argument to switch off call to malloc
2119         if true.
2120         (gfc_duplicate_allocatable): New function to call above with
2121         new argument false.
2122         (gfc_copy_allocatable_data): New function to call above with
2123         new argument true.
2124         (structure_alloc_comps): Do not apply indirect reference to
2125         scalar pointers. Add new section to copy allocatable components
2126         of arrays. Extend copying of allocatable components to include
2127         scalars.
2128         (gfc_copy_only_alloc_comp): New function to copy allocatable
2129         component derived types, without allocating the base structure.
2130         * trans-array.h : Add primitive for gfc_copy_allocatable_data.
2131         Add primitive for gfc_copy_only_alloc_comp.
2132         * trans-expr.c (gfc_conv_procedure_call): After calls to
2133         transformational functions with results that are derived types
2134         with allocatable components, copy the components in the result.
2135         (gfc_trans_arrayfunc_assign): Deallocate allocatable components
2136         of lhs derived types before allocation.
2137         
2138 2010-01-14  Paul Thomas  <pault@gcc.gnu.org>
2139
2140         PR fortran/42481
2141         * module.c (load_generic_interfaces): If a procedure that is
2142         use associated but not generic is given an interface that
2143         includes itself, then make it generic.
2144
2145 2010-01-11  Joseph Myers  <joseph@codesourcery.com>
2146             Shujing Zhao  <pearly.zhao@oracle.com>
2147
2148         PR translation/42469
2149         * lang.opt (fblas-matmul-limit=, finit-character=, finit-integer=,
2150         finit-logical=, finit-real=, fmax-array-constructor=): Use tab
2151         character between option name and help text.
2152
2153 2010-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2154
2155         PR fortran/20923
2156         PR fortran/32489
2157         * trans-array.c (gfc_conv_array_initializer): Change call to
2158         gfc_error_now to call to gfc_fatal_error.
2159         * array.c (count_elements): Whitespace. (extract_element): Whitespace.
2160         (is_constant_element): Changed name from constant_element.
2161         (gfc_constant_ac): Only use expand_construuctor for expression
2162         types of EXPR_ARRAY.  If expression type is EXPR_CONSTANT, no need to
2163         call gfc_is_constant_expr.
2164         * expr.c (gfc_reduce_init_expr): Adjust conditionals and delete error
2165         message.
2166         * resolve.c (gfc_is_expandable_expr): New function that determiners if
2167         array expressions should have their constructors expanded.
2168         (gfc_resolve_expr): Use new function to determine whether or not to call
2169         gfc_expand_constructor.
2170
2171 2010-01-09  Tobias Burnus  <burnus@net-b.de>
2172
2173         PR fortran/41298
2174         * trans-expr.c (gfc_trans_structure_assign): Handle
2175         c_null_(fun)ptr.
2176         * symbol.c (gen_special_c_interop_ptr): Add NULL_EXPR
2177         to the constructor for c_null_(fun)ptr.
2178         * resolve.c (resolve_structure_cons): Add special case
2179         for c_null_(fun)ptr.
2180
2181 2010-01-09  Jakub Jelinek  <jakub@redhat.com>
2182
2183         * gfortranspec.c (lang_specific_driver): Update copyright notice
2184         dates.
2185
2186 2010-01-08  Tobias Burnus  <burnus@net-b.de>
2187
2188         PR/fortran 25829
2189         * symbol.c (check_conflict, gfc_copy_attr): Add
2190         ASYNCHRONOUS support.
2191         (gfc_add_asynchronous): New function.
2192         * decl.c (match_attr_spec): Add ASYNCHRONOUS support.
2193         (gfc_match_asynchronous): New function.
2194         * dump-parse-tree.c (show_attr): Add ASYNCHRONOUS support.
2195         * gfortran.h (symbol_attribute): New ASYNCHRONOUS bit.
2196         (gfc_add_asynchronous): New Prototype.
2197         * module.c (ab_attribute, mio_symbol_attribute): Add
2198         ASYNCHRONOUS support.
2199         * resolve.c (was_declared): Ditto.
2200         * match.h (gfc_match_asynchronous): New prototype.
2201         * parse.c (decode_specification_statement,decode_statement):
2202         Add ASYNCHRONOUS support.
2203
2204 2010-01-07  Tobias Burnus  <burnus@net-b.de>
2205
2206         PR fortran/42597
2207         * trans-decl.c (get_proc_pointer_decl): Fix call to
2208         gfc_conv_initializer for array-valued proc-pointer funcs.
2209
2210 2010-01-07  Tobias Burnus  <burnus@net-b.de>
2211
2212         PR fortran/41872
2213         * trans-decl.c (gfc_trans_deferred_vars): Don't initialize
2214         allocatable scalars with SAVE attribute.
2215
2216 2010-01-05  Tobias Burnus  <burnus@net-b.de>
2217
2218         PR fortran/42517
2219         * options.c (gfc_post_options): Set -frecursion
2220         when -fopenmp is used.
2221
2222 2010-01-05  Tobias Burnus  <burnus@net-b.de>
2223
2224         PR fortran/41872
2225         * trans-expr.c (gfc_conv_procedure_call): Nullify
2226         return value for allocatable-scalar character functions.
2227
2228 2010-01-04  Tobias Burnus  <burnus@net-b.de>
2229
2230         PR fortran/36161
2231         * error.c (error_printf, gfc_warning, gfc_notify_std,
2232         gfc_warning_now, gfc_error, gfc_error_now,
2233         gfc_fatal_error): Change argument name from nocmsgid to
2234         gmsgid to enable (x)gettext's % checking.
2235
2236 2010-01-04  Tobias Burnus  <burnus@net-b.de>
2237         
2238         * trans-decl.c (gfc_trans_deferred_vars): Fix spelling.
2239
2240 2010-01-04  Tobias Burnus  <burnus@net-b.de>
2241
2242         PR fortran/41872
2243         * trans-expr.c (gfc_conv_procedure_call): Add indirect ref
2244         for functions returning allocatable scalars.
2245         * trans-stmt.c (gfc_trans_allocate): Emmit error when
2246         reallocating an allocatable scalar.
2247         * trans.c (gfc_allocate_with_status): Fix pseudocode syntax
2248         in comment.
2249         * trans-decl.c (gfc_trans_deferred_vars): Nullify local
2250         allocatable scalars.
2251         (gfc_generate_function_code): Nullify result variable for
2252         allocatable scalars.
2253         
2254         PR fortran/40849
2255         * module.c (gfc_use_module): Fix warning string to allow
2256         for translation.
2257
2258         PR fortran/42517
2259         * invoke.texi (-fcheck=recursion): Mention that the checking
2260         is also disabled for -frecursive.
2261         * trans-decl.c (gfc_generate_function_code): Disable
2262         -fcheck=recursion when -frecursive is used.
2263
2264         * intrinsic.texi (iso_c_binding): Improve wording.
2265
2266 \f
2267 Copyright (C) 2010 Free Software Foundation, Inc.
2268
2269 Copying and distribution of this file, with or without modification,
2270 are permitted in any medium without royalty provided the copyright
2271 notice and this notice are preserved.