aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/ChangeLog.gomp
blob: 8a6ae6a9697df71b9c6c6cc97e5ecc7d7b02a24a (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
2017-05-14  Thomas Schwinge  <thomas@codesourcery.com>

	* openmp.c (OACC_KERNELS_CLAUSES)
	(OACC_KERNELS_CLAUSE_DEVICE_TYPE_MASK): Add
	"OMP_CLAUSE_NUM_GANGS", "OMP_CLAUSE_NUM_WORKERS",
	"OMP_CLAUSE_VECTOR_LENGTH".

2017-05-04  Cesar Philippidis  <cesar@codesourcery.com>

	* gfortran.h (gfc_omp_clauses): Add if_present member.
	* openmp.c (enum omp_mask2): Add OMP_CLAUSE_IF_PRESENT.
	(gfc_match_omp_clauses): Handle it.
	(OACC_UPDATE_CLAUSES): Add OMP_CLAUSE_IF_PRESENT.
	* trans-openmp.c (gfc_trans_omp_clauses_1): Generate an omp clause for
	if_present.

2017-05-01  Cesar Philippidis  <cesar@codesourcery.com>

	* gfortran.h (enum oacc_function): Add OACC_FUNCTION_AUTO.
	* openmp.c (gfc_oacc_routine_dims): Return OACC_FUNCTION_AUTO when no
	parallelism was detected.
	(gfc_match_oacc_routine): Emit a warning when the user doesn't
	supply a gang, worker, vector or seq clause to an OpenACC routine
	construct.
	(resolve_oacc_loop_blocks): Emit an error on orphan OpenACC
	gang reductions.

2017-04-27  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (gfc_match_oacc_routine): Don't match OpenACC routines
	when the current function failed to parse due to a syntax error.

2017-04-19  Cesar Philippidis  <cesar@codesourcery.com>

	* trans-decl.c (add_clause): Populate sym->backend_decl so that it
	can be used to determine if two symbols are unique.
	* trans-openmp.c (gfc_trans_oacc_executable_directive): Use
	GOMP_MAP_ALWAYS_POINTER for fortran allocatable pointers.
	* trans-stmt.c (gfc_trans_allocate): Call
	gfc_trans_oacc_declare_allocate for declared allocatable pointers.
	(gfc_trans_deallocate): Likewise.

2017-04-13  Chung-Lin Tang  <cltang@codesourcery.com>

	* openmp.c (enum omp_mask2):
	Remove OMP_CLAUSE_PRESENT_OR_COPY/COPYIN/COPYOUT/CREATE.
	(gfc_match_omp_clauses): Remove FORCE flag from OpenACC OMP_MAP_* cases,
	adjust and remove PRESENT_OR_ values.
	(OACC_PARALLEL_CLAUSES): Remove OMP_CLAUSE_PRESENT_OR_*.
	(OACC_KERNELS_CLAUSES): Likewise.
	(OACC_DATA_CLAUSES): Likewise.
	(OACC_DECLARE_CLAUSES): Likewise.
	(OACC_ENTER_DATA_CLAUSES): Likewise.

2017-04-07  Thomas Schwinge  <thomas@codesourcery.com>

	* gfortran.h (enum gfc_omp_default_sharing): Add
	"OMP_DEFAULT_PRESENT".
	* dump-parse-tree.c (show_omp_clauses): Handle it.
	* openmp.c (gfc_match_omp_clauses): Likewise.
	* trans-openmp.c (gfc_trans_omp_clauses_1): Likewise.

2017-04-05  Cesar Philippidis  <cesar@codesourcery.com>

	* gfortran.h (enum gfc_omp_map_op): Add OMP_MAP_DECLARE_ALLOCATE,
	OMP_MAP_DECLARE_DEALLOCATE.
	* openmp.c (gfc_match_oacc_declare): Add support for OMP_MAP_ALLOC and
	OMP_MAP_TO, as those match the OpenACC 2.5 semantics.
	* trans-array.c (gfc_array_allocate): Call
	gfc_trans_oacc_declare_allocate for decls with oacc_decalre_create
	attributes set.
	(gfc_array_deallocate): Likewise.
	* trans-decl.c (add_attributes_to_decl): Enable lowering of OpenACC
	declared create, copyin and deviceptr clauses.
	(add_clause): Don't duplicate OpenACC declare clauses.
	(find_module_oacc_declare_clauses): Relax oacc_declare_create to
	OMP_MAP_ALLOC, and oacc_declare_copying to OMP_MAP_TO.  This matches
	the OpenACC 2.5 semantics.
	* trans-openmp.c (gfc_trans_omp_clauses_1): Handle
	OMP_MAP_DECLARE_{ALLOCATE,DEALLOCATE}.
	(gfc_trans_oacc_declare_allocate): New function.
	* trans-stmt.h: Declare gfc_trans_oacc_declare_allocate.

2017-03-31  Cesar Philippidis  <cesar@codesourcery.com>

	* gfortran.h (struct gfc_omp_clauses): Add bind_name member.
	* match.c (gfc_match_call_name): New function.
	(gfc_match_call): Break out function name parsing to
	gfc_match_call_name.  Call it.
	* match.h (gfc_match_call_named): Declare.
	* openmp.c (gfc_match_oacc_bind_clause): New function.
	(gfc_match_omp_clauses): Call it to parse the bind clause.
	* trans-openmp.c (gfc_trans_omp_clauses_1): Lower OMP_CLAUSE_BIND.
	Update handling of subarrays with derived types elements.

2017-03-15  Cesar Philippidis  <cesar@codesourcery.com>

	Backport from trunk:
	2016-11-10  Jakub Jelinek  <jakub@redhat.com>

	* openmp.c (gfc_free_omp_clauses): Free critical_name, grainsize,
	hint, num_tasks, priority and if_exprs.
	(gfc_match_omp_to_link, gfc_match_omp_depend_sink): New functions.
	(enum omp_mask1, enum omp_mask2): New enums.
	Change all OMP_CLAUSE_* defines into enum values, and change their
	values from ((uint64_t) 1 << bit) to just bit.
	(omp_mask, omp_inv_mask): New classes.  Add ctors and operators.
	(gfc_match_omp_clauses): Change mask argument from uint64_t to
	const omp_mask.  Assert OMP_MASK1_LAST and OMP_MASK2_LAST are
	at most 64.  Move delete clause handling to where it
	alphabetically belongs.  Parse defaultmap, grainsize, hint,
	is_device_ptr, nogroup, nowait, num_tasks, priority, simd, threads
	and use_device_ptr clauses.  Parse if clause modifier.  Parse map
	clause always modifier, and release and delete kinds.  Parse ordered
	clause with argument.  Parse schedule clause modifiers.  Differentiate
	device clause parsing based on openacc flag.  Guard link clause
	parsing with openacc flag.  Add support for parsing
	linear clause modifiers.  Parse depend(source) and depend(sink: ...).
	Use gfc_match_omp_to_link for to and link clauses in declare target
	construct.
	(match_acc): Change mask type from uint64_t to const omp_mask.
	(OMP_SINGLE_CLAUSES, OMP_ORDERED_CLAUSES,
	OMP_DECLARE_TARGET_CLAUSES, OMP_TASKLOOP_CLAUSES,
	OMP_TARGET_ENTER_DATA_CLAUSES, OMP_TARGET_EXIT_DATA_CLAUSES): Define.
	(OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES,
	OACC_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES, OACC_DECLARE_CLAUSES,
	OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES, OACC_WAIT_CLAUSES,
	OACC_ROUTINE_CLAUSES, OMP_PARALLEL_CLAUSES, OMP_DECLARE_SIMD_CLAUSES,
	OMP_SECTIONS_CLAUSES, OMP_TEAMS_CLAUSES, OMP_DISTRIBUTE_CLAUSES):
	Replace first or only OMP_CLAUSE_* value in bitset with
	omp_mask (OMP_CLAUSE_*).
	(OMP_DO_CLAUSES): Likewise.  Add OMP_CLAUSE_LINEAR.
	(OMP_SIMD_CLAUSES): Replace first or only OMP_CLAUSE_* value in
	bitset with omp_mask (OMP_CLAUSE_*).  Add OMP_CLAUSE_SIMDLEN.
	(OACC_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value in
	bitset with omp_mask (OMP_CLAUSE_*).  Replace OMP_CLAUSE_OACC_DEVICE
	with OMP_CLAUSE_DEVICE.
	(OMP_TASK_CLAUSES): Replace first or only OMP_CLAUSE_* value in
	bitset with omp_mask (OMP_CLAUSE_*).  Add OMP_CLAUSE_PRIORITY.
	(OMP_TARGET_CLAUSES): Replace first or only OMP_CLAUSE_* value in
	bitset with omp_mask (OMP_CLAUSE_*).  Add OMP_CLAUSE_DEPEND,
	OMP_CLAUSE_NOWAIT, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE,
	OMP_CLAUSE_DEFAULTMAP and OMP_CLAUSE_IS_DEVICE_PTR.
	(OMP_TARGET_DATA_CLAUSES): Replace first or only OMP_CLAUSE_* value in
	bitset with omp_mask (OMP_CLAUSE_*).  Add OMP_CLAUSE_USE_DEVICE_PTR.
	(OMP_TARGET_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value
	in bitset with omp_mask (OMP_CLAUSE_*).  Add OMP_CLAUSE_DEPEND and
	OMP_CLAUSE_NOWAIT.
	(match_omp): Change mask argument from unsigned int to
	const omp_mask.
	(gfc_match_omp_critical): Parse optional clauses and use omp_clauses
	union member instead of omp_name.
	(gfc_match_omp_end_critical): New function.
	(gfc_match_omp_distribute_parallel_do): Remove ordered and linear
	clauses from the mask.
	(gfc_match_omp_distribute_parallel_do_simd): Use
	& ~(omp_mask (OMP_CLAUSE_*)) instead of & ~OMP_CLAUSE_*.
	(gfc_match_omp_target_teams_distribute_parallel_do_simd): Likewise.
	(gfc_match_omp_teams_distribute_parallel_do_simd): Likewise.
	(gfc_match_omp_do_simd): Likewise.  Don't remove ordered clause from
	the mask.
	(gfc_match_omp_parallel_do_simd): Likewise.
	(gfc_match_omp_target_teams_distribute_parallel_do): Likewise.
	(gfc_match_omp_teams_distribute_parallel_do): Likewise.
	(gfc_match_omp_declare_simd): If not using the form with
	(proc-name), require space before first clause.  Make (proc-name)
	optional.  If not present, set proc_name to NULL.
	(gfc_match_omp_declare_target): Rewritten for OpenMP 4.5.
	(gfc_match_omp_single): Use OMP_SINGLE_CLAUSES.
	(gfc_match_omp_task, gfc_match_omp_taskwait, gfc_match_omp_taskyield):
	Move around to where they belong alphabetically.
	(gfc_match_omp_target_enter_data, gfc_match_omp_target_exit_data,
	gfc_match_omp_target_parallel, gfc_match_omp_target_parallel_do,
	gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd,
	gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd):
	New functions.
	(gfc_match_omp_ordered): Parse clauses.
	(gfc_match_omp_ordered_depend): New function.
	(gfc_match_omp_cancel, gfc_match_omp_end_single): Use
	omp_mask (OMP_CLAUSE_*) instead of OMP_CLAUSE_*.
	(resolve_oacc_scalar_int_expr): Renamed to ...
	(resolve_scalar_int_expr): ... this.  Fix up formatting.
	(resolve_oacc_positive_int_expr): Renamed to ...
	(resolve_positive_int_expr): ... this.  Fix up formatting.
	(resolve_nonnegative_int_expr): New function.
	(resolve_omp_clauses): Adjust callers, use the above functions
	even for OpenMP clauses, add handling of new OpenMP 4.5 clauses.
	Require orderedc >= collapse if specified. Handle depend(sink:)
	and depend(source) restrictions.  Disallow linear clause when
	orderedc is non-zero.  Diagnose linear clause modifiers when not in
	declare simd.  Only check for integer type if ref modifier
	is not used.  Remove diagnostics for required VALUE attribute.
	Diagnose VALUE attribute with ref or uval modifiers.  Allow
	non-constant linear-step, if it is a dummy argument alone and is
	mentioned in uniform clause.  Diagnose map kinds not allowed
	for various constructs.  Diagnose target {enter ,exit ,}data without
	any map clauses.  Add dummy OMP_LIST_IS_DEVICE_PTR and
	OMP_LIST_USE_DEVICE_PTR cases.
	(gfc_resolve_omp_do_blocks): Set omp_current_do_collapse to orderedc
	if non-zero.
	(gfc_resolve_omp_parallel_blocks): Handle new OpenMP 4.5 constructs,
	replace underscores with spaces in a few construct names.
	(resolve_omp_do): Set collapse to orderedc if non-zero.  Handle new
	OpenMP 4.5 constructs.
	(resolve_oacc_loop_blocks): Call resolve_positive_int_expr instead
	of resolve_oacc_positive_int_expr.
	(gfc_resolve_omp_directive): Handle new OpenMP 4.5 constructs.
	(gfc_resolve_omp_declare_simd): Allow ods->proc_name to be NULL.
	* trans-openmp.c (gfc_omp_scalar_p): New function.
	(doacross_steps): New variable.
	(gfc_trans_omp_clauses): Handle new OpenMP 4.5 clauses and new clause
	modifiers.
	(gfc_trans_omp_critical): Adjust EXEC_OMP_CRITICAL handling.
	(gfc_trans_omp_do): Handle doacross loops.  Clear sched_simd flag.
	Handle EXEC_OMP_TASKLOOP.
	(gfc_trans_omp_ordered): Translate omp clauses, allow NULL
	code->block.
	(GFC_OMP_SPLIT_TASKLOOP, GFC_OMP_MASK_TASKLOOP): New enum constants.
	(gfc_split_omp_clauses): Copy orderedc together with ordered.  Change
	firstprivate and lastprivate handling for OpenMP 4.5.
	Handle EXEC_OMP_TARGET_SIMD, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD}
	and EXEC_OMP_TASKLOOP{,_SIMD}.  Add handling for new OpenMP 4.5
	clauses and clause modifiers and handle if clause without/with
	modifiers.
	(gfc_trans_omp_teams): Add omp_clauses argument, add it to other
	teams clauses.  Don't wrap into OMP_TEAMS if -fopenmp-simd.
	(gfc_trans_omp_target): For -fopenmp, translate num_teams and
	thread_limit clauses on combined target teams early and pass to
	gfc_trans_omp_teams.  Set OMP_TARGET_COMBINED if needed.
	Handle EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD} and
	EXEC_OMP_TARGET_SIMD.
	(gfc_trans_omp_taskloop, gfc_trans_omp_target_enter_data,
	gfc_trans_omp_target_exit_data): New functions.
	(gfc_trans_omp_directive): Handle EXEC_OMP_TARGET_{ENTER,EXIT}_DATA
	EXEC_OMP_TASKLOOP{,_SIMD}, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD}
	and EXEC_OMP_TARGET_SIMD.  Adjust gfc_trans_omp_teams caller.
	* symbol.c (check_conflict): Handle omp_declare_target_link.
	(gfc_add_omp_declare_target_link): New function.
	(gfc_copy_attr): Copy omp_declare_target_link.
	* dump-parse-tree.c (show_omp_namelist): Handle OMP_DEPEND_SINK_FIRST
	depend_op.  Print linear clause modifiers.
	(show_omp_clauses): Adjust for OpenMP 4.5 clause changes.
	(show_omp_node): Print clauses for EXEC_OMP_ORDERED.  Allow NULL
	c->block for EXEC_OMP_ORDERED.  Formatting fixes.  Adjust handling of
	EXEC_OMP_CRITICAL, handle new OpenMP 4.5 constructs and some
	forgotten OpenMP 4.0 constructs.
	(show_code_node): Handle new OpenMP 4.5 constructs and some forgotten
	OpenMP 4.0 constructs.
	* gfortran.h (symbol_attribute): Add omp_declare_target_link bitfield.
	(struct gfc_omp_namelist): Add u.common and u.linear_op fields.
	(struct gfc_common_head): Change omp_declare_target into bitfield.
	Add omp_declare_target_link bitfield.
	(gfc_add_omp_declare_target_link): New prototype.
	(enum gfc_statement): Add ST_OMP_TARGET_PARALLEL,
	ST_OMP_END_TARGET_PARALLEL, ST_OMP_TARGET_PARALLEL_DO,
	ST_OMP_END_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
	ST_OMP_END_TARGET_PARALLEL_DO_SIMD, ST_OMP_TARGET_ENTER_DATA,
	ST_OMP_TARGET_EXIT_DATA, ST_OMP_TARGET_SIMD, ST_OMP_END_TARGET_SIMD,
	ST_OMP_TASKLOOP, ST_OMP_END_TASKLOOP, ST_OMP_TASKLOOP_SIMD,
	ST_OMP_END_TASKLOOP_SIMD and ST_OMP_ORDERED_DEPEND.
	(enum gfc_omp_depend_op): Add OMP_DEPEND_SINK_FIRST and
	OMP_DEPEND_SINK.
	(enum gfc_omp_linear_op): New.
	(struct gfc_omp_clauses): Add critical_name, depend_source,
	orderedc, defaultmap, nogroup, sched_simd, sched_monotonic,
	sched_nonmonotonic, simd, threads, grainsize, hint, num_tasks,
	priority and if_exprs fields.
	(enum gfc_exec_op): Add EXEC_OMP_END_CRITICAL,
	EXEC_OMP_TARGET_ENTER_DATA, EXEC_OMP_TARGET_EXIT_DATA,
	EXEC_OMP_TARGET_PARALLEL, EXEC_OMP_TARGET_PARALLEL_DO,
	EXEC_OMP_TARGET_PARALLEL_DO_SIMD, EXEC_OMP_TARGET_SIMD,
	EXEC_OMP_TASKLOOP, EXEC_OMP_TASKLOOP_SIMD.
	(enum gfc_omp_map_op): Add OMP_MAP_RELEASE,
	OMP_MAP_ALWAYS_TO, OMP_MAP_ALWAYS_FROM and OMP_MAP_ALWAYS_TOFROM.
	(OMP_LIST_IS_DEVICE_PTR, OMP_LIST_USE_DEVICE_PTR): New.
	(enum gfc_omp_if_kind): New.
	* module.c (enum ab_attribute): Add AB_OMP_DECLARE_TARGET_LINK.
	(attr_bits): Add AB_OMP_DECLARE_TARGET_LINK entry.
	(mio_symbol_attribute): Save and restore omp_declare_target_link bit.
	* trans.h (gfc_omp_scalar_p): New prototype.
	* frontend-passes.c (gfc_code_walker): Handle new OpenMP 4.5
	expressions.
	* trans.c (trans_code): Handle new OpenMP 4.5 constructs.
	* resolve.c (gfc_resolve_blocks): Likewise.
	(gfc_resolve_code): Likewise.
	* f95-lang.c (LANG_HOOKS_OMP_SCALAR_P): Redefine to gfc_omp_scalar_p.
	(gfc_attribute_table): Add "omp declare target link".
	* st.c (gfc_free_statement): Handle EXEC_OMP_END_CRITICAL like
	EXEC_OMP_CRITICAL before, free clauses for EXEC_OMP_CRITICAL
	and new OpenMP 4.5 constructs.  Free omp clauses even for
	EXEC_OMP_ORDERED.
	* match.c (match_exit_cycle): Rename collapse variable to count,
	set it to orderedc if non-zero, instead of collapse.
	* trans-decl.c (add_attributes_to_decl): Add "omp declare target link"
	instead of "omp declare target" for omp_declare_target_link.
	* trans-common.c (build_common_decl): Likewise.
	* match.h (gfc_match_omp_target_enter_data,
	gfc_match_omp_target_exit_data, gfc_match_omp_target_parallel,
	gfc_match_omp_target_parallel_do,
	gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd,
	gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd,
	gfc_match_omp_end_critical, gfc_match_omp_ordered_depend): New
	prototypes.
	* parse.c (decode_omp_directive): Use gfc_match_omp_end_critical
	instead of gfc_match_omp_critical for !$omp end critical.
	Handle new OpenMP 4.5 constructs.  If ordered directive has
	depend clause as the first of the clauses, use
	gfc_match_omp_ordered_depend and ST_OMP_ORDERED_DEPEND instead of
	gfc_match_omp_ordered and ST_OMP_ORDERED.
	(case_executable): Add ST_OMP_TARGET_ENTER_DATA,
	ST_OMP_TARGET_EXIT_DATA and ST_OMP_ORDERED_DEPEND cases.
	(case_exec_markers): Add ST_OMP_TARGET_PARALLEL,
	ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
	ST_OMP_TARGET_SIMD, ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD cases.
	(gfc_ascii_statement): Handle new OpenMP 4.5 constructs.
	(parse_omp_do): Handle ST_OMP_TARGET_PARALLEL_DO,
	ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_TASKLOOP and
	ST_OMP_TASKLOOP_SIMD.
	(parse_omp_structured_block): Handle EXEC_OMP_END_CRITICAL instead
	of EXEC_OMP_CRITICAL, adjust for EXEC_OMP_CRITICAL having omp clauses
	now.
	(parse_executable): Handle ST_OMP_TARGET_PARALLEL,
	ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
	ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD.

