Skip to content

Commit 082aa1d

Browse files
authored
Merge pull request #520 from ThePortlandGroup/nv_stage
Pull 2018-07-03T21-37 Recent NVIDIA Changes
2 parents e7de2f6 + 835d799 commit 082aa1d

File tree

26 files changed

+376
-544
lines changed

26 files changed

+376
-544
lines changed

include/flang/Error/errmsg-in.n

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,6 +1346,10 @@ This OpenMP feature is not yet implemented.
13461346
An unlimited repetition count (*) is allowed by the Fortran 2008 standard
13471347
only on a parenthesized list of edit descriptors that appears as the the last
13481348
(or only) item at the top level of a FORMAT.
1349+
.MS E 550 "Allocatable device array is not in c_f_pointer with -Mallocatable=03 - $."
1350+
The second argument in c_f_pointer may not be an allocatable device array
1351+
with -Mallocatable=03 semantics. A device pointer may be used,
1352+
or the program may be compiled with the -Mallocatable=95 compiler flag.
13491353
.MS S 901 "#elif after #else"
13501354
A preprocessor #elif directive was found after a #else directive; only
13511355
#endif is allowed in this context.

runtime/flang/type.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,8 @@ void ENTF90(DEALLOC_POLY03A, dealloc_poly03a)(F90_Desc *sd, __STAT_T *stat,
547547
continue;
548548
}
549549
if (fd) {
550-
if (ld->tag == 'T' && src_td->obj.tag == __POLY) {
550+
if (ld->tag == 'T' && src_td->obj.tag == __POLY
551+
&& (fd->tag == __DESC || fd->tag == __POLY)) {
551552
ENTF90(DEALLOC_POLY_MBR03A, dealloc_poly_mbr03a)
552553
(fd, stat, cb, firsttime, CADR(errmsg), CLEN(errmsg));
553554
}

tools/flang1/flang1exe/scopestack.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,13 @@ push_scope_level(int sptr, SCOPEKIND kind)
251251
scope->Private = FALSE;
252252
scope->sym = 0;
253253
scope->uplevel_sptr = 0;
254+
#if DEBUG
254255
if (DBGBIT(5, 0x200)) {
255256
fprintf(gbl.dbgfil, "\n++++++++ push_scope_level(%s) pass=%d line=%d\n",
256257
kind_to_string(kind), sem.which_pass, gbl.lineno);
257258
dumpscope(gbl.dbgfil);
258259
}
260+
#endif
259261
}
260262

261263
/** \brief Push an interface entry on the scope stack and mark it closed.
@@ -330,11 +332,13 @@ pop_scope_level(SCOPEKIND kind)
330332
stb.curr_scope = sem.scope_stack[1].sptr;
331333
}
332334
}
335+
#if DEBUG
333336
if (DBGBIT(5, 0x200)) {
334337
fprintf(gbl.dbgfil, "\n-------- pop_scope_level(%s) pass=%d line=%d\n",
335338
kind_to_string(kind), sem.which_pass, gbl.lineno);
336339
dumpscope(gbl.dbgfil);
337340
}
341+
#endif
338342
}
339343

340344
static SCOPESTACK saved_scope_stack[1];
@@ -352,11 +356,13 @@ save_scope_level(void)
352356
saved_scope_stack[count_scope_saved++] = *curr_scope();
353357
pop_scope();
354358
stb.curr_scope = curr_scope()->sptr;
359+
#if DEBUG
355360
if (DBGBIT(5, 0x200)) {
356361
fprintf(gbl.dbgfil, "\n-------- save_scope_level pass=%d line=%d\n",
357362
sem.which_pass, gbl.lineno);
358363
dumpscope(gbl.dbgfil);
359364
}
365+
#endif
360366
}
361367

362368
/** \brief Restore the scope that was saved by save_scope_level() */
@@ -369,11 +375,13 @@ restore_scope_level(void)
369375
}
370376
*push_scope() = saved_scope_stack[--count_scope_saved];
371377
stb.curr_scope = curr_scope()->sptr;
378+
#if DEBUG
372379
if (DBGBIT(5, 0x200)) {
373380
fprintf(gbl.dbgfil, "\n++++++++ restore_scope_level pass=%d line=%d\n",
374381
sem.which_pass, gbl.lineno);
375382
dumpscope(gbl.dbgfil);
376383
}
384+
#endif
377385
}
378386

