mirrored from git://gcc.gnu.org/git/gcc.git
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
ChangeLog-2012
2798 lines (2167 loc) · 95.1 KB
/
ChangeLog-2012
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2012-12-28 Janus Weil <janus@gcc.gnu.org>
PR fortran/55692
* check.c (gfc_check_associated): Remove a "gcc_assert (0)".
2012-12-28 Tobias Burnus <burnus@net-b.de>
PR fortran/55763
* check.c (gfc_check_move_alloc): Handle unlimited polymorphic.
* trans-intrinsic.c (conv_intrinsic_move_alloc): Ditto.
2012-12-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/48976
* gfortran.h (gfc_inquire struct): Add pointer for inquire stream.
* io.c (io_tag): Add tag for inquire stream. (match_inquire_element):
Add matcher for new tag. (gfc_resolve_inquire): Resolve new tag.
* ioparm.def: Add new parameter for inquire stream.
* trans-io.c (gfc_trans_inquire): Add tranlste code for inquire
stream.
2012-12-23 Tobias Burnus <burnus@net-b.de>
PR fortran/54884
* module.c (write_symbol1_recursion): Set attr.public_use.
* interface.c (check_sym_interfaces, check_uop_interfaces,
gfc_check_interfaces): Remove attr.public_use code.
* resolve.c (resolve_function, resolve_variable,
resolve_typebound_procedure): Ditto.
2012-12-22 Tobias Burnus <burnus@net-b.de>
PR fortran/55763
* module.c (mio_component): Don't skip _hash's initializer.
* resolve.c (resolve_select_type): Add an assert.
* trans-expr.c (gfc_conv_procedure_call): Handle
INTENT(OUT) for UNLIMIT_POLY.
2012-12-21 Richard Biener <rguenther@suse.de>
PR bootstrap/54659
* gfortran.h: Do not include gmp.h here.
2012-12-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/55763
* match.c (select_type_set_tmp): Return is a derived type or
class typespec has no derived type.
* resolve.c (resolve_fl_var_and_proc): Exclude select type
temporaries from 'pointer'.
(resolve_symbol): Exclude select type temporaries from tests
for assumed size and assumed rank.
2012-12-20 Janus Weil <janus@gcc.gnu.org>
PR fortran/36044
* gfortran.h (gfc_isym_id): Add GFC_ISYM_BACKTRACE.
* intrinsic.c (add_subroutines): Add "backtrace".
* intrinsic.texi (BACKTRACE): Document BACKTRACE intrinsic.
2012-12-20 Tobias Burnus <burnus@net-b.de>
PR fortran/54818
* trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ensure that
the string length is of type gfc_charlen_type_node.
2012-12-19 Paul Thomas <pault@gcc.gnu.org>
* array.c (resolve_array_list): Apply C4106.
* check.c (gfc_check_same_type_as): Exclude polymorphic
entities from check for extensible types. Improved error
for disallowed argument types to name the offending type.
* class.c : Update copyright date.
(gfc_class_null_initializer): Add argument for initialization
expression and deal with unlimited polymorphic typespecs.
(get_unique_type_string): Give unlimited polymorphic
entities a type string.
(gfc_intrinsic_hash_value): New function.
(gfc_build_class_symbol): Incorporate unlimited polymorphic
entities.
(gfc_find_derived_vtab): Deal with unlimited polymorphic
entities.
(gfc_find_intrinsic_vtab): New function.
* decl.c (gfc_match_decl_type_spec): Match typespec for
unlimited polymorphic type.
(gfc_match_data_decl): Skip to 'ok' if unlimited polymorphic.
expr.c (gfc_check_pointer_assign): Apply C717. If unlimited
polymorphic lvalue, find rvalue vtable for all typespecs,
except unlimited polymorphic expressions.
(gfc_check_vardef_context): Handle unlimited polymorphic
entities.
* gfortran.h : Add unlimited polymorphic attribute. Add
second arg to gfc_class_null_initializer primitive and
primitive for gfc_find_intrinsic_vtab. Add UNLIMITED_POLY
to detect unlimited polymorphic expressions.
* interface.c (gfc_compare_types): If expr1 is unlimited
polymorphic, always return 1. If expr2 is unlimited polymorphic
enforce C717.
(gfc_compare_interfaces): Skip past conditions that do not
apply for unlimited polymorphic entities.
(compare_parameter): Make sure that an unlimited polymorphic,
allocatable or pointer, formal argument is matched by an
unlimited polymorphic actual argument.
(compare_actual_formal): Ensure that an intrinsic vtable exists
to match an unlimited polymorphic formal argument.
* match.c (gfc_match_allocate): Type kind parameter does not
need to match an unlimited polymorphic allocate-object.
(alloc_opt_list): An unlimited polymorphic allocate-object
requires a typespec or a SOURCE tag.
(select_intrinsic_set_tmp): New function.
(select_type_set_tmp): Call new function. If it returns NULL,
build a derived type or class temporary instead.
(gfc_match_type_is): Remove restriction to derived types only.
Bind(C) or sequence derived types not permitted.
* misc (gfc_typename): Printed CLASS(*) for unlimited
polymorphism.
* module.c : Add AB_UNLIMITED_POLY to pass unlimited
polymorphic attribute to and from modules.
* resolve.c (resolve_common_vars): Unlimited polymorphic
entities cannot appear in common blocks.
(resolve_deallocate_expr): Deallocate unlimited polymorphic
enities.
(resolve_allocate_expr): Likewise for allocation. Make sure
vtable exists.
(gfc_type_is_extensible): Unlimited polymorphic entities are
not extensible.
(resolve_select_type): Handle unlimited polymorphic selectors.
Ensure that length type parameters are assumed and that names
for intrinsic types are generated.
(resolve_fl_var_and_proc): Exclude select type temporaries
from test of extensibility of type.
(resolve_fl_variable): Likewise for test that assumed character
length must be a dummy or a parameter.
(resolve_fl_derived0): Return SUCCESS unconditionally for
unlimited polymorphic entities. Also, allow unlimited
polymorphic components.
(resolve_fl_derived): Return SUCCESS unconditionally for
unlimited polymorphic entities.
(resolve_symbol): Return early with unlimited polymorphic
entities.
* simplifiy.c : Update copyright year.
(gfc_simplify_extends_type_of): No simplification possible
for unlimited polymorphic arguments.
* symbol.c (gfc_use_derived): Nothing to do for unlimited
polymorphic "derived type".
(gfc_type_compatible): Return unity if ts1 is unlimited
polymorphic.
* trans-decl.c (create_function_arglist) Formal arguments
without a character length should be treated in the same way
as passed lengths.
(gfc_trans_deferred_vars): Nullify the vptr of unlimited
polymorphic pointers. Avoid unlimited polymorphic entities
triggering gcc_unreachable.
* trans-expr.c (gfc_conv_intrinsic_to_class): New function.
(gfc_trans_class_init_assign): Make indirect reference of
src.expr.
(gfc_trans_class_assign): Expression NULL of unknown type
should set NULL vptr on lhs. Treat C717 cases where lhs is
a derived type and the rhs is unlimited polymorphic.
(gfc_conv_procedure_call): Handle the conversion of a non-class
actual argument to match an unlimited polymorphic formal
argument. Suppress the passing of a character string length
in this case. Make sure that calls to the character __copy
function have two character string length arguments.
(gfc_conv_initializer): Pass the initialization expression to
gfc_class_null_initializer.
(gfc_trans_subcomponent_assign): Ditto.
(gfc_conv_structure): Move handling of _size component.
trans-intrinsic.c: (gfc_conv_same_type_as): Handle conditions
where unlimited polymorphic arguments have null vptr.
* trans-stmt.c (trans_associate_var): Correctly treat array
temporaries associated with unlimited polymorphic selectors.
Recover the overwritten dtype for the descriptor. Use the _size
field of the vptr for character string lengths.
(gfc_trans_allocate): Cope with unlimited polymorphic allocate
objects; especially with character source tags.
(reset_vptr): New function.
(gfc_trans_deallocate): Call it.
* trans-types.c (gfc_get_derived_type): Detect unlimited
polymorphic types and deal with cases where the derived type of
components is null.
* trans.c : Update copyright year.
(trans_code): Call gfc_trans_class_assign for C717 cases where
the lhs is not unlimited polymorphic.
2012-12-19 Tobias Burnus <burnus@net-b.de>
PR fortran/55733
* trans-decl.c (gfc_create_string_length): Avoid setting
TREE_STATIC for automatic variables with -fno-automatic.
2012-12-19 Tobias Burnus <burnus@net-b.de>
Jakub Jelinek <jakub@redhat.com>
Janus Weil <janus@gcc.gnu.org>
PR fortran/55636
PR fortran/55733
* gfortran.h (GFC_PREFIX): Define.
* trans-decl.c (gfc_create_string_length): For VAR_DECLs that
will be TREE_STATIC, use GFC_PREFIX to mangle the names. Handle
-fno-automatic
(gfc_trans_deferred_vars): Don't free variables SAVEd via
-fno-automatic.
2012-12-16 Tobias Burnus <burnus@net-b.de>
PR fortran/55197
* module.c (gfc_use_module): Free rename list only for
internally generated intrinsic modules.
2012-12-16 Tobias Burnus <burnus@net-b.de>
* trans-intrinsic.c (conv_intrinsic_move_alloc): Set dynamic
type of the FROM variable to the declared type.
2012-12-16 Tobias Burnus <burnus@net-b.de>
PR fortran/55638
* resolve.c (resolve_formal_arglist): Allow VALUE without
INTENT for ELEMENTAL procedures.
2012-12-10 Janus Weil <janus@gcc.gnu.org>
PR fortran/52909
* trans-decl.c (get_proc_pointer_decl): Apply name mangling.
2012-12-09 Tobias Burnus <burnus@net-b.de>
* trans-array.c (structure_alloc_comps): Use NULL_TREE in the
call to gfc_deallocate_scalar_with_status.
* trans-decl.c (gfc_trans_deferred_vars): Pass symbol.
* trans-stmt.c (gfc_trans_deallocate): Pass polymorphic variable.
2012-12-09 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/55593
* frontend-passes.c (doloop_code): Use resolved_sym
instead of n.sym->formal for formal argument list
to get the correct version for all generic subroutines.
2012-12-05 Tobias Burnus <burnus@net-b.de>
* resolve.c (generate_component_assignments): Fix memleak.
2012-12-03 Janus Weil <janus@gcc.gnu.org>
PR fortran/55548
* intrinsic.texi (SYSTEM_CLOCK): Update documentation of SYSTEM_CLOCK.
2012-12-03 Tobias Burnus <burnus@net-b.de>
Janus Weil <janus@gcc.gnu.org>
PR fortran/37336
* class.c (gfc_is_finalizable): New function.
* gfortran.h (gfc_is_finalizable): Its prototype.
* module.c (mio_component): Read initializer for vtype's _final.
* resolve.c (resolve_fl_derived0): Call gfc_is_finalizable.
* trans-expr.c (gfc_vtable_final_get): New function.
(conv_parent_component_references): Fix comment.
(gfc_conv_variable): Fix for scalar coarray components.
* trans-intrinsic.c (conv_intrinsic_move_alloc): For BT_CLASS,
pass the BT_CLASS type and not the declared type to
gfc_deallocate_scalar_with_status.
* trans.h (gfc_vtable_final_get): New prototype.
2012-12-03 Tobias Burnus <burnus@net-b.de>
PR fortran/55475
* scanner.c (gfc_next_char_literal): Fix setting locus
to free_line_length for the error message.
* error.c (show_locus): Fix potential out-of-bounds
read.
2012-12-03 Tobias Burnus <burnus@net-b.de>
PR fortran/37336
* class.c (finalizer_insert_packed_call): New static function.
(finalize_component, generate_finalization_wrapper):
Fix coarray handling and packing.
2012-12-02 Paul Thomas <pault@gcc.gnu.org>
* resolve.c (resolve_allocate_deallocate,
resolve_typebound_intrinsic_op): Recover revisions 193568 and
193778, which were accidentally reverted by the previous patch.
2012-12-01 Alessandro Fanfarillo <alessandro.fanfarillo@gmail.com>
Paul Thomas <pault@gcc.gnu.org>
PR fortran/46897
* gfortran.h : Add bit field 'defined_assign_comp' to
symbol_attribute structure.
Add primitive for gfc_add_full_array_ref.
* expr.c (gfc_add_full_array_ref): New function.
(gfc_lval_expr_from_sym): Call new function.
* resolve.c (add_comp_ref): New function.
(build_assignment): New function.
(get_temp_from_expr): New function
(add_code_to_chain): New function
(generate_component_assignments): New function that calls all
the above new functions.
(resolve_code): Call generate_component_assignments.
(check_defined_assignments): New function.
(resolve_fl_derived0): Call check_defined_assignments.
(gfc_resolve): Reset component_assignment_level in case it is
left in a bad state by errors.
* resolve.c (is_sym_host_assoc, resolve_procedure_interface,
resolve_contained_fntype, resolve_procedure_expression,
resolve_elemental_actual, resolve_global_procedure,
is_scalar_expr_ptr, gfc_iso_c_func_interface, resolve_function,
set_name_and_label, gfc_iso_c_sub_interface,
resolve_specific_s0, resolve_operator, compare_bound_mpz_t,
gfc_resolve_character_operator, resolve_typebound_function,
gfc_resolve_expr, forall_index, remove_last_array_ref,
conformable_arrays, resolve_allocate_expr,
resolve_allocate_deallocate, resolve_select_type,
resolve_transfer, resolve_where,
gfc_resolve_where_code_in_forall, gfc_resolve_forall_body,
gfc_count_forall_iterators, resolve_values,
resolve_bind_c_comms, resolve_bind_c_derived_types,
gfc_verify_binding_labels, apply_default_init,
build_default_init_expr, apply_default_init_local,
resolve_fl_var_and_proc, resolve_fl_procedure,
gfc_resolve_finalizers, check_generic_tbp_ambiguity,
resolve_typebound_intrinsic_op, resolve_typebound_procedure,
resolve_typebound_procedures, ensure_not_abstract,
resolve_fl_derived0, resolve_fl_parameter, resolve_symbol,
resolve_equivalence_derived): Remove trailing white space.
* gfortran.h : Remove trailing white space.
2012-11-28 Tobias Burnus <burnus@net-b.de>
PR fortran/52161
* trans-stmt.c (gfc_trans_sync): Fix bound checking
for -fcoarray=lib.
2012-11-28 Tobias Burnus <burnus@net-b.de>
PR fortran/52161
* trans-stmt.c (gfc_trans_sync): Fix bound checking.
2012-11-27 Tobias Burnus <burnus@net-b.de>
PR fortran/55476
* expr.c (gfc_check_pointer_assign): Fix check
pointer-might-outlive-target check for host_assoc.
2012-11-26 Eric Botcazou <ebotcazou@adacore.com>
* trans-decl.c (gfc_finish_var_decl): Do not set DECL_RESTRICTED_P.
2012-11-26 Janus Weil <janus@gcc.gnu.org>
PR fortran/54997
* decl.c (match_procedure_decl): Don't set 'referenced' attribute
for PROCEDURE declarations.
* parse.c (gfc_fixup_sibling_symbols,parse_contained): Don't set
'referenced' attribute for all contained procedures.
* trans-decl.c (gfc_get_symbol_decl): Allow for unreferenced procedures.
(build_function_decl): Set TREE_USED for referenced procedures.
2012-11-26 Janus Weil <janus@gcc.gnu.org>
PR fortran/54881
* match.c (select_derived_set_tmp,select_class_set_tmp): Removed and
unified into ...
(select_type_set_tmp): ... this one. Set POINTER argument according to
selector.
* trans-intrinsic.c (gfc_conv_associated): Use 'gfc_class_data_get'
instead of 'gfc_add_data_component'.
2012-11-25 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/30146
* frontend-passes.c (doloop_warn): New function.
(doloop_list): New static variable.
(doloop_size): New static variable.
(doloop_level): New static variable.
(gfc_run_passes): Call doloop_warn.
(doloop_code): New function.
(doloop_function): New function.
(gfc_code_walker): Keep track of DO level.
2012-11-24 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/55314
* resolve.c (resolve_allocate_deallocate): Compare all
subscripts when deciding if to reject a (de)allocate
statement.
2012-11-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/55352
* trans-decl.c (generate_local_decl): Don't warn for explicitly imported
but unused module variables which are in a namelist or common block.
2012-11-20 Diego Novillo <dnovillo@google.com>
Jakub Jelinek <jakub@redhat.com>
* trans-openmp.c: Replace all vec<T, A>() initializers
with vNULL.
2012-11-17 Diego Novillo <dnovillo@google.com>
Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
* frontend-passes.c: Use new vec API in vec.h.
* trans-array.c: Likewise.
* trans-common.c: Likewise.
* trans-decl.c: Likewise.
* trans-expr.c: Likewise.
* trans-intrinsic.c: Likewise.
* trans-openmp.c: Likewise.
* trans-stmt.c: Likewise.
* trans-types.c: Likewise.
* trans.h: Likewise.
2012-11-17 Jakub Jelinek <jakub@redhat.com>
PR fortran/55341
* trans-intrinsic.c (gfc_conv_intrinsic_transfer): Convert last
argument to memcpy to size_type_node type.
* trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
* trasn-array.c (duplicate_allocatable): Likewise.
2012-11-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/55297
* resolve.c (resolve_typebound_intrinsic_op): Only add typebound
operators to the operator list in the namespace of the derived type.
2012-11-12 Jan Hubicka <jh@suse.cz>
* f95-lang.c (ATTR_NOTHROW_LEAF_MALLOC_LIST): New macro.
(gfc_define_builtin): Use set_call_expr_flags.
(gfc_init_builtin_functions): Update.
2012-11-12 Tobias Burnus <burnus@net-b.de>
PR fortran/55272
* module.c (mio_array_spec): Correctly handle coarray
scalars.
2012-11-07 Tobias Schlüter <tobi@gcc.gnu.org>
PR fortran/51727
* module.c (sorted_pointer_info): New.
(gfc_get_sorted_pointer_info): New.
(free_sorted_pointer_info_tree): New.
(compare_sorted_pointer_info): New.
(find_symbols_to_write): New.
(write_symbol1_recursion): New.
(write_symbol1): Collect symbols that need writing, output in order.
(write_generic): Traverse tree in order.
2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/53063
* options.c (set_Wall): Do not set warn_switch here.
2012-11-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/54917
* target-memory.c (gfc_target_expr_size,gfc_target_interpret_expr):
Handle BT_CLASS.
* trans-intrinsic.c (gfc_conv_intrinsic_transfer): Add support for
polymorphic arguments.
2012-11-04 Janus Weil <janus@gcc.gnu.org>
PR fortran/55199
* primary.c (gfc_match_varspec): Clear typespec if it cannot be
determined at this point.
2012-10-31 Janus Weil <janus@gcc.gnu.org>
PR fortran/53718
* trans.h (GFC_DECL_PUSH_TOPLEVEL): Removed.
* trans-decl.c (gfc_get_symbol_decl,gfc_generate_function_code): Remove
GFC_DECL_PUSH_TOPLEVEL.
(build_function_decl): Do not push __copy procedure to toplevel.
2012-10-31 Tobias Burnus <burnus@net-b.de>
PR fortran/55134
* trans-array.c (gfc_conv_array_parameter): Regard AS_DEFERRED as
array with descriptor.
2012-10-28 Tobias Burnus <burnus@net-b.de>
PR fortran/54958
* gfortran.h (gfc_resolve_iterator_expr,
gfc_check_vardef_context): Update prototype.
* expr.c (gfc_check_vardef_context): Add own_scope
argument and honour it.
* resolve.c (gfc_resolve_iterator_expr): Add own_scope
argument and honour it.
(resolve_deallocate_expr, resolve_allocate_expr,
resolve_data_variables, resolve_transfer
resolve_lock_unlock, resolve_code): Update calls.
* array.c (resolve_array_list): Ditto.
* check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
* interface.c (compare_actual_formal): Ditto.
* intrinsic.c (check_arglist): Ditto.
* io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): Ditto.
2012-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
* trans.c (gfc_allocate_allocatable): Revert accidental
commit.
2012-10-24 Janus Weil <janus@gcc.gnu.org>
PR fortran/55037
* trans-expr.c (gfc_conv_procedure_call): Move a piece of code and
remove an assert.
2012-10-21 Tobias Burnus <burnus@net-b.de>
PR fortran/54725
* Make-lang.in (CFLAGS-cpp.o): Use TARGET_SYSTEM_ROOT_DEFINE.
* cpp.o (gfc_cpp_init_options): Use it for
setting gfc_cpp_option.sysroot.
2012-10-21 Thomas König <tkoenig@gcc.gnu.org>
PR fortran/54465
* lang.opt (Wextra): Add.
* invoke.texi: Document that -Wc-binding-type, -Wconversion
and -Wline-truncation are implied by -Wall. Document that
-Wcompare-reals is implied by -Wextra. Document -Wextra.
* options.c (set_Wextra): New function.
(gfc_handle_option): Handle -Wextra.
2012-10-19 Janus Weil <janus@gcc.gnu.org>
PR fortran/54224
* trans-expr.c (conv_function_val): Set TREE_USED.
2012-10-18 Tobias Burnus <burnus@net-b.de>
PR fortran/54884
* resolve.c (specification_expr): Change to bool.
(resolve_formal_arglist, resolve_symbol): Set
specification_expr to true before resolving the array spec.
(resolve_variable, resolve_charlen, resolve_fl_variable):
Properly reset specification_expr.
(resolve_function): Set public_use when used in
a specification expr.
2012-10-16 Tobias Burnus <burnus@net-b.de>
PR fortran/50981
PR fortran/54618
* trans.h (gfc_conv_derived_to_class, gfc_conv_class_to_class):
Update prototype.
* trans-stmt.c (trans_associate_var,gfc_trans_allocate): Update
calls to those functions.
* trans-expr.c (gfc_conv_derived_to_class, gfc_conv_class_to_class,
gfc_conv_expr_present): Handle absent polymorphic arguments.
(class_scalar_coarray_to_class): New function.
(gfc_conv_procedure_call): Update calls.
2012-10-12 Janus Weil <janus@gcc.gnu.org>
PR fortran/40453
* interface.c (check_dummy_characteristics): Recursively check dummy
procedures.
2012-10-11 Janus Weil <janus@gcc.gnu.org>
PR fortran/54784
* trans-stmt.c (gfc_trans_allocate): Correctly determine the reference
to the _data component for polymorphic allocation with SOURCE.
2012-10-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/54832
* resolve.c (resolve_fl_derived0): Correctly copy the 'class_ok'
attribute for proc-ptr components with RESULT variable.
2012-10-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/45521
* interface.c (generic_correspondence): Implement additional
distinguishability criteria of F08.
(compare_actual_formal): Reject data object as actual argument for
procedure formal argument.
2012-10-04 Tobias Burnus <burnus@net-b.de>
* expr.c (scalarize_intrinsic_call): Plug memory leak.
* frontend-passes.c (gcc_assert): Extend assert.
* interface.c (gfc_compare_derived_types): Fix comparison.
(gfc_check_operator_interface): Move up to make this error
message reachable.
(get_sym_storage_size): Remove always-true checks.
* io.c (format_lex): Add comment.
(gfc_free_wait): Free memory.
* match.c (gfc_match_select_type): Ditto.
* matchexpr.c (match_level_3): Ditto.
* primary.c (match_string_constant): Ditto.
(match_actual_arg): Check return value.
* resolve.c (gfc_resolve_substring_charlen,
resolve_typebound_generic_call, resolve_typebound_function,
resolve_typebound_subroutine): Free memory.
* trans-types.c (gfc_get_derived_type): Remove always-true check.
2012-10-02 Janus Weil <janus@gcc.gnu.org>
PR fortran/54778
* interface.c (matching_typebound_op): Check for 'class_ok' attribute.
2012-09-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/54667
* intrinsic.texi (C_F_POINTER): Fix description.
* resolve.c (gfc_iso_c_sub_interface): Add a check for FPTR argument
of C_F_POINTER. Modify two error messages. Cleanup.
2012-09-24 Tobias Burnus <burnus@net-b.de>
PR fortran/54618
PR fortran/54690
* trans-expr.c (gfc_conv_procedure_call): Fix INTENT(OUT)
handling for allocatable BT_CLASS.
2012-09-24 Lawrence Crowl <crowl@google.com>
* trans-expr.c (gfc_conv_cst_int_power): Change to new double_int API.
* target-memory.c (gfc_interpret_logical): Likewise.
2012-09-23 Tobias Burnus <burnus@net-b.de>
* parse.c (parse_derived): Don't set attr.alloc_comp
for pointer components with allocatable subcomps.
PR fortran/54599
* resolve.c (resolve_fl_namelist): Remove superfluous
NULL check.
* simplify.c (simplify_min_max): Remove unreachable code.
* trans-array.c (gfc_trans_create_temp_array): Change
a condition into an assert.
PR fortran/54618
* trans-expr.c (gfc_trans_class_init_assign): Guard
re-setting of the _data by gfc_conv_expr_present.
(gfc_conv_procedure_call): Fix INTENT(OUT) handling
for allocatable BT_CLASS.
2012-09-22 Thomas König <tkoenig@gcc.gnu.org>
PR fortran/54599
* dependency.c (gfc_dep_compare_expr): Clarify logic,
remove dead code.
2012-09-20 Tobias Burnus <burnus@net-b.de>
PR fortran/54599
* cpp.c (print_line): Properly handle extern C.
2012-09-20 Martin Jambor <mjambor@suse.cz>
* trans-decl.c (gfc_get_extern_function_decl): Push NULL cfun. Do not
set and restore current_function_decl.
(gfc_init_coarray_decl): Do not set and restore current_function_decl.
2012-09-17 Tobias Burnus <burnus@net-b.de>
PR fortran/54608
* simplify.c (gfc_simplify_scan, gfc_simplify_verify):
Fix handling of BACK=variable.
2012-09-17 Janus Weil <janus@gcc.gnu.org>
PR fortran/54285
* expr.c (gfc_check_pointer_assign): Correctly handle procedure pointers
as function results.
* primary.c (gfc_match_varspec): Allow to call a PPC with proc-ptr
result.
2012-09-17 Tobias Burnus <burnus@net-b.de>
PR fortran/54603
* trans-expr.c (gfc_trans_subcomponent_assign): Handle
proc-pointer components.
2012-09-17 Tobias Burnus <burnus@net-b.de>
PR fortran/54599
* error.c (error_print): Move increment out of the assert.
* interface.c (gfc_compare_derived_types): Add assert.
(get_expr_storage_size): Remove always-true logical condition.
* resolve.c (resolve_allocate_expr): Fix looping logic.
* target-memory.c (gfc_target_expr_size): Add assert.
2012-09-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/54594
* resolve.c (get_checked_tb_operator_target): Add a reference to the
relevant quote from the F08 standard.
2012-09-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/54594
* interface.c (compare_type_rank): Handle CLASS arrays.
2012-09-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/54387
* expr.c (gfc_check_pointer_assign): Check for result of embracing
function.
2012-09-16 Tobias Burnus <burnus@net-b.de>
* trans-decl.c (gfc_generate_function_code): Fix
gfc_option.coarray check.
* trans-stmt.c (compute_inner_temp_size): Fix handling
of gfc_option.rtcheck.
2012-09-16 Mikael Morin <mikael@gcc.gnu.org>
* symbol.c (gfc_undo_symbols): Correctly undo namelists.
2012-09-15 Tobias Burnus <burnus@net-b.de>
* trans-io.c (gfc_trans_transfer): Add an assert.
2012-09-15 Tobias Burnus <burnus@net-b.de>
* arith.c (arith_power): Call gfc_free_expr in case of error.
* array.c (gfc_match_array_constructor): Initialize variable.
(gfc_resolve_character_array_constructor): Remove superfluous check.
(gfc_array_dimen_size): Add assert.
* check.c (numeric_check): Fix implicit typing.
* class.c (gfc_build_class_symbol): Add assert.
(finalize_component): Free memory.
* dump-parse-tree.c (show_namespace): Add assert.
* trans-io.c (transfer_namelist_element, transfer_expr): Avoid
memory leakage.
(gfc_trans_transfer): Add assert.
* trans.c (gfc_trans_runtime_check): Call va_end
2012-09-15 Tobias Burnus <burnus@net-b.de>
* match.c (lock_unlock_statement, sync_statement): Fix potential
double freeing.
(sync_statement): Remove unreachable code.
* simplify.c (gfc_simplify_bessel_n2): Avoid double freeing.
(gfc_simplify_repeat): Remove bogus code.
* target-memory.h (gfc_target_encode_expr): Update prototype.
* target-memory.c (gfc_target_encode_expr, encode_array,
encode_derived): Return unsigned HOST_WIDE_INT.
(gfc_target_interpret_expr): Add assert.
(gfc_merge_initializers): Fix "== 0" check for mpz_t.
* symbol.c (gfc_get_typebound_proc): Add assert.
(gfc_merge_initializers): Remove unreachable check.
2012-09-13 Tobias Burnus <burnus@net-b.de>
PR fortran/54556
* resolve.c (resolve_formal_arglist): Allow VALUE arguments
with implicit_pure.
(gfc_impure_variable): Don't check gfc_pure such that the
function also works for gfc_implicit_pure procedures.
2012-09-12 Tobias Burnus <burnus@net-b.de>
PR fortran/54225
PR fortran/53306
* array.c (match_subscript, gfc_match_array_ref): Fix
diagnostic of coarray's '*'.
2012-09-07 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/54208
* simplify.c (simplify_bound_dim): Resolve array spec before
proceeding with simplification.
2012-09-06 Tobias Burnus <burnus@net-b.de>
PR fortran/54463
* trans-intrinsic.c (gfc_conv_intrinsic_funcall): Fix matmul
call to BLAS if the default-kind has been promoted.
2012-09-05 Tobias Burnus <burnus@net-b.de>
PR fortran/54462
* symbol.c (gfc_undo_symbols): Avoid NULL pointer dereference.
2012-09-04 Janus Weil <janus@gcc.gnu.org>
PR fortran/54435
PR fortran/54443
* match.c (gfc_match_select_type): Make sure to only access CLASS_DATA
for BT_CLASS.
2012-09-03 Tobias Burnus <burnus@net-b.de>
PR fortran/54467
* class.c (gfc_find_derived_vtab): Fix disabling of _final
by continuing to generate normal type-bound procedures.
2012-09-03 Tobias Burnus <burnus@net-b.de>
* class.c (gfc_find_derived_vtab): Disable ABI-breaking
generation of the "_final" subroutine for now.
2012-09-03 Tobias Burnus <burnus@net-b.de>
* class.c (finalize_component): Fixes to the comment.
2012-09-03 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
Tobias Burnus <burnus@net-b.de>
PR fortran/37336
* gfortran.h (symbol_attribute): Add artificial.
* module.c (mio_symbol_attribute): Handle attr.artificial
* class.c (gfc_build_class_symbol): Defer creation of the vtab
if the DT has finalizers, mark generated symbols as
attr.artificial.
(has_finalizer_component, finalize_component,
finalization_scalarizer, generate_finalization_wrapper):
New static functions.
(gfc_find_derived_vtab): Add _final component and call
generate_finalization_wrapper.
* dump-parse-tree.c (show_f2k_derived): Use resolved
proc_tree->n.sym rather than unresolved proc_sym.
(show_attr): Handle attr.artificial.
* resolve.c (gfc_resolve_finalizers): Ensure that the vtab exists.
(resolve_fl_derived): Resolve finalizers before
generating the vtab.
(resolve_symbol): Also allow assumed-rank arrays with CONTIGUOUS;
skip artificial symbols.
(resolve_fl_derived0): Skip artificial symbols.
2012-09-02 Tobias Burnus <burnus@net-b.de>
PR fortran/54426
* symbol.c (find_common_symtree): New function.
(gfc_undo_symbols): Use it; free common_head if needed.
2012-08-28 Tobias Burnus <burnus@net-b.de>
PR fortran/54389
* trans-decl.c (gfc_get_extern_function_decl,
build_function_decl): Don't mark impure elemental
functions as DECL_PURE_P and honour implicit_pure.
2012-08-28 Tobias Burnus <burnus@net-b.de>
PR fortran/54382
* error.c (show_locus): Avoid out of bound access.
2012-08-28 Tobias Burnus <burnus@net-b.de>
PR fortran/54384
* decl.c (match_data_constant): Add missing gfc_free_expr.
(top_val_list): Remove always-true condition.
* data.c (get_array_index, create_character_initializer):
Free temporary expressions.
(gfc_assign_data_value): Free expression when aborting.
2012-08-28 Tobias Burnus <burnus@net-b.de>
PR fortran/54384
* symbol.c (gfc_copy_formal_args): Set also sym->formal_ns.
2012-08-27 Tobias Burnus <burnus@net-b.de>
PR fortran/54384
* resolve.c (gfc_resolve_character_operator): Free temporary
variables.
* trans-expr.c (gfc_conv_statement_function): Ditto.
2012-08-27 Tobias Burnus <burnus@net-b.de>
PR fortran/54384
* dependency.c (check_section_vs_section): Use gfc_free_expr
instead of free.
* trans-intrinsic.c (conv_generic_with_optional_char_arg): Use
gfc_free_symbol instead of free.
2012-08-27 Tobias Burnus <burnus@net-b.de>
PR fortran/54384
* trans-expr.c (gfc_trans_arrayfunc_assign): Free se.ss
and loop.
2012-08-27 Tobias Burnus <burnus@net-b.de>
PR fortran/41093
* gfortran.h (gfc_common_head): Add "int refs".
* match.c (gfc_match_common): Increment refs.
* resolve.c (resolve_symbol): Only increment formal_ns->refs
if formal_ns is not sym->ns.
* symbol.c (gfc_free_symbol): Only free formal_ns if
if formal_ns is not sym->ns. Free common_block if refs is one.
(gfc_release_symbol): Release formal_ns only if the
symbol is not ENTRY of a module.
* decl.c (get_proc_name): Don't increment gfc_current_ns->refs.
* parse.c (parse_interface): Incement proc_unit->refs++ for
proc-pointer result variables.
* module.c (mio_symbol): Don't increase sym->refs for its
use in sym->formal_ns->proc_name.
2012-08-27 Tobias Burnus <burnus@net-b.de>
PR fortran/54370
* trans-stmt.c (gfc_trans_do_while): Don't change the logical
kind for negation of the condition.
2012-08-27 Tobias Burnus <burnus@net-b.de>
* options.c (set_Wall): Don't set for -Wcompare-reals.
* invoke.texi (-Wall, -Wcompare-reals): -Wall no longer
implies -Wcompare-reals.
2012-08-24 Simon Baldwin <simonb@google.com>
* lang.opt (-cpp=): Mark flag NoDWARFRecord.
2012-08-23 Tobias Burnus <burnus@net-b.de>
PR fortran/54350
* trans-array.c (free_ss_info): Free data.array.subscript.
(gfc_free_ss): No longer free data.array.subscript.
(walk_coarray): New function, moved from trans-intrinsic.c
(gfc_conv_expr_descriptor): Walk array descriptor instead
of taking passed "ss".
(get_array_ctor_all_strlen, gfc_add_loop_ss_code,
gfc_conv_array_parameter): Update call and cleanup ss handling.
* trans-array.h (gfc_conv_expr_descriptor,
gfc_conv_array_parameter): Update prototype.
* trans-expr.c (gfc_conv_derived_to_class,
conv_isocbinding_procedure, gfc_conv_procedure_call,
gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
gfc_trans_pointer_assignment, gfc_trans_arrayfunc_assign): Update
call to gfc_conv_expr_descriptor and gfc_conv_array_parameter, and
clean up.
* trans-intrinsic.c (walk_coarray): Moved to trans-array.c
(trans_this_image, trans_image_index, gfc_conv_intrinsic_rank
gfc_conv_intrinsic_bound, gfc_conv_intrinsic_cobound,
gfc_conv_intrinsic_len, gfc_conv_intrinsic_size,
gfc_conv_intrinsic_sizeof, gfc_conv_intrinsic_storage_size,
gfc_conv_intrinsic_transfer, gfc_conv_allocated,
gfc_conv_associated, gfc_conv_intrinsic_loc,
conv_intrinsic_move_alloc): Update calls.
* trans-io.c (gfc_convert_array_to_string, set_internal_unit,
gfc_trans_transfer): Ditto.
* trans-stmt.c (gfc_conv_elemental_dependencies,
gfc_trans_sync, trans_associate_var,
gfc_trans_pointer_assign_need_temp): Ditto.
2012-08-23 Jakub Jelinek <jakub@redhat.com>
* trans-decl.c (trans_function_start, generate_coarray_init,
create_main_function, gfc_generate_constructors): Call
allocate_struct_function instead of init_function_start.
2012-08-22 Tobias Burnus <burnus@net-b.de>
* trans-expr.c (gfc_copy_class_to_class,
gfc_trans_arrayfunc_assign): Free loop and ss data.
* trans-intrinsic.c (gfc_trans_arrayfunc_assign): Free ss data.
2012-08-21 Tobias Burnus <burnus@net-b.de>
* parse.c (parse_contained): Include EXEC_END_PROCEDURE
in ns->code to make sure the gfc_code is freed.
2012-08-20 Tobias Burnus <burnus@net-b.de>
PR fortran/54301
* expr.c (gfc_check_pointer_assign): Warn when a pointer,
which is a function result, might outlive its target.
2012-08-20 Tobias Burnus <burnus@net-b.de>
PR fortran/54301
* expr.c (gfc_check_pointer_assign): Warn when the pointer
might outlive its target.
* gfortran.h (struct gfc_option_t): Add warn_target_lifetime.
* options.c (gfc_init_options, set_wall, gfc_handle_option):
handle it.
* invoke.texi (-Wtarget-lifetime): Document it.
(-Wall): Implied it.
* lang.opt (-Wtarget-lifetime): New flag.
2012-08-19 Thomas König <tkoenig@gcc.gnu.org>
PR fortran/54298
* gfortran.h (struct gfc_option_t): Add warn_compare_reals.
* lang.opt: Add Wcompare-reals.
* invoke.texi: Document -Wcompare-reals.
* resolve.c (resolve_operator): If -Wcompare-reals is in effect,
warn about equality/inequality comparisions for REAL and COMPLEX.