2017-03-14  Cesar Philippidis  <cesar@codesourcery.com>

	* trans-stmt.h: Remove stale reference to trans-openacc.c.

2017-02-22  Cesar Philippidis  <cesar@codesourcery.com>

	* trans-openmp.c (gfc_trans_omp_clauses_1): Remove unused variable.
	(gfc_trans_oacc_combined_directive): Set the location of combined
	acc loops.

2017-02-02  Cesar Philippidis  <cesar@codesourcery.com>

	* trans-openmp.c (gfc_omp_finish_clause): Don't emit
	GOMP_MAP_FIRSTPRIVATE_POINTER for pointers to reference types.
	(gfc_trans_omp_clauses_1): Likewise.

2017-02-01  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (gfc_match_omp_variable_list): Eliminate a warning when
	checking for derived types.
	* trans-openmp.c (gfc_trans_omp_clauses_1): Don't cast derived type
	pointers to void pointers.

2017-01-27  Cesar Philippidis  <cesar@codesourcery.com>

	* trans-openmp.c (gfc_omp_finish_clause): Use GOMP_MAP_POINTER
	for POINTER_TYPE decls.
	(gfc_trans_omp_clauses_1): Likewise.

2017-01-27  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (gfc_resolve_oacc_blocks): Populate list of private
	variables.