379387
void
@@ -405,7 +413,7 @@ par_push_scope(LOGICAL bind_to_outer)
405413
scope->di_par = sem.doif_depth;
406414
scope->shared_list = NULL;
407415
scope->prev_sc = prev_sc;
408-
(void)enter_lexical_block(flg.debug && !XBIT(123, 0x400));
416+
enter_lexical_block(flg.debug && !XBIT(123, 0x400));
409417
}
410418

411419
void
@@ -452,7 +460,6 @@ pop_scope(void)
452460
}
453461

454462
#if DEBUG
455-
456463
void
457464
dumpscope(FILE *f)
458465
{

tools/flang1/flang1exe/semantio.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,8 +1244,9 @@ semantio(int rednum, SST *top)
12441244
array_io_item:
12451245
if (DTY(dtype) == TY_ARRAY)
12461246
dtype = DTY(dtype + 1);
1247-
if (!((SST_IDG(stkptr) == S_EXPR && DTYG(dtype) == TY_DERIVED))
1248-
&& !no_data_components(dtype))
1247+
if (no_data_components(dtype))
1248+
continue;
1249+
if (!((SST_IDG(stkptr) == S_EXPR && DTYG(dtype) == TY_DERIVED)))
12491250
(void)mkarg(stkptr, &dum);
12501251
if (is_read) {
12511252
if (SST_IDG(stkptr) == S_IDENT)

tools/flang1/flang1exe/semutil2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,6 @@ static LOGICAL _can_fold(int);
10161016
static void constructf90(int, ACL *);
10171017
static void _dinit_acl(ACL *, LOGICAL);
10181018

1019-
#if DEBUG
10201019
static int acl_array_num = 0;
10211020

10221021
static char *_iexpr_op[] = {
@@ -1034,6 +1033,7 @@ iexpr_op(int op)
10341033
return "?N?";
10351034
}
10361035

1036+
#if DEBUG
10371037
static void
10381038
_printacl(int in_array, ACL *aclp, FILE *f)
10391039
{

tools/flang1/utils/symtab/symtab.in.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ int add_symitem(int, int);
431431
void change_predefineds(int, LOGICAL);
432432

433433
char *getsname(int); /* defined in assem.c */
434-
void sym_is_refd(int); /* defined in assem.c */
434+
void sym_is_refd(SPTR); /* defined in assem.c */
435435

436436
void iso_c_lib_stat(int *, int *, int);
437437
int get_ieee_arith_intrin(char *);

tools/flang2/flang2exe/assem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727

2828
extern char *comment_char;
2929

30-
char *getsname(int);
30+
char *getsname(SPTR);
3131
char *getsname2(int);
32-
void sym_is_refd(int);
32+
void sym_is_refd(SPTR);
3333

3434
extern void assem_init(void);
3535
/* called when processing of user function is begun by the CG */

tools/flang2/flang2exe/cgllvm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ typedef enum {
110110
extern char **sptr_array;
111111
extern LL_Type **sptr_type_array;
112112

113-
char *get_llvm_name(int sptr); /* see llassem*.c */
114113
char *get_llvm_sname(int sptr);
115114
char *get_llvm_mips_sname(int sptr);
116115

tools/flang2/flang2exe/dinit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ dinit_data(VAR *ivl, CONST *ict, DTYPE dtype, ISZ_T base_off)
372372
/* Too many initializer is allowed.
373373
if (ict) errsev(67);
374374
*/
375-
error_exit:
375+
error_exit:;
376376
#if DEBUG
377377
if (ivl && DBGBIT(6, 2) && ilmb.ilmavl != BOS_SIZE) {
378378
/* dump ilms afterwards because dmpilms overwrites opcodes */

tools/flang2/flang2exe/expand.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,6 +1501,8 @@ exp_store(ILM_OP opc, ILM *ilmp, int curilm)
15011501
case IL_AKMV:
15021502
expr = ILI_OPND(expr, 1);
15031503
break;
1504+
default:
1505+
break;
15041506
}
15051507
if (IL_RES(ILI_OPC(expr)) != ILIA_AR) {
15061508
expr = ad1ili(IL_KAMV, expr);

0 commit comments

Comments
 (0)