mirrored from git://gcc.gnu.org/git/gcc.git
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
ChangeLog-2019
3132 lines (2399 loc) · 109 KB
/
ChangeLog-2019
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
2019-12-30 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/91651
* intrinsic.c (add_sym_4ind): New function.
(add_functions): Use it for INDEX.
(resolve_intrinsic): Also call f1m for INDEX.
* intrinsic.h (gfc_resolve_index_func): Adjust prototype to
take a gfc_arglist instead of individual arguments.
* iresolve.c (gfc_resolve_index_func): Adjust arguments.
Remove KIND argument if present, and make sure this is
not done twice.
* trans-decl.c: Include "intrinsic.h".
(gfc_get_extern_function_decl): Special case for resolving INDEX.
2019-12-30 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/92961
* gfortran.h (gfc_seen_div0): Add declaration.
* arith.h (gfc_seen_div0): Add definition.
(eval_intrinsic): For integer division by zero, set gfc_seen_div0.
* decl.c (variable_decl): If resolution resp. simplification
fails for array spec and a division of zero error has been
seen, return MATCH_ERROR.
2019-12-21 Harald Anlauf <anlauf@gmx.de>
PR fortran/92990
* match.c (gfc_match_nullify): Check for valid pointer object.
Reject bounds remapping.
2019-12-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/92753
* expr.c (find_inquiry_ref): Catch INQUIRY_LEN case, where the
temporary expression has been converted to a constant and make
the new expression accordingly. Correct the error in INQUIRY_RE
and INQUIRY_IM cases. The original rather than the resolved
expression was being used as the source in mpfr_set.
2019-12-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/91512
PR fortran/92738
* lang.opt (-finline-arg-packing): Add trailing dot to help text.
2019-12-20 Thomas Koenig <tkoenig@gcc.gnu.org>
PR middle-end/91512
PR fortran/92738
* invoke.texi: Document -finline-arg-packing.
* lang.opt: Add -finline-arg-packing.
* options.c (gfc_post_options): Handle -finline-arg-packing.
* trans-array.c (gfc_conv_array_parameter): Use
flag_inline_arg_packing instead of checking for optimize and
optimize_size.
2019-12-20 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92996
* expr.c (simplify_parameter_variable): Call gfc_resolve_ref and
gfc_expression_rank; fix location info.
* gfortran.h (gfc_resolve_ref, gfc_expression_rank): Declare.
* match.c (gfc_match_stopcode): Remove redundant setting of
gfc_init_expr_flag; early return if gfc_simplify_expr has an error.
* resolve.c (gfc_expression_rank): Renamed from expression_rank;
minor cleanup.
(gfc_resolve_ref): Removed static and renamed from resolve_ref.
(resolve_variable, resolve_typebound_function,
resolve_typebound_subroutine, resolve_ppc_call, resolve_expr_ppc,
gfc_resolve_expr, resolve_procedure): Update calls.
2019-12-20 Tobias Burnus <tobias@codesourcery.com>
* openmp.c (resolve_omp_clauses): Move is-coindexed check from here ...
(gfc_match_omp_variable_list): ... to here.
2019-12-19 Julian Brown <julian@codesourcery.com>
* openmp.c (resolve_oacc_data_clauses): Don't disallow allocatable
polymorphic types for OpenACC.
* trans-openmp.c (gfc_trans_omp_clauses): Support polymorphic class
types.
2019-12-19 Julian Brown <julian@codesourcery.com>
* gfortran.h (gfc_omp_map_op): Add OMP_MAP_ATTACH, OMP_MAP_DETACH.
* openmp.c (gfc_match_omp_variable_list): Add allow_derived parameter.
Parse derived-type member accesses if true.
(omp_mask2): Add OMP_CLAUSE_ATTACH and OMP_CLAUSE_DETACH.
(gfc_match_omp_map_clause): Add allow_derived parameter. Pass to
gfc_match_omp_variable_list.
(gfc_match_omp_clauses): Support attach and detach. Support derived
types for appropriate OpenACC directives.
(OACC_PARALLEL_CLAUSES, OACC_SERIAL_CLAUSES, OACC_KERNELS_CLAUSES,
OACC_DATA_CLAUSES, OACC_ENTER_DATA_CLAUSES): Add OMP_CLAUSE_ATTACH.
(OACC_EXIT_DATA_CLAUSES): Add OMP_CLAUSE_DETACH.
(check_symbol_not_pointer): Don't disallow pointer objects of derived
type.
(resolve_oacc_data_clauses): Don't disallow allocatable derived types.
(resolve_omp_clauses): Perform duplicate checking only for non-derived
type component accesses (plain variables and arrays or array sections).
Support component refs.
* trans-expr.c (gfc_conv_component_ref,
conv_parent_component_references): Make global.
(gfc_maybe_dereference_var): New function, broken out of...
(gfc_conv_variable): ...here. Call above function.
* trans-openmp.c (gfc_omp_privatize_by_reference): Support component
refs.
(gfc_trans_omp_array_section): New function, broken out of...
(gfc_trans_omp_clauses): ...here. Support component refs/derived
types, attach and detach clauses.
* trans.h (gfc_conv_component_ref, conv_parent_component_references,
gfc_maybe_dereference_var): Add prototypes.
2019-12-19 Mark Eggleston <mark.eggleston@codethink.com>
PR fortran/92896
* array.c (walk_array_constructor): Replace call to gfc_convert_type
with call to gfc_convert_type_warn with new argument set to true.
(check_element_type): Replace call to cfg_convert_type with call to
gfc_convert_type_warn with new argument set to true.
* gfortran.h: Add argument "array" to gfc_convert_type_warn default
value set to false.
*intrinsic.c (gfc_convert_type_warn): Update description of arguments.
Add new argument to argument list. Add check for conversion to numeric
or logical from character and array set to true, i.e. if conversion
from character is in an array constructor reject it, goto bad.
2019-12-19 Jakub Jelinek <jakub@redhat.com>
PR fortran/92977
* frontend-passes.c (call_external_blas): Use || instead of |.
2019-12-19 Jakub Jelinek <jakub@redhat.com>
PR fortran/92977
* frontend-passes.c (in_omp_atomic): New variable.
(cfe_expr_0, matmul_to_var_expr, matmul_temp_args,
inline_matmul_assign, call_external_blas): Don't optimize in
EXEC_OMP_ATOMIC.
(optimize_namespace): Clear in_omp_atomic.
(gfc_code_walker): Set in_omp_atomic for EXEC_OMP_ATOMIC, save/restore
it around.
2019-12-19 Julian Brown <julian@codesourcery.com>
Maciej W. Rozycki <macro@codesourcery.com>
Tobias Burnus <tobias@codesourcery.com>
Thomas Schwinge <thomas@codesourcery.com>
* gfortran.h (gfc_omp_map_op): Add OMP_MAP_NO_ALLOC.
* openmp.c (omp_mask2): Add OMP_CLAUSE_NO_CREATE.
(gfc_match_omp_clauses): Support no_create.
(OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES)
(OACC_DATA_CLAUSES): Add OMP_CLAUSE_NO_CREATE.
* trans-openmp.c (gfc_trans_omp_clauses_1): Support
OMP_MAP_NO_ALLOC.
2019-12-18 Harald Anlauf <anlauf@gmx.de>
PR fortran/70853
* trans-expr.c (gfc_trans_pointer_assignment): Reject bounds
remapping if pointer target is NULL().
2019-12-12 Harald Anlauf <anlauf@gmx.de>
PR fortran/92898
* check.c (gfc_check_is_contiguous): Simplify check to handle
arbitrary NULL() argument.
2019-12-11 Jakub Jelinek <jakub@redhat.com>
PR fortran/92899
* trans-openmp.c (gfc_trans_omp_atomic): For GFC_OMP_ATOMIC_SWAP,
do look through conversion on expr2 if any.
2019-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/92897
* array.c (gfc_set_array_spec): Remove invalid assert() triggered
by invalid Fortran code.
2019-12-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/91643
* trans-array.c (gfc_conv_array_parameter): Do not repack
an assumed rank dummy argument.
2019-12-10 Martin Liska <mliska@suse.cz>
PR fortran/92874
* dependency.c (gfc_dep_compare_expr): Bail out
when one of the arguments is null.
2019-12-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/92863
* misc.c (gfc_typename): If derived component is NULL for
derived or class, return "invalid type" or "invalid class",
respectively.
2019-12-10 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92872
* trans-array.c (get_CFI_desc): Fix cond whether saved desc exists.
2019-12-09 David Malcolm <dmalcolm@redhat.com>
* error.c (gfc_diagnostic_starter): Add pp_newline call before
call to diagnostic_show_locus.
2019-12-09 Frederik Harwath <frederik@codesourcery.com>
* trans-openmp.c (gfc_trans_omp_reduction_list): Pass correct location for each
clause to build_omp_clause.
2018-12-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/92780
* resolve.c (resolve_assoc_var): Issue error if the associating
entity is a program.
2018-12-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/92764
* interface.c (gfc_procedure_use): Check for existence of derived
component before using (twice).
2019-12-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/92755
* dependency.c (gfc_dep_resolver): Move skipping of _data ref
into the loop.
2019-12-07 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92793
* trans.c (gfc_get_location): Declare.
* trans.c (gfc_get_location): Define; returns column-corrected location.
(trans_runtime_error_vararg, gfc_trans_runtime_check,
gfc_generate_module_code): Use new function.
* trans-array.c (gfc_trans_auto_array_allocation): Likewise.
* trans-common.c (build_field, get_init_field, create_common): Likewise.
* trans-decl.c (gfc_build_label_decl, gfc_get_symbol_decl): Likewise.
* trans-openmp.c (gfc_trans_omp_reduction_list, gfc_trans_omp_clauses):
Likewise.
* trans-stmt.c (gfc_trans_if_1): Likewise.
2019-12-06 Jakub Jelinek <jakub@redhat.com>
PR fortran/92775
* trans.h (struct lang_type, struct lang_decl): Remove span member.
(GFC_DECL_SPAN, GFC_TYPE_ARRAY_SPAN): Remove macros.
* trans-array.h (gfc_get_descriptor_offsets_for_info): Add another
argument.
* trans-array.c (gfc_get_descriptor_offsets_for_info): Add SPAN_OFF
argument and initialize *SPAN_OFF to the offset of span field.
* trans-types.c (gfc_get_array_descr_info): Adjust
gfc_get_descriptor_offsets_for_info caller. Compute elem_size
as base->span instead of TYPE_SIZE_UNIT (etype) constant.
2019-12-06 Tobias Burnus <tobias@codesourcery.com>
Kwok Cheung Yeung <kcy@codesourcery.com>
* trans-openmp.c (gfc_build_conditional_assign,
gfc_build_conditional_assign_expr): New static functions.
(gfc_omp_finish_clause, gfc_trans_omp_clauses): Handle mapping of
absent optional arguments and fix mapping of present optional args.
2019-12-05 Tobias Burnus <tobias@codesourcery.com>
* trans-openmp.c (gfc_omp_is_optional_argument,
gfc_omp_check_optional_argument): Handle type(c_ptr),value which uses a
2019-12-05 Jakub Jelinek <jakub@redhat.com>
PR fortran/92781
* trans-decl.c (gfc_get_symbol_decl): If sym->backend_decl is
current_function_decl, add length to current rather than parent
function and expect DECL_CONTEXT (length) to be current_function_decl.
2019-12-04 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92754
* intrinsic.c (gfc_intrinsic_func_interface): Set
sym's flavor, intrinsic and function attribute if
unset.
2019-12-04 Jakub Jelinek <jakub@redhat.com>
PR fortran/92756
* trans-openmp.c (gfc_trans_omp_teams): Wrap OMP_TEAMS body into a
BIND_EXPR with a forced BLOCK.
2019-11-30 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/91783
* dependency.c (gfc_dep_resolver): Do not look at _data
component if present.
2019-11-28 Jerry DeLisle <jvdelisle@gcc.ngu.org>
PR fortran/90374
* io.c (check_format): Allow zero width expoenent with e0.
2019-11-27 Jakub Jelinek <jakub@redhat.com>
PR fortran/91944
* simplify.c (gfc_simplify_spread): Check gfc_init_expr_flag instead
of gfc_current_ns->sym_root->n.sym->attr.flavor == FL_PARAMETER.
2019-11-27 Tobias Burnus <tobias@codesourcery.com>
PR middle-end/92463
* arith.c (gfc_check_real_range): Replace mp_exp_t by mpfr_exp_t.
2019-11-25 Harald Anlauf <anlauf@gmx.de>
PR fortran/92629
* simplify.c (convert_mpz_to_unsigned): Skip assert for argument
range when -fno-range-check is specified.
2019-11-25 Mark Eggleston <mark.eggleston@codethink.com>
Jim MacArthur <jim.macarthur@codethink.co.uk>
* gfortran.texi: Update Hollerith constants support for character types
and use in comparisons.
* invoke.texi: Tidy up list of options. Update description of
-fdec-char-conversions.
* resolve.c (is_character_based): New.
(Convert_hollerith_to_character): New. (convert_to_numeric): New.
(resolve_operator): If both sides are character based and -fdec is
enabled convert Hollerith to character. If an operand is Hollerith, the
other is numeric and -fdec is enabled convert to numeric.
(resolve_ordinary_assign): Add check for -fdec-char-conversions for
assignment of character literals.2019-11-20 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/92463
Revert r269139
* simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
mpfr_regular_p instead of mpfr_number_p && !mpfr_zero_p.
(norm2_add_squared): Likewise. Use mpfr_exp_t rather than
mp_exp_t.
2019-11-20 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/92463
* arith.c (gfc_mpfr_to_mpz): Change mp_exp_t to mpfr_exp_t.
(gfc_check_real_range): Likewise.
* gfortran.h (GFC_RND_MODE): Change GMP_RNDN to MPFR_RNDN.
* module.c (mio_gmp_real): Change mp_exp_t to mpfr_exp_t.
* simplify.c (degrees_f): Change mp_rnd_t to mpfr_rnd_t.
(radians_f): Likewise.
(fullprec_erfc_scaled): Change mp_prec_t to mpfr_prec_t.
(asympt_erfc_scaled): Likewise.
(gfc_simplify_nearest): Change mp_exp_t to mpfr_exp_t, and
GMP_RND* to MPFR_RND*.
2019-11-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69654
* trans-expr.c (gfc_trans_structure_assign): Move assignment to
'cm' after treatment of C pointer types and test that the type
has been completely built before it. Add an assert that the
backend_decl for each component exists.
2019-11-13 Tobias Burnus <tobias@codesourcery.com>
* trans-expr.c (gfc_conv_procedure_call): Fold hidden
is-present argument to the right type.
2019-11-12 Harald Anlauf <anlauf@gmx.de>
PR fortran/81651
* module.c (gzopen_included_file, gzopen_included_file_1)
(gzopen_intrinsic_module, bad_module, gfc_use_module): Use fully
qualified module path for error reporting.
2019-11-12 Martin Liska <mliska@suse.cz>
* options.c (gfc_init_options):
Use SET_OPTION_IF_UNSET.
2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
Frederik Harwath <frederik@codesourcery.com>
gcc/fortran/
* gfortran.h (gfc_statement): Add ST_OACC_SERIAL_LOOP,
ST_OACC_END_SERIAL_LOOP, ST_OACC_SERIAL and ST_OACC_END_SERIAL
enumeration constants.
(gfc_exec_op): Add EXEC_OACC_SERIAL_LOOP and EXEC_OACC_SERIAL
enumeration constants.
* match.h (gfc_match_oacc_serial): New prototype.
(gfc_match_oacc_serial_loop): Likewise.
* dump-parse-tree.c (show_omp_node, show_code_node): Handle
EXEC_OACC_SERIAL_LOOP and EXEC_OACC_SERIAL.
* match.c (match_exit_cycle): Handle EXEC_OACC_SERIAL_LOOP.
* openmp.c (OACC_SERIAL_CLAUSES): New macro.
(gfc_match_oacc_serial_loop): New function.
(gfc_match_oacc_serial): Likewise.
(oacc_is_loop): Handle EXEC_OACC_SERIAL_LOOP.
(resolve_omp_clauses): Handle EXEC_OACC_SERIAL.
(oacc_code_to_statement): Handle EXEC_OACC_SERIAL and
EXEC_OACC_SERIAL_LOOP.
(gfc_resolve_oacc_directive): Likewise.
* parse.c (decode_oacc_directive) <'s'>: Add case for "serial"
and "serial loop".
(next_statement): Handle ST_OACC_SERIAL_LOOP and ST_OACC_SERIAL.
(gfc_ascii_statement): Likewise. Handle ST_OACC_END_SERIAL_LOOP
and ST_OACC_END_SERIAL.
(parse_oacc_structured_block): Handle ST_OACC_SERIAL.
(parse_oacc_loop): Handle ST_OACC_SERIAL_LOOP and
ST_OACC_END_SERIAL_LOOP.
(parse_executable): Handle ST_OACC_SERIAL_LOOP and
ST_OACC_SERIAL.
(is_oacc): Handle EXEC_OACC_SERIAL_LOOP and EXEC_OACC_SERIAL.
* resolve.c (gfc_resolve_blocks, gfc_resolve_code): Likewise.
* st.c (gfc_free_statement): Likewise.
* trans-openmp.c (gfc_trans_oacc_construct): Handle
EXEC_OACC_SERIAL.
(gfc_trans_oacc_combined_directive): Handle
EXEC_OACC_SERIAL_LOOP.
(gfc_trans_oacc_directive): Handle EXEC_OACC_SERIAL_LOOP and
EXEC_OACC_SERIAL.
* trans.c (trans_code): Likewise.
2019-11-11 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/91828
* simplify.c (gfc_simplify_fraction): Remove fallback path for
MPFR < 3.1.0.
2019-11-11 Tobias Burnus <tobias@codesourcery.com>
Kwok Cheung Yeung <kcy@codesourcery.com>
* trans-expr.c (gfc_conv_expr_present): Check for DECL_ARTIFICIAL
for the VALUE hidden argument avoiding -fallow-underscore issues.
* trans-decl.c (create_function_arglist): Also set
GFC_DECL_OPTIONAL_ARGUMENT for per-value arguments.
* f95-lang.c (LANG_HOOKS_OMP_CHECK_OPTIONAL_ARGUMENT):
Renamed from LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT; point
to gfc_omp_check_optional_argument.
* trans.h (gfc_omp_check_optional_argument): Subsitutes
gfc_omp_is_optional_argument declaration.
* trans-openmp.c (gfc_omp_is_optional_argument): Make static.
(gfc_omp_check_optional_argument): New function.
2019-11-10 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/91413
* trans-decl.c (gfc_finish_var_decl): Don't print warning when
-fno-automatic is enabled.
2019-11-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/92123
*decl.c (gfc_verify_c_interop_param): Remove error asserting
that pointer or allocatable variables in a bind C procedure are
not supported. Delete some trailing spaces.
* trans-stmt.c (trans_associate_var): Correct the attempt to
treat scalar pointer or allocatable temporaries as if they are
array descriptors.
2019-11-09 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/92321
* frontend-passes.c (call_external_blas): Commit symbol for
external BLAS routine.
2019-11-08 Jakub Jelinek <jakub@redhat.com>
* arith.c (character2representation): Change i type to size_t.
2019-11-08 Mark Eggleston <mark.eggleston@codethink.com>
Jim MacArthur <jim.macarthur@codethink.co.uk>
* arith.c (hollerith2representation): Use OPT_Wcharacter_truncation in
call to gfc_warning.
(character2representation, gfc_character2int, gfc_character2real,
gfc_character2complex and gfc_character2logical): New.
* arith.h (gfc_character2int, gfc_character2real, gfc_character2complex,
gfc_character2logical): Declare.
* expr.c (gfc_check_assign): Return true if left hand side is numeric
or logical and the right hand side is character and of kind=1.
* gfortran.texi: Add -fdec-char-conversions.
* intrinsic.c (add_conversions): Add conversions from character to
integer, real, complex and logical types for their supported kinds.
(gfc_convert_type_warn): Reorder if..else if.. sequence so that warnings
are produced for conversion to logical.
* invoke.texi: Add option to list of options.
* invoke.texi: Add Character conversion subsection to Extensions
section.
* lang.opt: Add new option.
* options.c (set_dec_flags): Add SET_BITFLAG for
flag_dec_char_conversions.
* resolve.c (resolve_ordindary_assign): Issue error if the left hand
side is numeric or logical and the right hand side is a character
variable.
* simplify.c (gfc_convert_constant): Assign the conversion function
depending on destination type.
* trans-const.c (gfc_constant_to_tree): Use OPT_Wsurprising in
gfc_warning allowing the warning to be switched off only if
flag_dec_char_conversions is enabled.
2019-11-08 Tobias Burnus <tobias@codesourcery.com
PR fortran/91253
* scanner.c (skip_fixed_comments): Move comment
lines to next if block.
(gfc_next_char_literal): Fix continue_line setting.
(get_file): Remove bogus ATTRIBUTE_UNUSED.
2019-11-06 Jerry DeLisle <jvdelisle@gcc.ngu.org>
PR fortran/90374
* io.c (check_format): Allow zero width for D, E, EN, and ES
specifiers as default and when -std=F2018 is given. Retain
existing errors when using the -fdec family of flags.
2019-11-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/92113
* trans-decl.c (gfc_get_symbol_decl): If __def_init actually
contains a value, put it into the read-only section.
2019-11-01 Steven G. Kargl <kargl@gcc.gnu.org>
* decl.c (match_byte_typespec): New function. Match BYTE type-spec.
(gfc_match_decl_type_spec): Use it.
2019-11-01 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/90988
* decl.c (gfc_match_private, gfc_match_public): Fixed-form source code
does not require whitespace between PRIVATE (or PUBLIC) and an entity.
2019-11-01 Tobias Burnus <tobias@codesourcery.com>
* f95-lang.c (LANG_HOOKS_OMP_ARRAY_DATA): Set to gfc_omp_array_data.
* trans-array.c (gfc_conv_descriptor_data_get): Handle also
REFERENCE_TYPE.
* trans-openmp.c (gfc_omp_array_data): New.
* trans.h (gfc_omp_array_data): New prototype.
2019-10-31 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92284.
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Free CFI descriptor
at the end; partial revised revert of Rev. 277502.
2019-10-31 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92277
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Fix DECL_ARTIFICIAL
checking.
2019-10-30 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92208
* trans-array.c (gfc_conv_array_parameter): Only copy
string-length backend_decl if expression is not a function.
2019-10-30 Mark Eggleston <mark.eggleston@codethink.com>
* invoke.texi: Add -Wno-overwrite-recursive to list of options. Add
description of -Wno-overwrite-recursive. Fix typo in description
of -Winteger-division.
* lang.opt: Add option -Woverwrite-recursive initialised as on.
* option.c (gfc_post_options): Output warning only if it is enabled.
2019-10-28 Tobias Burnus <tobias@codesourcery.com>
PR fortran/91863
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Don't free data
memory as that's done on the Fortran side.
(gfc_conv_procedure_call): Handle void* pointers from
gfc_conv_gfc_desc_to_cfi_desc.
2019-10-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/86248
* resolve.c (flag_fn_result_spec): Correct a typo before the
function declaration.
* trans-decl.c (gfc_sym_identifier): Boost the length of 'name'
to allow for all variants. Simplify the code by using a pointer
to the symbol's proc_name and taking the return out of each of
the conditional branches. Allow symbols with fn_result_spec set
that do not come from a procedure namespace and have a module
name to go through the non-fn_result_spec branch.
2019-10-25 Cesar Philippidis <cesar@codesourcery.com>
Tobias Burnus <tobias@codesourcery.com>
* openmp.c (gfc_match_omp_map_clause): Add and pass allow_commons
argument.
(gfc_match_omp_clauses): Update calls to permit common blocks for
OpenACC's copy/copyin/copyout, create/delete, host,
pcopy/pcopy_in/pcopy_out, present_or_copy, present_or_copy_in,
present_or_copy_out, present_or_create and self.
2019-10-24 Martin Liska <mliska@suse.cz>
PR fortran/92174
* array.c (gfc_resolve_array_spec): Break the loop
for out of bounds index.
* resolve.c (is_non_constant_shape_array): Likewise.
2019-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
dump-parse-tree.c (show_expr): Add dumping of BT_BOZ constants.
2019-10-22 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/92174
* decl.c (attr_decl1): Move check for F2018:C822 from here ...
* array.c (gfc_set_array_spec): ... to here.
2019-10-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/69455
* trans-decl.c (generate_local_decl): Avoid misconstructed
intrinsic modules in a BLOCK construct.
2019-10-18 Tobias Burnus <tobias@codesourcery.com>
PR fortran/91586
* class.c (gfc_find_derived_vtab): Return NULL
instead of deref'ing NULL pointer.
2019-10-15 James Norris <jnorris@codesourcery.com>
Tobias Burnus <tobias@codesourcery.com>
PR fortran/65438
* openmp.c (check_array_not_assumed): Remove pointer check.
2019-10-14 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/89943
decl.c (gfc_match_function_decl): Ignore duplicate BIND(C) for function
declaration in submodule. Implement at check for F2018 C1550.
(gfc_match_entry): Use temporary for locus, which allows removal of
one gfc_error_now().
(gfc_match_subroutine): Ignore duplicate BIND(C) for subroutine
declaration in submodule. Implement at check for F2018 C1550.
2019-10-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/92004
* array.c (expand_constructor): Set from_constructor on
expression.
* gfortran.h (gfc_symbol): Add maybe_array.
(gfc_expr): Add from_constructor.
* interface.c (maybe_dummy_array_arg): New function.
(compare_parameter): If the formal argument is generated from a
call, check the conditions where an array element could be
passed to an array. Adjust error message for assumed-shape
or pointer array. Use correct language for assumed shaped arrays.
(gfc_get_formal_from_actual_arglist): Set maybe_array on the
symbol if the actual argument is an array element fulfilling
the conditions of 15.5.2.4.
2019-10-14 Tobias Burnus <tobias@codesourcery.com>
* error.c: Remove debug pragma added in previous commit.
2019-10-14 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92072
* error.c (error_print, gfc_format_decoder): Fix %C column-
offset handling.
2019-10-13 Damian Rouson <damain@sourceryinstitue.org>
PR fortran/91513
* resolve.c (resolve_ordinary_assign): Improved error message.
2019-10-13 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/90297
* resolve.c (resolve_typebound_function): Remove code with no
functional effect.
2019-10-13 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/92017
* expr.c (simplify_parameter_variable): Set the character length
of the result expression from the original expression if
necessary.
2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91649
check.c (gfc_check_findloc): Additional checking for valid arguments
2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91715
* decl.c (gfc_match_prefix): If matching a type-spec returns an error,
it's an error so re-act correctly.
2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/92018
* check.c (reset_boz): New function.
(illegal_boz_arg, boz_args_check, gfc_check_complex, gfc_check_float,
gfc_check_transfer): Use it.
(gfc_check_dshift): Use reset_boz, and re-arrange the checking to
help suppress possible run-on errors.
(gfc_check_and): Restore checks for valid argument types. Use
reset_boz, and re-arrange the checking to help suppress possible
run-on errors.
* resolve.c (resolve_function): Actual arguments cannot be BOZ in
a function reference.
2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/92019
* array.c (match_subscript): BOZ cannot be an array subscript.
2019-10-11 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92050
* trans-expr.c (gfc_conv_procedure_call): Handle code generated
by -fcheck=all.
2019-10-11 Tobias Burnus <tobias@codesourcery.com>
* f95-lang.c (LANG_HOOKS_OMP_IS_ALLOCATABLE_OR_PTR): Re-define to
gfc_omp_is_allocatable_or_ptr.
* trans-decl.c (create_function_arglist): Set GFC_DECL_OPTIONAL_ARGUMENT
only if not passed by value.
* trans-openmp.c (gfc_omp_is_allocatable_or_ptr): New.
(gfc_trans_omp_clauses): For MAP, handle (present) optional arguments;
for target update, handle allocatable/pointer scalars.
* trans.h (gfc_omp_is_allocatable_or_ptr): Declare.
2019-10-10 Tobias Burnus <tobias@codesourcery.com>
* trans-openmp.c (gfc_trans_omp_clauses): Actually pass use_device_addr
on to the middle end.
2019-10-08 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91801
* simplify.c (gfc_simplify_reshape): Convert a gcc_assert into a
gfc_error as a user can easily hit the condition.
2019-10-08 Tobias Burnus <tobias@codesourcery.com>
* parse.c (parse_executable): Add missing ST_OMP_TARGET_SIMD.
2019-10-08 Tobias Burnus <tobias@codesourcery.com>
* match.h (gfc_match_omp_eos_error): Renamed from gfc_match_omp_eos.
* openmp.c (gfc_match_omp_eos): Make static.
(gfc_match_omp_eos_error): New.
* parse.c (matchs, matchdo, matchds): Do as done for 'matcho' -
if error occurred after OpenMP/OpenACC directive matched, do not
try other directives.
(decode_oacc_directive, decode_omp_directive): Call new function
instead.
2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/47045
* decl.c (variable_decl): Do not search parent namespace for symbol.
2019-10-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/91926
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Correct the
assignment of the attribute field to account correctly for an
assumed shape dummy. Assign separately to the gfc and cfi
descriptors since the atribute can be different. Add btanch to
correctly handle missing optional dummies.
2019-10-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran.91959
* fortran/decl.c (variable_decl): Re-arrange code for matching %FILL.
2019-10-04 Tobias Burnus <tobias@codesourcery.com>
* error.c (error_print, gfc_format_decoder): Fix off-by one issue
with %C.
2019-10-03 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91497
* simplify.c (gfc_simplify_dble, simplify_intconv, gfc_simplify_real,
gfc_simplify_sngl): Disable -Wconversion and -Wconversion-extra
warnings for explicit conversion of literal constants.
2019-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
* primary.c (match_real_constant): Remove shadowing local vars.
Rename local vars. Fix undefined behavior in loop termination.
(gfc_convert_to_structure_constructor): Rename local var.
2019-10-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/84487
* trans-decl.c (gfc_get_symbol_decl): For __def_init, set
DECL_ARTIFICAL and do not set TREE_READONLY.
2019-10-03 Mark Eggleston <mark.eggleston@codethink.com>
* array.c (check_element_type): Call gfc_typename with the gfc_expr
"expr" instead of its gfc_typespec "ts".
* check.c (gfc_check_co_reduce): Call gfc_typename with the gfc_expr
"a" instead of its gfc_typespec "ts".
(gfc_check_co_reduce): Call gfc_typename with the gfc_expr "a" instead
of its gfc_typespec "ts".
(gfc_check_eoshift): Call gfc_typename with the gfc_expr "array"
instead of its gfc_typespec ts.
(gfc_check_same_type_as): In two calls to gfc_typename use "a" and "b"
of type gfc_expr instead of the "ts" fields of "a" and "b"
* decl.c (variable_decl): Call gfc_typename with the gfc_expr
"initializer" instead of its gfc_typespec "ts".
* expr.c (gfc_check_assign): Use "rvalue" and "lvalue" of type gfc_expr
in calls to gfc_typename instead of their "ts" fields of type
gfc_typespec.
(gfc_check_pointer_assign): Use "rvalue" and "lvalue" of type gfc_expr
in calls to gfc_typename instead of their "ts" fields of type
gfc_typespec.
* gfortran.h: Add prototypes for gfc_dummy_typename and a new function
gfc_typename for gfc_expr *.
*interface.c (gfc_check_dummy_characteristics): Use gfc_dummy_typename
for the dummy variable.
(compare_parameter): Use gfc_dummy_typename for the formal argument.
Use "actual" of type gfc_expr in call to gfc_typename for the actual
argument.
* intrinsic.c (check_arglist): Use gfc_dummy_typename for the formal
argument. Use expressions of type gfc_expr from the argument list to
call gfc_typename.
(gfc_convert_type_warn): New local variable "is_char_constant" set if
the expression type is a character constant. At the "bad" label
determine source type name by calling gfc_typename with either "expr"
for character constants or "from_ts" and use that in the warning
messages instead of the original call to gfc_typename.
* misc.c (gfc_typename): New function for gfc_expr *, use for where
character types are possible it can get the character length from
gfc_expr for character literals.
(gfc_dummy_typename): New functionfor gfc_typespec *, if no character
length is present the character type is assumed and the appropriate
string is return otherwise it calls gfc_typename for gfc_typespec *.
(gfc_typespec): for character types construct the type name with length
and kind (if it is not default kind).
2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91784
* simplify.c (gfc_convert_constant): Simplify expression if the
expression type is EXPR_OP.
2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91785
* primary.c (gfc_match_varspec): Ensure an inquiry parameter has
it locus set.
2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91942
* io.c (match_vtag): Check for non-NULL result->symtree.
(match_out_tag): Check for invalid constant due to inquiry parameter.
(match_filepos): Instead of a syntax error, go to cleanup to get better
error messages.
2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91943
* match.c (gfc_match_call): BOZ cannot be an actual argument in
a subroutine reference.
* resolve.c (resolve_function): BOZ cannot be an actual argument in
a function reference.
2019-10-01 Jan Hubicka <jh@suse.cz>
* module.c (load_commons): Initialize flags to 0 to silence
-Wmaybe-uninitialized warning.
(read_module): Likewise for n and comp_name.
2019-10-02 Tobias Burnus <tobias@codesourcery.com>
* dump-parse-tree.c (show_omp_clauses): Handle OMP_LIST_USE_DEVICE_ADDR.
* gfortran.h (enum): Add OMP_LIST_USE_DEVICE_ADDR.
* openmp.c (omp_mask1): Likewise.
(gfc_match_omp_clauses): Match 'use_device_addr'.
(OMP_TARGET_DATA_CLAUSES): Add OMP_LIST_USE_DEVICE_ADDR.
(resolve_omp_clauses): Add it; add is_device_ptr checks.
2019-10-02 Tobias Burnus <tobias@codesourcery.com>
* openmp.c (gfc_match_omp_clauses): Show a clause-parsing
error if none was rised before.
* parse.c (matcha, matcho): If error occurred after
OpenMP/OpenACC directive matched, do not try other directives.
2019-10-02 Tobias Burnus <tobias@codesourcery.com>
* trans-openmp.c (gfc_omp_is_optional_argument): Fix coding
style.
2019-10-02 Kwok Cheung Yeung <kcy@codesourcery.com>
* f95-lang.c (LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT): Define to
gfc_omp_is_optional_argument.
* trans-decl.c (create_function_arglist): Set
GFC_DECL_OPTIONAL_ARGUMENT in the generated decl if the parameter is
optional.
* trans-openmp.c (gfc_omp_is_optional_argument): New.
(gfc_omp_privatize_by_reference): Return true if the decl is an
optional pass-by-reference argument.
* trans.h (gfc_omp_is_optional_argument): New declaration.
(lang_decl): Add new optional_arg field.
(GFC_DECL_OPTIONAL_ARGUMENT): New macro.
2019-10-01 David Malcolm <dmalcolm@redhat.com>
* error.c (gfc_diagnostic_starter): Clear the prefix before
calling diagnostic_show_locus.
2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91641
* check.c (gfc_check_is_contiguous): null() cannot be an actual
argument to is_contiguous().
2019-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91714
* decl.c (gfc_match_decl_type_spec): Issue errors for a few
mangled types.
2019-09-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/91726
* resolve.c (gfc_expr_to_initialize): Bail out with a copy of
the original expression if the array ref is a scalar and the
array_spec has corank.
* trans-array.c (gfc_conv_array_ref): Such expressions are OK
even if the array ref codimen is zero.
* trans-expr.c (gfc_get_class_from_expr): New function taken
from gfc_get_vptr_from_expr.
(gfc_get_vptr_from_expr): Call new function.
* trans-stmt.c (trans_associate_var): If one of these is a
target expression, extract the class expression from the target
and copy its fields to a new target variable.
* trans.h : Add prototype for gfc_get_class_from_expr.
2019-09-28 Jerry DeLisle <jvdelisle@gcc.ngu.org>
PR fortran/91802
* decl.c (attr_decl1): Return MATCH_ERROR without free to avoid
bad expression type in free_expr0() ICE in rank+corank check.
2019-09-28 Steven G. Kargl <kargl@gcc.ngu.org>
PR fortran/91802
* decl.c (attr_decl1): Check if rank+corank > 15.
2019-09-28 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91864
* gcc/fortran/io.c (match_io_element): An inquiry parameter cannot be
read into.
* gcc/fortran/match.c (gfc_match_allocate): An inquiry parameter
can be neither an allocate-object nor stat variable.
(gfc_match_deallocate): An inquiry parameter cannot be deallocated.
2019-09-26 Alessandro Fanfarillo <afanfa@gcc.gnu.org>
* trans-array.c (structure_alloc_comps):
Add new enum item for BCAST_ALLOC_COMP.
New argument for structure_alloc_comp, and new case to handle
recursive components in derived types.
* trans-array.c (gfc_bcast_alloc_comp): New function
used to handleco_broadcast for allocatable components
of derived types.
* trans-array.h: Add gfc_bcast_alloc_comp
* trans-intrinsics.c (conv_co_collective): Add check for
derived type variable and invocation of co_bcast_alloc_comp.
* trans.h: New data structure gfc_co_subroutines_args.
2019-09-25 David Malcolm <dmalcolm@redhat.com>
PR fortran/91426
* error.c (curr_diagnostic): New static variable.
(gfc_report_diagnostic): New static function.
(gfc_warning): Replace call to diagnostic_report_diagnostic with
call to gfc_report_diagnostic.
(gfc_format_decoder): Colorize the text of %L and %C to match the
colorization used by diagnostic_show_locus.
(gfc_warning_now_at): Replace call to diagnostic_report_diagnostic with
call to gfc_report_diagnostic.
(gfc_warning_now): Likewise.
(gfc_warning_internal): Likewise.
(gfc_error_now): Likewise.
(gfc_fatal_error): Likewise.
(gfc_error_opt): Likewise.