2017-01-03  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (match_acc): New function.
	(gfc_match_oacc_parallel_loop): Simplify by calling match_acc.
	(gfc_match_oacc_parallel): Likewise.
	(gfc_match_oacc_kernels_loop): Likewise.
	(gfc_match_oacc_kernels): Likewise.
	(gfc_match_oacc_data): Likewise.
	(gfc_match_oacc_host_data): Likewise.
	(gfc_match_oacc_loop): Likewise.
	(gfc_match_oacc_enter_data): likewise.
	(gfc_match_oacc_exit_data): Likewise.

2016-11-10  Cesar Philippidis  <cesar@codesourcery.com>

	* trans-openmp.c (gfc_trans_omp_clauses_1): Remove
	OMP_CLAUSE_DEVICE_RESIDENT.

2016-11-10  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (gfc_match_omp_variable_list): New allow_derived argument.
	(gfc_match_omp_map_clause): Update call to
	gfc_match_omp_variable_list.
	(gfc_match_omp_clauses): Update calls to gfc_match_omp_map_clause.
	(gfc_match_oacc_update): Update call to gfc_match_omp_clauses.
	(resolve_omp_clauses): Permit derived type variables in ACC UPDATE
	clauses.
	* trans-openmp.c (gfc_trans_omp_clauses_1): Lower derived type
	members.

2016-10-05  Cesar Philippidis  <cesar@codesourcery.com>

	* trans-openmp.c (gfc_trans_omp_do): Check do_clauses for the
        tile clause if it's not present in clauses.

2016-10-04  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (resolve_omp_clauses): Error on directives
        containing both tile and collapse clauses.
	* trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
        collapsed loops.

2016-10-03  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (resolve_oacc_loop_blocks): Use integer zero to
        represent the '*' tile argument.

2016-10-03  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (resolve_oacc_positive_int_expr):Promote the
          warning to an error.

2016-09-15  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (gfc_match_omp_map_clause): Add new common_blocks argument.
	Propagate it to gfc_match_omp_variable_list.
	(gfc_match_omp_clauses): Update calls to gfc_match_omp_map_clauses.

2016-08-29  Cesar Philippidis  <cesar@codesourcery.com>

	PR fortran/72715
	* openmp.c (resolve_oacc_nested_loops): Error on do concurrent loops.

2016-08-26  Cesar Philippidis  <cesar@codesourcery.com>

	* gfortran.h (enum oacc_function): Make OACC_FUNCTION_SEQ the last
	entry the enum.
	(gfc_oacc_routine_name): Add a loc member.
	(gfc_resolve_oacc_routine_call): Declare.
	(gfc_resolve_oacc_routines): Declare.
	* openmp.c (gfc_match_oacc_routine): Make error reporting more
	precise.  Defer rejection of non-function and subroutine symbols
	until gfc_resolve_oacc_routines.
	(struct fortran_omp_context): Add a dims member.
	(gfc_resolve_oacc_blocks): Update ctx->dims.
	(gfc_resolve_oacc_routine_call): New function.
	(gfc_resolve_oacc_routines): New function.
	* resolve.c (resolve_function): Call gfc_resolve_oacc_routine_call.
	(resolve_call): Likewise.
	(resolve_codes): Call gfc_resolve_oacc_routines.

2016-08-16  Cesar Philippidis  <cesar@codesourcery.com>

	PR fortran/72741
	* openmp.c (gfc_match_oacc_routine): Error on repeated ACC ROUTINE
	directives.  Consider the optional NAME argument being the current
	procedure name.
	* trans-decl.c (add_attributes_to_decl): Use build_oacc_routine_dims
	to construct the oacc_function attribute arguments.

2016-08-12  Cesar Philippidis  <cesar@codesourcery.com>
	    Thomas Schwinge  <thomas@codesourcery.com>

	PR fortran/72741
	* openmp.c (gfc_match_oacc_routine): Check clauses of intrinsic
	functions.

2016-07-29  Chung-Lin Tang  <cltang@codesourcery.com>

	PR fortran/70598
	* openmp.c (resolve_omp_clauses): Adjust use_device clause
	handling to only allow pointers and arrays.

2016-07-28  Cesar Philippidis  <cesar@codesourcery.com>

	PR fortran/72741
	* openmp.c (gfc_oacc_routine_dims): Move gfc_error to
	gfc_match_oacc_routine.  Return OACC_FUNCTION_NONE on error.
	(gfc_match_oacc_routine): Call gfc_oacc_routine_dims for all
	routines directives.  Propagate error as appropriate.

2016-07-27  Cesar Philippidis  <cesar@codesourcery.com>

	* gfortran.h (enum oacc_function): Define.
	(oacc_function_type): Declare.
	(symbol_attribute): Change the type of oacc_function from unsigned
	to an ENUM_BITFIELD.
	* module.c (oacc_function): New DECL_MIO_NAME.
	(mio_symbol_attribute): Set the oacc_function attribute.
	* openmp.c (gfc_oacc_routine_dims): Change the return type from
	int to oacc_function.
	(gfc_match_oacc_routine): Handle intrinsic procedures.
	* symbol.c (oacc_function_types): Define.
	* trans-decl.c (add_attributes_to_decl): Update to handle the
	retyped oacc_function attribute.

2016-07-15  Cesar Philippidis  <cesar@codesourcery.com>

	Backport from trunk:
	* openmp.c (gfc_match_omp_clauses): Scan for clause vector_length
	before vector.

2016-07-12  Cesar Philippidis  <cesar@codesourcery.com>

	Backport from trunk:
	2016-07-08  Cesar Philippidis  <cesar@codesourcery.com>

	* parse.c (matcha): Define.
	(decode_oacc_directive): Add spec_only local var and set it.  Use
	matcha to parse acc directives except for routine and declare.  Return
	ST_GET_FCN_CHARACTERISTICS if a non-declarative directive could be
	matched.

	2016-06-30  Jakub Jelinek  <jakub@redhat.com>

	* parse.c (matchs, matcho): Move right before decode_omp_directive.
	If spec_only, only gfc_match the keyword and if successful, goto
	do_spec_only.
	(matchds, matchdo): Define.
	(decode_omp_directive): Add spec_only local var and set it.
	Use matchds or matchdo macros instead of matchs or matcho
	for declare target, declare simd, declare reduction and threadprivate
	directives.  Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
	directive could be matched.
	(next_statement): For ST_GET_FCN_CHARACTERISTICS restore
	gfc_current_locus from old_locus even if there is no label.

