https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90539
--- Comment #17 from Martin Liška <marxin at gcc dot gnu.org> --- (In reply to Thomas Koenig from comment #16) > Hi Martin, > > Is this for the slowdown or for the wrong-code issue? It's the wrong code for cam4_r benchmark. > > To get another view, from a gdb seesion of the compiler: > > call debug(expr) > call debug(fsym) (gdb) p debug(expr) nf90_put_var_1d_eightbytereal:values(FULL) (REAL 8) $3 = void (gdb) p debug(fsym) || symbol: '_formal_107' type spec : (REAL 8) attributes: (VARIABLE DIMENSION DUMMY) Array spec:(0 [0]) $4 = void > > a look at expr->symtree->n.sym (I think call debug(expr->symtree->n.sym) > will also work, (gdb) call debug(expr->symtree->n.sym) || symbol: 'values' type spec : (REAL 8) attributes: (VARIABLE DIMENSION DUMMY(IN)) Array spec:(1 [0] AS_ASSUMED_SHAPE 1 () ) > > a look at expr->ref (follow a few pointers) > (gdb) p *expr->ref $8 = { type = REF_ARRAY, u = { ar = { type = AR_FULL, dimen = 1, codimen = 0, in_allocate = false, team = 0x0, stat = 0x0, where = { nextc = 0x0, lb = 0x0 }, as = 0x27d7ee0, c_where = {{ nextc = 0x0, lb = 0x0 } <repeats 15 times>}, start = {0x0 <repeats 15 times>}, end = {0x0 <repeats 15 times>}, stride = {0x0 <repeats 15 times>}, dimen_type = {DIMEN_RANGE, 0 <repeats 14 times>} }, c = { component = 0x100000001, sym = 0x0 }, ss = { start = 0x100000001, end = 0x0, length = 0x0 }, i = INQUIRY_IM }, next = 0x0 } > a look at fsym->as (also follow non-zero pointers). (gdb) p *fsym->as $9 = { rank = 0, corank = 0, type = AS_ASSUMED_SIZE, cotype = 0, lower = {0x0 <repeats 15 times>}, upper = {0x0 <repeats 15 times>}, cray_pointee = false, cp_was_assumed = false, resolved = false } > > Also, if you have > > call foo(...,a, ...) > > you can put > > print *,shape(a) > print *,size(a) > print *,is_contiguous(a) Let me work on this.. > > into the source, run it and see what you get. > > Also, look into the callee if there is a bounds violation - what > is the dummy argumet declared as on the calee's side? > > Maybe you could also put > > subroutine foo (...., a, ...) > > print *,shape(a) > print *,size(a) > print *,is_contiguous(a) > > into the source code and paste the output. > > Regards > > Thomas