re PR fortran/35037 (VOLATILE attribute not being honored with common block variable)
[gcc.git] / gcc / fortran / ChangeLog
1 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2
3 PR fortran/35037
4 * trans-common.c (build_field): Mark fields as volatile when needed.
5
6 2008-02-05 Tobias Burnus <burnus@net-b.de>
7
8 PR fortran/35093
9 * data.c (gfc_assign_data_value): Only free "size" if
10 it has not already been freed.
11
12 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
13
14 PR fortran/34945
15 * array.c (match_array_element_spec): Remove check for negative
16 array size.
17 (gfc_resolve_array_spec): Add check for negative size.
18
19 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
20
21 PR fortran/32315
22 * data.c (gfc_assign_data_value): Add bounds check for array
23 references.
24
25 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
26
27 * resolve.c (resolve_where): Fix typo.
28 (gfc_resolve_where_code_in_forall): Likewise.
29
30 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
31
32 PR fortran/32760
33 * resolve.c (resolve_allocate_deallocate): New function.
34 (resolve_code): Call it for allocate and deallocate.
35 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
36 the checking of the STAT tag and put in above new function.
37 * primary,c (match_variable): Do not fix flavor of host
38 associated symbols yet if the type is not known.
39
40 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
41
42 PR fortran/34910
43 * expr.c (gfc_check_assign): It is an error to assign
44 to a sibling procedure.
45
46 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
47
48 PR fortran/34975
49 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
50 delete_symtree to gfc_delete_symtree.
51 * gfortran.h : Add prototype for gfc_delete_symtree.
52 * module.c (load_generic_interfaces): Transfer symbol to a
53 unique symtree and delete old symtree, instead of renaming.
54 (read_module): The rsym and the found symbol are the same, so
55 the found symtree can be deleted.
56
57 PR fortran/34429
58 * decl.c (match_char_spec): Remove the constraint on deferred
59 matching of functions and free the length expression.
60 delete_symtree to gfc_delete_symtree.
61 (gfc_match_type_spec): Whitespace.
62 (gfc_match_function_decl): Defer characteristic association for
63 all types except BT_UNKNOWN.
64 * parse.c (decode_specification_statement): Only derived type
65 function matching is delayed to the end of specification.
66
67 2008-01-28 Tobias Burnus <burnus@net-b.de>
68
69 PR libfortran/34980
70 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
71
72 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
73
74 PR fortran/34990
75 * array.c (gfc_check_constructor_type): Revert clearing the expression.
76
77 2008-01-26 Tobias Burnus <burnus@net-b.de>
78
79 PR fortran/34848
80 * trans-expr.c (gfc_conv_function_call): Don't call
81 gfc_add_interface_mapping if the expression is NULL.
82
83 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
84
85 PR fortran/31610
86 * trans-array.c (gfc_trans_create_temp_array): Remove call to
87 gcc_assert (integer_zerop (loop->from[n])).
88
89 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
90
91 PR fortran/34661
92 * resolve.c (resolve_where): Added check if user-defined assignment
93 operator is an elemental subroutine.
94 (gfc_resolve_where_code_in_forall): Likewise.
95
96 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
97
98 PR fortran/33375
99 PR fortran/34858
100 * gfortran.h: Revert changes from 2008-01-17.
101 * match.c: Likewise.
102 * symbol.c: Likewise.
103 (gfc_undo_symbols): Undo namespace changes related to common blocks.
104
105 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
106
107 PR fortran/34202
108 * data.c (formalize_structure_cons): Skip formalization on
109 empty structures.
110
111 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
112
113 * gfortran.texi (OpenMP): Extended existing documentation.
114 (contributors): Added major contributors of 2008 that were
115 not listed yet.
116 (proposed extensions): Removed implemented items.
117
118 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
119
120 PR fortran/34872
121 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
122 seen, check for a statement label and, if present, delete it
123 and set the locus to the start of the statement.
124
125 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
126
127 PR fortran/34875
128 * trans-io.c (gfc_trans_transfer): If the array reference in a
129 read has a vector subscript, use gfc_conv_subref_array_arg to
130 copy back the temporary.
131
132 2008-01-22 Tobias Burnus <burnus@net-b.de>
133
134 PR fortran/34848
135 * interface.c (compare_actual_formal): Fix adding type
136 to missing_arg_type for absent optional arguments.
137
138 2008-01-22 Tobias Burnus <burnus@net-b.de>
139
140 PR fortran/34907
141 * parse.c (parse_spec): Change = into ==.
142
143 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
144
145 PR fortran/34915
146 * expr.c (check_elemental): Fix check for valid data types.
147
148 2008-01-22 Tobias Burnus <burnus@net-b.de>
149
150 PR fortran/34899
151 * scanner.c (load_line): Support <tab><digit> continuation lines.
152 * invoke.texi (-Wtabs): Document this.
153
154 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
155
156 PR fortran/34896
157 * module.c (read_module): Set use_rename attribute.
158
159 2007-01-21 Tobias Burnus <burnus@net-b.de>
160
161 PR fortran/34901
162 * interface.c (compare_parameter): Improved error message
163 for arguments of same type and mismatched kinds.
164
165 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
166
167 PR fortran/34861
168 * resolve.c (resolve_entries): Do not do an array bounds check
169 if the result symbols are the same.
170
171 PR fortran/34854
172 * module.c (read_module) : Hide the symtree of the previous
173 version of the symbol if this symbol is renamed.
174
175 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
176
177 PR fortran/34784
178 * array.c (gfc_check_constructor_type): Clear the expression ts
179 so that the checking starts from the deepest level of array
180 constructor.
181 * primary.c (match_varspec): If an unknown type is changed to
182 default character and the attempt to match a substring fails,
183 change it back to unknown.
184
185 PR fortran/34785
186 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
187 NULL for an array constructor, use the cl.length expression to
188 build it.
189 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
190 a tree assignment.
191
192 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
193
194 PR fortran/34817
195 PR fortran/34838
196 * iresolve.c (gfc_resolve_all): Remove conversion of mask
197 argument to kind=1 by removing call to resolve_mask_arg().
198 (gfc_resolve_any): Likewise.
199
200 2008-01-19 Tobias Burnus <burnus@net-b.de>
201
202 PR fortran/34760
203 * primary.c (match_variable): Handle FL_UNKNOWN without
204 uneducated guessing.
205 (match_variable): Improve error message.
206
207 2008-01-18 Tobias Burnus <burnus@net-b.de>
208
209 PR fortran/32616
210 * interface.c (get_expr_storage_size): Return storage size
211 for array element designators.
212 (compare_actual_formal): Reject unequal string sizes for
213 assumed-shape dummy arguments. And fix error message for
214 array-sections with vector subscripts.
215
216 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
217
218 PR fortran/34556
219 * simplify.c (is_constant_array_expr): New static function that returns
220 true if the given expression is an array and is constant.
221 (gfc_simplify_reshape): Use new function.
222
223 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
224
225 PR fortran/33375
226 * symbol.c (free_common_tree): Renamed to ...
227 (gfc_free_common_tree): This. Remove static.
228 (gfc_free_namespace): Updated.
229
230 * gfortran.h (gfc_free_common_tree): New.
231
232 * match.c (gfc_match_common): Call gfc_free_common_tree () with
233 gfc_current_ns->common_root and set gfc_current_ns->common_root
234 to NULL on syntax error.
235
236 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
237
238 PR fortran/34686
239 * trans-expr.c (gfc_conv_function_call): Use proper
240 type for returned character pointers.
241
242 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
243
244 PR fortran/34429
245 PR fortran/34431
246 PR fortran/34471
247 * decl.c : Remove gfc_function_kind_locus and
248 gfc_function_type_locus. Add gfc_matching_function.
249 (match_char_length): If matching a function and the length
250 does not match, return MATCH_YES and try again later.
251 (gfc_match_kind_spec): The same.
252 (match_char_kind): The same.
253 (gfc_match_type_spec): The same for numeric and derived types.
254 (match_prefix): Rename as gfc_match_prefix.
255 (gfc_match_function_decl): Except for function valued character
256 lengths, defer applying kind, type and charlen info until the
257 end of specification block.
258 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
259 parse.c (decode_specification_statement): New function.
260 (decode_statement): Call it when a function has kind = -1. Set
261 and reset gfc_matching function, as function statement is being
262 matched.
263 (match_deferred_characteristics): Simplify with a single call
264 to gfc_match_prefix. Do appropriate error handling. In any
265 case, make sure that kind = -1 is reset or corrected.
266 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
267 Throw an error if kind = -1 after last specification statement.
268 parse.h : Prototype for gfc_match_prefix.
269
270 2008-01-16 Tobias Burnus <burnus@net-b.de>
271
272 PR fortran/34796
273 * interface.c (compare_parameter): Allow AS_DEFERRED array
274 elements and reject attr.pointer array elemenents.
275 (get_expr_storage_size): Return storage size of elements of
276 assumed-shape and pointer arrays.
277
278 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
279
280 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
281 for flag_tree_parallelize_loops.
282
283 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
284
285 PR libfortran/34671
286 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
287 (gfc_resolve_any): Likewise.
288 (gfc_resolve_count): Likewise. Don't append kind of
289 argument to function name.
290
291 2008-01-13 Tobias Burnus <burnus@net-b.de>
292
293 PR fortran/34665
294 * resolve.c (resolve_actual_arglist): For expressions,
295 also check for assume-sized arrays.
296 * interface.c (compare_parameter): Move F2003 character checks
297 here, print error messages here, reject elements of
298 assumed-shape array as argument to dummy arrays.
299 (compare_actual_formal): Update for the changes above.
300
301 2008-01-13 Tobias Burnus <burnus@net-b.de>
302
303 PR fortran/34763
304 * decl.c (contained_procedure): Only check directly preceeding state.
305
306 2008-01-13 Tobias Burnus <burnus@net-b.de>
307
308 PR fortran/34759
309 * check.c (gfc_check_shape): Accept array ranges of
310 assumed-size arrays.
311
312 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
313
314 PR fortran/34432
315 * match.c (gfc_match_name): Don't error if leading character is a '(',
316 just return MATCH_NO.
317
318 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
319
320 PR fortran/34722
321 * trans-io.c (create_dummy_iostat): Commit the symbol.
322
323 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
324
325 PR fortran/34537
326 * simplify.c (gfc_simplify_transfer): Return NULL if the size
327 of the element is unavailable and only assign character length
328 to the result, if 'mold' is constant.
329
330 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
331
332 PR fortran/34396
333 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
334 to assign strings and perform bounds checks on the string length.
335 (get_array_ctor_strlen): Remove bounds checking.
336 (gfc_trans_array_constructor): Initialize string length checking.
337 * trans-array.h : Add prototype for gfc_trans_string_copy.
338
339 2008-01-08 Richard Guenther <rguenther@suse.de>
340
341 PR fortran/34706
342 PR tree-optimization/34683
343 * trans-types.c (gfc_get_array_type_bounds): Use an array type
344 with known size for accesses if that is known.
345
346 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
347
348 PR fortran/34476
349 * expr.c (find_array_element): Check that the array bounds are
350 constant before using them. Use lower, as well as upper bound.
351 (check_restricted): Allow implied index variable.
352
353 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
354
355 PR fortran/34681
356 * trans_array.c (gfc_trans_deferred_array): Do not null the
357 data pointer on entering scope, nor deallocate it on leaving
358 scope, if the symbol has the 'save' attribute.
359
360 PR fortran/34704
361 * trans_decl.c (gfc_finish_var_decl): Derived types with
362 allocatable components and an initializer must be TREE_STATIC.
363
364 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
365
366 PR fortran/34672
367 * module.c (write_generic): Rewrite completely.
368 (write_module): Change call to write_generic.
369
370 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
371
372 PR fortran/34659
373 * scanner.c (load_line): Do not count ' ' as printable when checking for
374 continuations.
375
376 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
377
378 PR fortran/34545
379 * module.c (load_needed): If the namespace has no proc_name
380 give it the module symbol.
381
382 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
383
384 PR fortran/34387
385 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
386 the dummy variable expression, test for NULL, and pass the variable
387 address to the called function.
388
389 2007-01-06 Tobias Burnus <burnus@net-b.de>
390
391 PR fortran/34658
392 * match.c (gfc_match_common): Remove blank common in
393 DATA BLOCK warning.
394 * resolve.c (resolve_common_vars): New function.
395 (resolve_common_blocks): Move checks to resolve_common_vars
396 and invoke that function.
397 (resolve_types): Call resolve_common_vars for blank commons.
398
399 2008-01-06 Tobias Burnus <burnus@net-b.de>
400
401 PR fortran/34655
402 * resolve.c (resolve_equivalence_derived): Reject derived types with
403 default initialization if equivalenced with COMMON variable.
404
405 2008-01-06 Tobias Burnus <burnus@net-b.de>
406
407 PR fortran/34654
408 * io.c (check_io_constraints): Disallow unformatted I/O for
409 internal units.
410
411 2008-01-06 Tobias Burnus <burnus@net-b.de>
412
413 PR fortran/34660
414 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
415 ELEMENTAL functions.
416
417 2008-01-06 Tobias Burnus <burnus@net-b.de>
418
419 PR fortran/34662
420 * interface.c (compare_actual_formal): Reject parameter
421 actual to intent(out) dummy.
422
423 2008-01-04 Tobias Burnus <burnus@net-b.de>
424
425 PR fortran/34557
426 * primary.c (match_varspec): Gobble whitespace before
427 checking for '('.