2016-07-01  Cesar Philippidis  <cesar@codesourcery.com>

	Back port from trunk
	2016-06-29  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (match_oacc_clause_gang): Rename to ...
	(match_oacc_clause_gwv): this.  Add support for OpenACC worker and
	vector clauses.
	(gfc_match_omp_clauses): Use match_oacc_clause_gwv for
	OMP_CLAUSE_{GANG,WORKER,VECTOR}.  Propagate any MATCH_ERRORs for
	invalid OMP_CLAUSE_{ASYNC,WAIT,GANG,WORKER,VECTOR} clauses.
	(gfc_match_oacc_wait): Propagate MATCH_ERROR for invalid
	oacc_expr_lists.  Adjust the first and needs_space arguments to
	gfc_match_omp_clauses.

2016-06-10  Thomas Schwinge  <thomas@codesourcery.com>

	PR c/71381
	Backport from trunk r237290:
	* openmp.c (gfc_match_oacc_cache): Add comment.

2016-06-08  Chung-Lin Tang  <cltang@codesourcery.com>

	Backport trunk r237070:
	2016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>

	* trans-openmp.c (gfc_trans_omp_reduction_list): Add mark_addressable
	bool parameter, set reduction clause DECLs as addressable when true.
	(gfc_trans_omp_clauses): Pass clauses->async to
	gfc_trans_omp_reduction_list, add comment describing OpenACC situation.

2016-05-27  Cesar Philippidis  <cesar@codesourcery.com>

	Backport trunk r235922:
	2016-05-05  Jakub Jelinek  <jakub@redhat.com>

	* openmp.c (gfc_match_omp_clauses): Restructuralize, so that clause
	parsing is done in a big switch based on gfc_peek_ascii_char and
	individual clauses under their first letters are sorted too.

2016-05-09  Cesar Philippidis  <cesar@codesourcery.com>

	Backport trunk r235651:
	2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>

	PR middle-end/70626
	* trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
	the reduction clause in both parallel and loop directives.

2016-01-12  Cesar Philippidis  <cesar@codesourcery.com>

	* trans-openmp.c (gfc_privatize_nodesc_arrays): Use
	gfc_get_symbol_decl instead of accessing backend_decl directly.

2016-01-05  Nathan Sidwell  <nathan@acm.org>

	* lang.opt (fopenacc-dim=): New option.

2015-12-09  James Norris  <jnorris@codesourcery.com>

	* openmp.c (gfc_match_omp_clauses): Re-write handling of the
	deviceptr clause.

2015-12-08  Thomas Schwinge  <thomas@codesourcery.com>

	* gfortran.h (symbol_attribute): Add oacc_function_nohost member.
	* openmp.c (gfc_match_oacc_routine): Set it.
	* trans-decl.c (add_attributes_to_decl): Use it to decide whether
	to generate an OMP_CLAUSE_NOHOST clause.
	* trans-openmp.c (gfc_trans_omp_clauses_1): Unreachable code to
	generate an OMP_CLAUSE_NOHOST clause.

2015-12-03  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (gfc_match_omp_clauses): Allow subarrays for acc reductions.
	(resolve_omp_clauses): Error on any acc reductions on arrays.

2015-12-01  Cesar Philippidis  <cesar@codesourcery.com>

	* dump-parse-tree.c (show_omp_clauses): Handle gang_static_expr
	and gang_num_expr.
	* gfortran.h (struct gfc_omp_clauses): Remove gang_expr, num_gangs,
	num_workers, vector_length and tile.  Add gang_static_expr and
	gang_num_expr.
	* openmp.c (gfc_free_omp_clauses): Handle gnag_static_expr,
	gang_num_expr.  Eliminate gang_expr.
	(match_oacc_clause_gang): Update to allow both num and static arguments
	in the same gang clauses.
	(gfc_match_omp_clauses): Remove reference to c->{vector_length,
	num_gangs, num_workers, tile}.
	(resolve_omp_clauses): Update calls to resolve_oacc_positive_int_expr.
	(resolve_oacc_params_in_parallel): Add const char arg argument to
	make the error messages more descriptive.
	(resolve_oacc_loop_blocks): Update calls to
	resolve_oacc_params_in_parallel.
	* trans-openmp.c (gfc_trans_omp_clauses_1): Update how the gang
	clause is lowered.
	(gfc_filter_oacc_combined_clauses): Handle gang_num_expr and
	gang_static_expr.  Also remove OMP_LIST_REDUCTION from the outer
	construct clauses.

2015-11-19  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (OACC_ROUTINE_CLAUSES): Remove OMP_CLAUSE_OACC_DEVICE
	from the clause mask.

2015-11-07  Tom de Vries  <tom@codesourcery.com>

	* f95-lang.c: Make formatting resemble trunk.

2015-11-06  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (gfc_match_oacc_declare): Revert error message changes.
	(resolve_omp_duplicate_list): Delete.
	(resolve_oacc_declare_map): Delete.
	(gfc_resolve_oacc_declare): Scan map clauses in place.

2015-11-06  Tom de Vries  <tom@codesourcery.com>

	* f95-lang.c (gfc_init_builtin_functions): Remove.
	(DEF_GOACC_BUILTIN_FNSPEC): Remove #undef and #define.

2015-11-04  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (gfc_match_omp_clauses): Update how default is parsed.
	(gfc_match_oacc_update): Update error message.
	(resolve_omp_clauses): Don't use resolve_omp_duplicate_list for
	omp clauses.
	(oacc_code_to_statement): Merge atomic placement from trunk.

2015-10-30  Thomas Schwinge  <thomas@codesourcery.com>

	* openmp.c (resolve_omp_clauses): Add "LINK" to clause_names.

2015-10-29  Thomas Schwinge  <thomas@codesourcery.com>

	* openmp.c (gfc_match_omp_map_clause): Remove allow_sections
	formal parameter.

2015-10-28  Cesar Philippidis  <cesar@codesourcery.com>

	* trans-openmp.c (gfc_filter_oacc_combined_clauses): Don't zero-
	initialize loop_clauses when it's already initialized.

2015-10-28  Thomas Schwinge  <thomas@codesourcery.com>

	* openmp.c (gfc_match_oacc_declare): Remove oc local variable.
	(gfc_resolve_oacc_declare): Remove list local variable.

2015-10-27  Cesar Philippidis  <cesar@codesourcery.com>

	* gfortran.h (gfc_omp_namelist): Add locus where member.
	* openmp.c (gfc_free_omp_clauses): Recursively deallocate device_type
	clauses.
	(gfc_match_omp_variable_list): New function.
	(resolve_omp_clauses): Remove where argument and use the where
	gfc_omp_namespace member when reporting errors.  Use
	resolve_omp_duplicate_list to check for variables appearing in
	mulitple clauses.
	(gfc_match_omp_clauses): Update call to resolve_omp_clauses.
	(gfc_match_oacc_declare): Likewise.
	(resolve_omp_do): Likewise.
	(resolve_oacc_loop): Likewise.
	(gfc_resolve_oacc_directive): Likewise.
	(gfc_resolve_omp_directive): Likewise.
	(gfc_resolve_omp_declare_simd): Likewise.
	(resolve_oacc_declare_map): New function.
	(gfc_resolve_oacc_declare): Use it.
	* trans-openmp.c (gfc_filter_oacc_combined_clauses): New function.
	(gfc_trans_oacc_combined_directive): Use it.

2015-10-13  Cesar Philippidis  <cesar@codesourcery.com>

	* trans-array.c (gfc_trans_array_bounds): Add an INIT_VLA argument
	to control whether VLAs should be initialized.  Don't mark this
	function as static.
	(gfc_trans_auto_array_allocation): Update call to
	gfc_trans_array_bounds.
	(gfc_trans_g77_array): Likewise.
	* trans-array.h: Declare gfc_trans_array_bounds.
	* trans-openmp.c (gfc_scan_nodesc_arrays): New function.
	(gfc_privatize_nodesc_arrays_1): New function.
	(gfc_privatize_nodesc_arrays): New function.
	(gfc_init_nodesc_arrays): New function.
	(gfc_trans_oacc_construct): Initialize any internal variables for
	arrays without array descriptors inside the offloaded parallel and
	kernels region.
	(gfc_trans_oacc_combined_directive): Likewise.

2015-10-01  Cesar Philippidis  <cesar@codesourcery.com>

	* dump-parse-tree.c (show_omp_clauses): Add missing omp list_types
	and reorder the switch cases to match the enum in gfortran.h.

2015-09-30  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (resolve_oacc_loop_blocks): Represent astrisk tile
	arguments as -1.

2015-09-29  Cesar Philippidis  <cesar@codesourcery.com>

	* trans-openmp.c (gfc_omp_finish_clause): Don't cast ptr into
	a character pointer.
	(gfc_trans_omp_clauses_1): Likewise.

2015-09-29  James Norris  <jnorris@codesourcery.com>

	* openmp.c (gfc_match_oacc_routine): Add additional attribute testing
        and name option checking.

2015-09-28  James Norris  <jnorris@codesourcery.com>

	* openmp.c (gfc_match_oacc_routine): Remove erroneous attribute test
	and unreachable situation.

2015-09-02  Tom de Vries  <tom@codesourcery.com>

	* trans-decl.c (finish_oacc_declare): Remove unused variables.

2015-08-31  Nathan Sidwell  <nathan@codesourcery.com>

	* f95-lang.c (DEF_FUNCTION_TYPE_VAR_6): Define.
	* types.def (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_VAR): Declare.
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_SIZE_VAR): Delete.

2015-08-20  Joseph Myers  <joseph@codesourcery.com>

	* gfortranspec.c (lang_specific_pre_link): Update call to do_spec.

2015-08-18  James Norris  <jnorris@codesourcery.com>

	* gfortran.h (struct gfc_oacc_declare): New field.
	* trans-decl.c (finish_oacc_declare): Rewrite.
	* trans-openmp.c (gfc_trans_oacc_declare): Rewrite.

2015-08-15  Nathan Sidwell  <nathan@codesourcery.com>

	*  f95-lang.c (gfc_attribs): oacc function attribute can take
	list.
	* gfortran.h (struct symbol_attribute): Add more bits to
	oacc_routine field.
	* openmp.c (gfc_oacc_routine_dims): New.
	(gfc_match_oacc_routins): Call it.
	* trans-decl.c: Include gomp-constants.h.
	(add_attributes_to_decl): Create oacc function dimension data.

2015-08-10  Thomas Schwinge  <thomas@codesourcery.com>

	* gfortran.h (gfc_omp_map_op): Remove comma at end of enumerator
	list.

2015-08-03  Nathan Sidwell  <nathan@codesourcery.com>

	* trans-openmp.c (gfc_trans_omp_clauses_1): Remove GANGLOCAL
	handling.
	* gfortran.h (OMP_MAP_GANGLOCAL): Delete.
	(OMP_MAP_FORCE_TO_GANGLOCAL):  Likewise.
	* openmp.c (gfc_match_omp_clauses): Remove openacc specific
	firstprivate handling.

2015-07-28  Nathan Sidwell  <nathan@codesourcery.com>

	* f95-lang.c (DEF_FUNCTION_TYPE_VAR_12): Delete.
	* types.def (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_SIZE_INT_INT_VAR): Replace with ...
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_SIZE_INT_INT_VAR): ... this.

2015-07-26  Ilmir Usmanov  <me@ilmir.us>

	PR/63858
	Fix mix of OpenACC and OpenMP sentinels in continuation.
	* scanner.c (skip_omp_attribute_fixed, skip_oacc_attribute_fixed): New
	functions.
	(skip_fixed_comments): Fix mix of OpenACC and OpenMP sentinels in
	continuation.
	(gfc_next_char_literal): Likewise.

2015-07-17  Julian Brown  <julian@codesourcery.com>

	* trans-openmp.c (gfc_trans_omp_clauses): Add NULL check for
	clauses.

2015-07-17  Julian Brown  <julian@codesourcery.com>

	* gfortran.h (gfc_omp_clauses): Change "dtype" int field to
	"device_types" gfc_expr_list.
	* openmp.c (gfc_match_omp_clauses): Remove scan_dtype variable (add
	OMP_CLAUSE_DEVICE_TYPE directly to appropriate bitmasks). Parse all
	device_type clauses without filtering.
	(OACC_LOOP_CLAUSE_DEVICE_TYPE_MASK)
	(OACC_KERNELS_CLAUSE_DEVICE_TYPE_MASK)
	(OACC_PARALLEL_CLAUSE_DEVICE_TYPE_MASK)
	(OACC_ROUTINE_CLAUSE_DEVICE_TYPE_MASK)
	(OACC_UPDATE_CLAUSE_DEVICE_TYPE_MASK): Add OMP_CLAUSE_DEVICE_TYPE.
	* trans-openmp.c (gfc_trans_omp_clauses): Translate device_type
	clauses, and split old body into...
	(gfc_trans_omp_clauses_1): New function.

2015-07-07  Thomas Schwinge  <thomas@codesourcery.com>

	* openmp.c (OACC_LOOP_CLAUSE_DEVICE_TYPE_MASK): Remove
	OMP_CLAUSE_INDEPENDENT.

2015-06-18  James Norris  <jnorris@codesourcery.com>

	* trans-decl.c (find_module_oacc_declare_clauses): Fix setting of
	attribute referenced field.

2015-06-12  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (gfc_match_omp_clauses): Report errors on duplicate
	device_type entries.

2015-06-11  Cesar Philippidis  <cesar@codesourcery.com>

	* trans-openmp.c (gfc_trans_omp_clauses): Handle the static
	argument to the gang clause.
	(gfc_trans_oacc_combined_directive): Pass the gang_expr, gang_static,
	worker_expr and vector_expr members to loop_clauses.

2015-06-08  James Norris  <jnorris@codesourcery.com>

	* f95-lang.c (gfc_attribute_table): New entry.
	* gfortran.h (symbol_attribute): New attributes. 
	(gfc_omp_map_op): New enums.
	(OMP_LIST_LINK): New enum.
	(gfc_oacc_declare): Add member: module_var.
	(finish_oacc_declare): Add calling parm.
	* module.c (ab_attribute): Add enums.
	(attr_bits): Add initialization of new attribute bits.
	(mio_symbol_attribute): Add handling of new attribute bits.
	* openmp.c (OMP_CLAUSE_LINK): New defintion.
	(gfc_match_omp_clauses): Add handling of link clause.
	(OACC_DECLARE_CLAUSES): Update declare directive clauses.
	(gfc_match_oacc_declare): Add handling of device_resident
	and link clauses.
	(gfc_resolve_oacc_declare): Add handling of link clause.
	* symbol.c (check_conflict): Add checks for declare clauses in modules.
	(gfc_add_oacc_declare_create, gfc_add_declare_copyin,
	gfc_add_oacc_declare_deviceptr, gfc_add_oacc_declare_device_resident):
	New functions.
	(gfc_add_target): Add checks for declare attrs.
	* trans-decl.c (add_attributes_to_decl): Add creation of attribute.
	(oacc_return): New structure.
	(oacc_returns, module_oacc_clauses): New variables.
	(find_oacc_return, add_clause, find_module_oacc_declare_clauses):
	New functions.
	(finish_oacc_declare): Rename from insert_oacc_declare and rewrite.
	(gfc_generate_function_code): Change calling of finish_oacc_declare.
	* trans-openmp.c (gfc_trans_omp_clauses): Add handling of link and
	device_resident clauses.
	(gfc_trans_oacc_declare): Rewrite.
	* trans-stmt.c (gfc_trans_block_construct): Change calling of
	finish_oacc_declare.
	* types.def (BT_FN_VOID_PTR_INT_UINT): New type.

2015-05-19  Bernd Schmidt  <bernds@codesourcery.com>

	* types.def (BT_FN_ULONGLONG_ULONGLONG): Define.

2015-05-13  Cesar Philippidis  <cesar@codesourcery.com>

	* f95-lang.c (gfc_attribute_table): Add and "oacc function"
	attribute.
	* gfortran.h (symbol_attribute): Add oacc_function bit.
	* openmp.c (gfc_match_oacc_routine): Use it.
	* trans-decl.c (add_attributes_to_decl): Lower it.

2015-05-13  Thomas Schwinge  <thomas@codesourcery.com>
	    Bernd Schmidt  <bernds@codesourcery.com>
	    Cesar Philippidis  <cesar@codesourcery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>
	    James Norris  <jnorris@codesourcery.com>
	    Joseph Myers  <joseph@codesourcery.com>
	    Julian Brown  <julian@codesourcery.com>
	    Tom de Vries  <tom@codesourcery.com>

	* f95-lang.c (DEF_FUNCTION_TYPE_VAR_11): Remove.
	(DEF_FUNCTION_TYPE_VAR_12): New macro.
	* gfortran.h (gfc_omp_map_op): Add OMP_MAP_GANGLOCAL,
	OMP_MAP_FORCE_TO_GANGLOCAL.
	* trans-openmp.c (gfc_trans_omp_clauses): Handle them.
	* openmp.c (gfc_match_omp_clauses): Update handling of
	OMP_CLAUSE_FIRSTPRIVATE.
	* types.def
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
	Remove.
	(BT_FN_INT_INT_INT_INT)
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_SIZE_INT_INT_VAR):
	New function types.

2015-05-13  Bernd Schmidt  <bernds@codesourcery.com>

	* gfortranspec.c (lang_specific_driver): Add -Xoffload options to
	link -lm and -lgfortran.

2015-05-11  Thomas Schwinge  <thomas@codesourcery.com>
	    Bernd Schmidt  <bernds@codesourcery.com>
	    Cesar Philippidis  <cesar@codesourcery.com>
	    Chung-Lin Tang  <cltang@codesourcery.com>
	    James Norris  <jnorris@codesourcery.com>
	    Joseph Myers  <joseph@codesourcery.com>
	    Julian Brown  <julian@codesourcery.com>
	    Tom de Vries  <tom@codesourcery.com>

	* dump-parse-tree.c (show_namespace): Rewrite handling of OpenACC
	declare.
	* gfortran.h (gfc_statement): Add ST_OACC_ATOMIC,
	ST_OACC_END_ATOMIC.
	(gfc_omp_clauses): Add routine_bind, dtype, dtype_clauses, nohost,
	acc_collapse, bind, num_gangs, num_workers, vector_length, tile
	members.
	(gfc_oacc_declare, gfc_oacc_routine_name): New typedefs.
	(gfc_get_oacc_declare, gfc_get_oacc_routine_name): New macros.
	(gfc_namespace): Add oacc_declare, oacc_routine_clauses,
	oacc_routine_names, oacc_routine members, remove
	oacc_declare_clauses member.
	(gfc_exec_op): Add EXEC_OACC_ROUTINE, EXEC_OACC_ATOMIC,
	EXEC_OACC_DECLARE.
	(gfc_code): Add oacc_declare member.
	(gfc_free_oacc_declares, insert_oacc_declare): New prototypes.
	* match.h (gfc_match_oacc_atomic): New prototype.
	* openmp.c (OMP_CLAUSE_HOST_SELF): Rename to...
	(OMP_CLAUSE_HOST): ... this.  Adjust all users.
	(OMP_CLAUSE_BIND, OMP_CLAUSE_NOHOST, OMP_CLAUSE_DEVICE_TYPE): New
	macros.
	(gfc_free_oacc_declares): New function.
	(gfc_match_omp_map_clause): Add allow_sections formal parameter.
	Adjust all users.
	(gfc_match_omp_clauses): Add dtype_mask formal parameter.  Adjust
	all users.  Change handling of OMP_CLAUSE_VECTOR_LENGTH,
	OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS, OMP_CLAUSE_TILE,
	OMP_CLAUSE_DEFAULT, OMP_CLAUSE_COLLAPSE.  Handle OMP_CLAUSE_BIND,
	OMP_CLAUSE_NOHOST, OMP_CLAUSE_DEVICE_TYPE.
	(OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_LOOP_CLAUSES)
	(OACC_UPDATE_CLAUSES): Add OMP_CLAUSE_DEVICE_TYPE.
	(OACC_ROUTINE_CLAUSES, OACC_LOOP_CLAUSE_DEVICE_TYPE_MASK)
	(OACC_KERNELS_CLAUSE_DEVICE_TYPE_MASK)
	(OACC_PARALLEL_CLAUSE_DEVICE_TYPE_MASK)
	(OACC_ROUTINE_CLAUSE_DEVICE_TYPE_MASK)
	(OACC_UPDATE_CLAUSE_DEVICE_TYPE_MASK): New macros.
	(gfc_match_oacc_declare, gfc_match_oacc_routine): Rewrite
	functions.
	(gfc_match_oacc_update): Add error reporting.
	(gfc_match_omp_atomic, gfc_match_oacc_atomic): New wrapper
	functions around...
	(gfc_match_omp_oacc_atomic): ... this new function.
	(check_array_not_assumed): Remove pointer check.
	(oacc_code_to_statement): Handle EXEC_OACC_ATOMIC.
	(resolve_oacc_loop_blocks): Don't error out for combined OpenACC
	gang, worker, and vector clauses.
	(resolve_oacc_cache): Remove function.
	(gfc_resolve_oacc_declare): Rewrite function.
	(gfc_resolve_oacc_directive): Handle EXEC_OACC_ATOMIC.  Don't
	handle EXEC_OACC_CACHE.
	* parse.c (decode_oacc_directive): Handle "atomic", "end atomic".
	(case_exec_markers): Add ST_OACC_ATOMIC.
	(case_decl): Add ST_OACC_DECLARE.
	(gfc_ascii_statement): Handle ST_OACC_ATOMIC, ST_OACC_END_ATOMIC.
	(verify_st_order, parse_spec): Remove handling of ST_OACC_DECLARE.
	(parse_omp_atomic): Rename to...
	(parse_omp_oacc_atomic): ... this new function.  Add omp_p formal
	parameter.  Adjust all users.
	(parse_executable): Handle ST_OACC_ATOMIC.
	(parse_progunit): Remove handling of OpenACC declare.
	(is_oacc): Handle EXEC_OACC_ROUTINE.
	* parse.h (gfc_state_data): Add ext.oacc_declare member.  Remove
	ext.oacc_declare_clauses member.
	* resolve.c (gfc_resolve_blocks): Handle EXEC_OACC_ATOMIC,
	EXEC_OACC_ROUTINE, EXEC_OACC_DECLARE.
	(gfc_resolve_code): Handle EXEC_OACC_ATOMIC, EXEC_OACC_DECLARE.
	* st.c (gfc_free_statement): Handle EXEC_OACC_DECLARE,
	EXEC_OACC_ROUTINE, EXEC_OACC_ATOMIC.
	* trans-decl.c (find_end, insert_oacc_declare): New functions.
	(gfc_generate_function_code): Change handling of OpenACC declare.
	* trans-openmp.c (gfc_omp_clause_copy_ctor): Handle
	OMP_CLAUSE_REDUCTION.
	(gfc_trans_omp_clauses): Add appropriate, generate OMP_CLAUSE_SEQ
	(instead of OMP_CLAUSE_ORDERED), OMP_CLAUSE_AUTO, or
	OMP_CLAUSE_TILE.
	(gfc_trans_oacc_combined_directive): Don't set
	OACC_KERNELS_COMBINED, and OACC_PARALLEL_COMBINED.
	(gfc_trans_oacc_declare): Rewrite function.
	(gfc_trans_oacc_directive): Handle EXEC_OACC_ATOMIC,
	EXEC_OACC_DECLARE.
	* trans-stmt.c (gfc_trans_block_construct): Change handling of
	OpenACC declare.
	* trans.c (trans_code): Handle EXEC_OACC_ATOMIC,
	EXEC_OACC_DECLARE.

2015-04-21  Tom de Vries  <tom@codesourcery.com>

	* f95-lang.c (DEF_GOACC_BUILTIN_FNSPEC): Define.

	* f95-lang.c (gfc_define_builtin_with_spec): New function.

2015-01-13  Thomas Schwinge  <thomas@codesourcery.com>

	* trans-openmp.c (gfc_omp_finish_clause, gfc_trans_omp_clauses):
	Use OMP_CLAUSE_SET_MAP_KIND.

2014-12-17  Thomas Schwinge  <thomas@codesourcery.com>

	* types.def: Remove BT_FN_VOID_INT_PTR_INT.

	* openmp.c (gfc_match_omp_clauses): Use include/gomp-constants.h.

2014-11-20  Cesar Philippidis  <cesar@codesourcery.com>

	* openmp.c (resolve_oacc_cache): Mark the code parameter as
	unused.

2014-11-13  Cesar Philippidis  <cesar@codesourcery.com>

	* match.c (match_exit_cycle): Restructure error strings.
	* parse.c (is_oacc): Remove bogus break.

2014-11-13  Cesar Philippidis  <cesar@codesourcery.com>

	* f95-lang.c (DEF_GOACC_BUILTIN_COMPILER): Remove bogus TODO.
	* gfortran.h (gfc_omp_clauses): Move loc out of the ext union and
	remove the ext union.
	* match.c (match_exit_cycle): Make the error message specific to
	OpenMP/OpenACC.
	* openmp.c (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE,
	OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_SHARED
	OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION, OMP_CLAUSE_IF,
	OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_DEFAULT,
	OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED,
	OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE, OMP_CLAUSE_ALIGNED,
	OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH, OMP_CLAUSE_LINEAR,
	OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_SAFELEN,
	OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM, OMP_CLAUSE_DEVICE,
	OMP_CLAUSE_MAP, OMP_CLAUSE_TOOMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS,
	OMP_CLAUSE_THREAD_LIMIT, OMP_CLAUSE_DIST_SCHEDULE, OMP_CLAUSE_ASYNC,
	OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS, OMP_CLAUSE_VECTOR_LENGTH,
	OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT, OMP_CLAUSE_CREATE,
	OMP_CLAUSE_PRESENT, OMP_CLAUSE_PRESENT_OR_COPY,
	OMP_CLAUSE_PRESENT_OR_COPYIN, OMP_CLAUSE_PRESENT_OR_COPYOUT,
	OMP_CLAUSE_PRESENT_OR_CREATE, OMP_CLAUSE_DEVICEPTR,
	OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR,
	OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT, OMP_CLAUSE_USE_DEVICE,
	OMP_CLAUSE_DEVICE_RESIDENT, OMP_CLAUSE_HOST_SELF,
	OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT, OMP_CLAUSE_DELETE,
	OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): Use unit64_t for the bitmasks.
	(gfc_match_omp_clauses):  Use unit64_t for mask.
	(gfc_match_oacc_declare): Update usage of omp_clause->loc.
	(omp_code_to_statement): Fix whitespace.
	(oacc_code_to_statement): Likewise. 
	(resolve_oacc_loop):Likewise.
	(resolve_oacc_cache):  Replace gfc_error with a sorry for this
	unimplemented directive.
	(gfc_resolve_oacc_declare): Update usage of omp_clause->loc. Remove
	FIXME and TODO, see PR63869.
	* parse.c (parse_critical_block): Make the error message specific to
	OpenMP/OpenACC.
	(is_oacc): New function.
	* parse.h (is_oacc): Declare.
	* scanner.c (openmp_flag, openacc_flag): Move comment.
	(gfc_next_char_literal): Merge nested if stmts.
	* trans-openmp.c (gfc_trans_omp_clauses): Fix whitespace.
	(gfc_trans_oacc_declare): Fix whitespace.

2014-11-11  Thomas Schwinge  <thomas@codesourcery.com>

	* gfortran.h (OMP_LIST_COPY, OMP_LIST_DATA_CLAUSE_FIRST)
	(OMP_LIST_DATA_CLAUSE_LAST, OMP_LIST_LAST): Remove.
	* dump-parse-tree.c (show_omp_clauses): Update.
	* openmp.c (resolve_omp_clauses, gfc_resolve_oacc_declare):
	Likewise.
	* trans-openmp.c (gfc_trans_omp_clauses): Likewise.
	(gfc_trans_omp_map_clause_list): Remove.

	* gfortran.h (OMP_LIST_DEVICEPTR): Remove, and instead...
	(enum gfc_omp_map_op): ... add OMP_MAP_FORCE_DEVICEPTR here.
	* dump-parse-tree.c (show_omp_clauses): Update.
	* openmp.c (gfc_match_omp_clauses, resolve_omp_clauses)
	(gfc_resolve_oacc_declare): Likewise.
	* trans-openmp.c (gfc_trans_omp_clauses): Likewise.

2014-11-05  Thomas Schwinge  <thomas@codesourcery.com>

	* openmp.c (OMP_CLAUSE_HOST, OMP_CLAUSE_SELF): Merge into the new
	OMP_CLAUSE_HOST_SELF.  Update all users.

	* gfortran.texi: Update for OpenACC.
	* intrinsic.texi: Likewise.
	* invoke.texi: Likewise.

2014-11-04  Cesar Philippidis  <cesar@codesourcery.com>

	* gfortran.h (ST_OACC_ROUTINE): New statement enum.
	* match.h (gfc_match_oacc_routine): New prototype.
	* openmp.c (gfc_match_oacc_routine): New function.
	* parse.c (decode_oacc_directive): Handle the routine directive.
	(next_statement): Handle ST_OACC_ROUTINE.
	(gfc_ascii_statement): Likewise.

2014-11-03  Cesar Philippidis  <cesar@codesourcery.com>

	* gfortran.h (enum OMP_LIST_HOST): Remove.
	(enum OMP_LIST_DEVICE, OMP_LIST_DEVICE): Remove.
	* dump-parse-tree.c (show_omp_clauses): Remove OMP_LIST_HOST and
	OMP_LIST_DEVICE from here also.
	* openmp.c (OMP_CLAUSE_SELF): New define.
	(gfc_match_omp_clauses): Update handling of OMP_CLAUSE_HOST and
	OMP_CLAUSE_DEVICE. Add support for OMP_CLAUSE_SELF.
	* trans-openmp.c (gfc_trans_omp_clauses): Remove support for
	OMP_LIST_HOST and OMP_LIST_DEVICE since they are treated as memory
	maps now.
	(gfc_trans_oacc_executable_directive): Remove stale EXEC_OACC_WAIT.

2014-10-31  Cesar Philippidis  <cesar@codesourcery.com>

	* gfortran.h (struct gfc_omp_clauses): Remove non_clause_wait_expr.
	* dump-parse-tree.c (show_omp_clauses): Likewise.
	* openmp.c (gfc_free_omp_clauses): Likewise.
	(gfc_match_omp_clauses): Update handling of async.
	(OACC_WAIT_CLAUSE_MASK): New define.
	(gfc_match_oacc_wait): Make the wait directive comply with OpenACC 2.0.
	(resolve_omp_clauses): Use resolve_oacc_scalar_in_expr inspect
	arguments to the wait clause.
	(resolve_oacc_wait): Remove.
	(gfc_resolve_oacc_directive): Handle EXEC_OACC_WAIT with
	resolve_omp_clauses.
	* trans-openmp.c (gfc_trans_omp_clauses): Update handling of OpenACC
	wait arguments.
	(gfc_trans_oacc_executable_directive): Remove EXEC_OACC_WAIT.
	(gfc_trans_oacc_wait_directive): New function.
	(gfc_trans_oacc_directive): Use it.

2014-10-15  James Norris  <jnorris@codesourcery.com>

	* types.def (BT_FN_VOID_INT_PTR_INT): New type.

2014-09-23  Thomas Schwinge  <thomas@codesourcery.com>

	* f95-lang.c (DEF_GOACC_BUILTIN_COMPILER): New macro.
	* types.def (BT_FN_INT_INT): New type.

2014-09-08  Cesar Philippidis  <cesar@codesourcery.com>

	* gfortran.h (enum OMP_LIST_FIRST, OMP_LIST_LAST): New
	OMP enums.
	* openmp.c (oacc_compatible_clauses): New function.
	(resolve_omp_clauses): Use it.
	(struct omp_context): Add is_openmp member.
	(gfc_resolve_omp_parallel_blocks): Set is_openmp true.
	(gfc_resolve_do_iterator): Scan for compatible clauses.
	(typedef oacc_context): Remove.
	(oacc_current_ctx): Remove. Use omp_current_ctx for both
	OpenACC and OpenMP.
	(resolve_oacc_directive_inside_omp_region): Replace
	oacc_current_ctx with omp_current_ctx.
	(resolve_omp_directive_inside_oacc_region): Likewise.
	(resolve_oacc_nested_loops): Likewise.
	(resolve_oacc_params_in_parallel): Likewise.
	(resolve_oacc_loop_blocks): Likewise. Set is_openmp to false.

2014-07-28  Cesar Philippidis  <cesar@codesourcery.com>
	    Thomas Schwinge  <thomas@codesourcery.com>
	    Ilmir Usmanov  <i.usmanov@samsung.com>

	* gfortran.h (gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC,
	OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
	OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT.
	(enum) Remove OMP_LIST_OACC_COPYIN, OMP_LIST_COPYOUT,
	OMP_LIST_CREATE, OMP_LIST_DELETE, OMP_LIST_PRESENT,
	OMP_LIST_PRESENT_OR_COPY, OMP_LIST_PRESENT_OR_COPYIN,
	OMP_LIST_PRESENT_OR_COPYOUT, OMP_LIST_PRESENT_OR_CREATE.
	* dump-parse-tree.c (show_omp_clauses): Remove handling of
	OMP_LIST_OACC_COPYIN, OMP_LIST_COPYOUT,	OMP_LIST_CREATE,
	OMP_LIST_DELETE, OMP_LIST_PRESENT, OMP_LIST_PRESENT_OR_COPY,
	OMP_LIST_PRESENT_OR_COPYIN, OMP_LIST_PRESENT_OR_COPYOUT,
	OMP_LIST_PRESENT_OR_CREATE.
	* openmp.c (OMP_CLAUSE_OACC_COPYIN): Remove define.
	(gfc_match_omp_map_clause): New function.
	(gfc_match_omp_clauses): New openacc argument. Treat
	OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT, OMP_CLAUSE_CREATE,
	OMP_CLAUSE_DELETE, OMP_CLAUSE_PRESENT, OMP_CLAUSE_PRESENT_OR_COPY,
	OMP_CLAUSE_PRESENT_OR_COPYIN, OMP_CLAUSE_PRESENT_OR_COPYOUT, and
	OMP_CLAUSE_PRESENT_OR_CREATE as OpenMP memory maps. Also, remove
	support for OMP_CLAUSE_OACC_COPYIN. Make OMP_CLAUSE_COPYIN
	represent the COPYIN clause for both OpenACC and OpenMP.
	(OACC_PARALLEL_CLAUSES): Replace OMP_CLAUSE_OACC_COPYIN with
	OMC_CLAUSE_COPYIN.
	(OACC_KERNEL_CLAUSES): Likewise.
	(OACC_DATA_CLAUSES): Likewise.
	(OACC_DECLARE_CLAUSES): Likewise.
	(OACC_ENTER_DATA_CLAUSES): Likewise.
	(gfc_match_oacc_parallel_loop): Call gfc_match_omp_clauses with
	the openacc parameter as true.
	(gfc_match_oacc_parallel): Likewise.
	(gfc_match_oacc_kernels_loop): Likewise.
	(gfc_match_oacc_kernels): Likewise.
	(gfc_match_oacc_data): Likewise.
	(gfc_match_oacc_host_data): Likewise.
	(gfc_match_oacc_loop): Likewise.
	(gfc_match_oacc_declare): Likewise.
	(gfc_match_oacc_update): Likewise.
	(gfc_match_oacc_enter_data): Likewise.
	(gfc_match_oacc_exit_data): Likewise.
	(resolve_omp_clauses): New openacc argument. Call
	resolve_oacc_data_clauses to check additional errors.
	(resolve_oacc_loop): Update call to resolve_omp_clauses.
	(resolve_oacc_wait): Likewise.
	(gfc_resolve_oacc_declare): Likewise.
	(gfc_resolve_oacc_directive): Likewise.
	* trans-openmp.c (gfc_trans_omp_clauses): Remove
	OMP_LIST_OACC_COPYIN, OMP_LIST_COPYOUT, OMP_LIST_CREATE,
	OMP_LIST_DELETE, OMP_LIST_PRESENT, OMP_LIST_PRESENT_OR_COPY,
	OMP_LIST_PRESENT_OR_COPYIN, OMP_LIST_PRESENT_OR_COPYOUT,
	OMP_LIST_PRESENT_OR_CREATE switch items. Handle
	OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO,
	OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT
	clause memory mappings.

2014-07-08  Cesar Philippidis  <cesar@codesourcery.com>

	* gcc/fortran/scanner.c (gfc_next_char_literal): Fix the scan for
	*$acc.

2014-07-03  Cesar Philippidis  <cesar@codesourcery.com>

	* scanner.c (skip_fixed_comments): Reset openacc_flag
	if an openacc directive wasn't found.

2014-06-13  Ilmir Usmanov  <i.usmanov@samsung.com>
	    Cesar Philippidis  <cesar@codesourcery.com>

	* trans-openmp.c (gfc_trans_oacc_combined_directive): Move under
	gfc_trans_omp_do.
	(gfc_trans_omp_do, gfc_trans_oacc_directive): Handle EXEC_OACC_LOOP.

2014-04-05  Tobias Burnus  <burnus@net-b.de>

	PR fortran/60283
	* parse.c (decode_oacc_directive): Use gfc_unset_implicit_pure.

2014-03-18  Thomas Schwinge  <thomas@codesourcery.com>

	* f95-lang.c (DEF_FUNCTION_TYPE_10): Define.
	* types.def
	(BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT): New type.

2014-03-13  Ilmir Usmanov  <i.usmanov@samsung.com>

	OpenACC 1.0 support.

	* dump-parse-tree.c
	(show_omp_node): Dump also OpenACC executable statements.
	(show_code_node): Call it.
	(show_namespace): Dump !$ACC DECLARE directive.
	* gfortran.h
	(ST_OACC_PARALLEL_LOOP, ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL,
	ST_OACC_END_PARALLEL, ST_OACC_KERNELS, ST_OACC_END_KERNELS,
	ST_OACC_DATA, ST_OACC_END_DATA, ST_OACC_HOST_DATA,
	ST_OACC_END_HOST_DATA, ST_OACC_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
	ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
	ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA,
	ST_OACC_EXIT_DATA, ST_OACC_END_LOOP): New statements.
	(gfc_expr_list): New structure to hold list of expressions.
	(OMP_LIST_COPY, OMP_LIST_DATA_CLAUSE_FIRST,
	OMP_LIST_OACC_COPYIN, OMP_LIST_COPYOUT, OMP_LIST_CREATE, OMP_LIST_DELETE,
	OMP_LIST_PRESENT, OMP_LIST_PRESENT_OR_COPY,
	OMP_LIST_PRESENT_OR_COPYIN, OMP_LIST_PRESENT_OR_COPYOUT,
	OMP_LIST_PRESENT_OR_CREATE, OMP_LIST_DEVICEPTR,
	OMP_LIST_DATA_CLAUSE_LAST, OMP_LIST_USE_DEVICE,
	OMP_LIST_DEVICE_RESIDENT, OMP_LIST_HOST, OMP_LIST_DEVICE,
	OMP_LIST_CACHE): New types of list, allowed in clauses.
	(gfc_omp_clauses): Add OpenACC clauses.
	(gfc_namespace): Add OpenACC declare directive clauses.
	(EXEC_OACC_KERNELS_LOOP, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
	EXEC_OACC_KERNELS, EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
	EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
	EXEC_OACC_EXIT_DATA): New executable statements.
	(gfc_free_expr_list): New function declaration.
	(gfc_resolve_oacc_directive): Likewise.
	(gfc_resolve_oacc_parallel_loop_blocks): Likewise.
	(gfc_resolve_oacc_blocks): Likewise.
	* match.c (match_exit_cycle): Add support of OpenACC regions and loops.
	* match.h (gfc_match_oacc_cache): New function declaration.
	(gfc_match_oacc_wait, gfc_match_oacc_update): Likewise.
	(gfc_match_oacc_declare, gfc_match_oacc_loop): Likewise.
	(gfc_match_oacc_host_data, gfc_match_oacc_data): Likewise.
	(gfc_match_oacc_kernels, gfc_match_oacc_kernels_loop): Likewise.
	(gfc_match_oacc_parallel, gfc_match_oacc_parallel_loop): Likewise.
	(gfc_match_oacc_enter_data, gfc_match_oacc_exit_data): Likewise.
	* parse.c (decode_oacc_directive): New function.
	(verify_token_free, verify_token_fixed): New helper functions.
	(next_free, next_fixed): Decode !$ACC sentinel.
	(case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT, ST_OACC_CACHE,
	ST_OACC_ENTER_DATA and ST_OACC_EXIT_DATA directives.
	(case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
	ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP and
	ST_OACC_KERNELS_LOOP directives.
	(push_state): Initialize OpenACC declare clauses.
	(gfc_ascii_statement): Dump names of OpenACC directives.
	(verify_st_order): Verify OpenACC declare directive as declarative.
	(parse_spec): Push clauses to state stack when declare directive is
	parsed.
	(parse_oacc_structured_block, parse_oacc_loop): New functions.
	(parse_executable): Call them.
	(parse_progunit): Move declare clauses from state stack to namespace.
	* parse.h (gfc_state_data): Add declare directive's clauses.
	* resolve.c (gfc_resolve_blocks): Resolve OpenACC directives.
	(resolve_code): Likewise.
	* scanner.c (openacc_flag, openacc_locus): New static variables.
	(skip_oacc_attribute, skip_omp_attribute): New helper functions.
	(skip_free_comments, skip_fixed_comments): Don't skip !$ACC sentinel.
	(gfc_next_char_literal): Support OpenACC directives.
	* st.c (gfc_free_statement): Free also OpenACC directives. 
	* openmp.c
	(gfc_free_omp_clauses): Remove also OpenACC clauses.
	(gfc_free_expr_list): New function to clear expression list.
	(match_oacc_expr_list): New function to match expression list.
	(match_oacc_clause_gang): New function to match OpenACC 2.0 gang clauses.
	(OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS,
	OMP_CLAUSE_NUM_WORKERS, OMP_CLAUSE_VECTOR_LENGTH,
	OMP_CLAUSE_COPY, OMP_CLAUSE_OACC_COPYIN,
	OMP_CLAUSE_COPYOUT, OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT,
	OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN,
	OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE,
	OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER,
	OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT,
	OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_HOST, OMP_CLAUSE_DEVICE_RESIDENT,
	OMP_CLAUSE_DEVICE, OMP_CLAUSE_DEFAULT, OMP_CLAUSE_WAIT,
	OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New clauses.
	(OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES,
	OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES,
	OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES, OACC_DECLARE_CLAUSES,
	OACC_UPDATE_CLAUSES, OACC_ENTER_DATA_CLAUSES,
	OACC_EXIT_DATA_CLAUSES): New defines.
	(gfc_match_oacc_parallel_loop, gfc_match_oacc_parallel,
	gfc_match_oacc_kernels_loop, gfc_match_oacc_kernels,
	gfc_match_oacc_data, gfc_match_oacc_host_data, gfc_match_oacc_loop,
	gfc_match_oacc_declare, gfc_match_oacc_update,
	gfc_match_oacc_enter_data, gfc_match_oacc_exit_data,
	gfc_match_oacc_wait, gfc_match_oacc_cache, oacc_is_loop,
	check_symbol_not_pointer, resolve_oacc_scalar_int_expr,
	resolve_oacc_positive_int_expr, check_array_not_assumed,
	resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause,
	oacc_is_parallel, oacc_is_kernels, omp_code_to_statement,
	oacc_code_to_statement, resolve_oacc_directive_inside_omp_region,
	resolve_omp_directive_inside_oacc_region, resolve_oacc_nested_loops,
	resolve_oacc_params_in_parallel, resolve_oacc_loop_blocks,
	gfc_resolve_oacc_blocks, resolve_oacc_loop, resolve_oacc_cache,
	resolve_oacc_wait, gfc_resolve_oacc_declare,
	gfc_resolve_oacc_directive): New functions.
	(resolve_omp_clauses): Resolve also OpenACC clauses.
	(gfc_resolve_omp_directive): Check for enclosing OpenACC region. 
	* trans-decl.c
	(gfc_generate_function_code): Insert OACC_DECLARE GENERIC node.
	* trans-openmp.c (gfc_convert_expr_to_tree): New helper function.
	(gfc_trans_omp_array_reduction): Support also OpenACC. Add parameter.
	(gfc_trans_omp_reduction_list): Update.
	(gfc_trans_oacc_construct): New transform function.
	(gfc_trans_omp_map_clause_list): Likewise.
	(gfc_trans_oacc_executable_directive): Likewise.
	(gfc_trans_oacc_combined_directive, gfc_trans_oacc_declare): Likewise.
	(gfc_trans_oacc_directive): Use them.
	(gfc_trans_oacc_loop): Stub.
	(gfc_trans_omp_clauses): Transform OpenACC clauses.
	* trans-stmt.h  (gfc_trans_oacc_directive): New function prototype.
	(gfc_trans_oacc_declare): Likewise.
	* trans.c (trans_code): Transform also OpenACC directives. 

2013-11-07  Thomas Schwinge  <thomas@codesourcery.com>

	* f95-lang.c (DEF_GOACC_BUILTIN): New macro.
	Include "../oacc-builtins.def".

	* cpp.c (cpp_define_builtins): Conditionally define _OPENACC.

	* lang.opt (fopenacc): New option.
	* invoke.texi (-fopenacc): Document it.
	* gfortran.h (gfc_option_t): New member.
	* options.c (gfc_init_options, gfc_handle_option): Handle it.

2013-09-26  Jakub Jelinek  <jakub@redhat.com>

	* types.def
	(BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove.
	(BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New.

2013-09-19  Jakub Jelinek  <jakub@redhat.com>

	* types.def (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR): Remove.
	(BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR): New.

2013-09-18  Jakub Jelinek  <jakub@redhat.com>

	* trans-openmp.c (gfc_omp_clause_default_ctor,
	gfc_omp_clause_dtor): Return NULL for OMP_CLAUSE_REDUCTION.

2013-09-05  Jakub Jelinek  <jakub@redhat.com>

	* types.def (BT_FN_VOID_UINT_UINT, BT_FN_VOID_INT_SIZE_PTR_PTR_PTR,
	BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR): New.

2013-07-09  Jakub Jelinek  <jakub@redhat.com>

	* types.def (BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL): New.

2013-04-10  Jakub Jelinek  <jakub@redhat.com>

	* f95-lang.c (DEF_FUNCTION_TYPE_8): Define.
	* types.def (DEF_FUNCTION_TYPE_8): Document.
	(BT_FN_VOID_OMPFN_PTR_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG): Remove.
	(BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT): New.

2013-03-27  Jakub Jelinek  <jakub@redhat.com>

	* f95-lang.c (ATTR_NULL): Define.

Copyright (C) 2013-2016 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

Local Variables:
mode: change-log
change-log-default-name: "ChangeLog.gomp"
End: