Commits on Jan 9, 2019
  1. Merge pull request #654 from ThePortlandGroup/nv_stage

    tskeith committed Jan 9, 2019
    Pull 2019-01-09T12-43 Recent NVIDIA Changes
Commits on Jan 4, 2019
  1. Revert "Flang tests runmake change: Use regex better"

    tskeith committed Jan 4, 2019
    This reverts commit b25d66f.
Commits on Jan 25, 2018
  1. Invalidate cached sincos intrinsics on write to input expression

    tskeith committed Jan 25, 2018
  2. Fix bug passing contiguous pointer to array section.

    tskeith committed Jan 25, 2018
    This bug occurs when we have a contiguous pointer to an array section that
    is passed to an assumed-shape formal like in this example:
    	integer, pointer, contiguous :: p(:,:)
    	integer, pointer :: matrix(:,:,:)
    	p => matrix(:,:,n)
    	call sub(p)
    The section descriptor that we create and pass in to the procedure has an
    lbase value that represents the distance from the start of the array to the
    start of the section that the pointer represents.
    When we pass in the address of the first element that p points to, that
    distance is included in the pointer. So combined with the lbase offset in
    the descriptor we end up indexing too far into the array (or past the end).
    To fix this we need to either adjust the descriptor or pass in the address
    of the array instead of the first element of the section. This fix does the
  3. Fix segfault in function call with descriptor.

    tskeith committed Jan 25, 2018
    We were passing a constant value to a function argument where we were expecting
    a descriptor, which leads to a seg fault. The constant is created in the front
    end "transform_call", where we are missing a case here, when there is no member
    descriptor, use SDSC instead.
  4. Initialization of parameters where datatype includes a pointer.

    tskeith committed Jan 25, 2018
    - For a symbol with POINTERG set, get the data type using DDTG(DTYPEG(sptr)).
      This gets the base type of the pointer (double, say), instead of trying to build
      an empty array type, which comes out like '[0 x [0 x double]]'
    - When printing out the data value for a pointer, print out 'null'
      if it's a zero value
    - Handle data initialization of a pointer in add_init_const_op
Commits on Jan 24, 2018
  1. Add a new error message.

    tskeith committed Jan 24, 2018
  2. Fix bug converting BOZ literal to real.

    tskeith committed Jan 24, 2018
    In the Infinity/NaN case, preserve the bottom 32 bits rather than
    zeroing them out.
  3. Fix spurious internal error on call to IDATE.

    tskeith committed Jan 24, 2018
    Upstream code in routine ref_pd_subr in file semfunc.c changes
    a call to the IDATE intrinsic into a user routine call if the
    number or type of call arguments are invalid for the intrinsic.
    The assert in routine rewrite_func_ast that is triggered due
    to a missing definition of nargs is therefore unnecessary,
    since the code is only reached when the call arguments have
    already been validated.  Deleting the code with the asserts
    leaves code for IDATE that is similar to nearby cases for other
  4. Fix implementation of bind(C, name='')

    tskeith committed Jan 24, 2018
    Use the same binding name as we would without the bind(C), so include the
    module name in it. This is done by delaying processing of an explicit empty
    bind name until routine process_bind to allow that case to be treated
    differently from the implicit empty name case.
    Also rearrange the code in routine semant1 to reduce the arbitrary
    differences in the cases that process the two main bind attribute
    reductions.  The processing for the unnamed variant is a subset of
    the processing for the named variant, which is now more apparent
    in the code.
  5. Fix bug with reshape intrinsic.

    tskeith committed Jan 24, 2018
  6. We currently don't pass static variable onto uplevel structure to out…

    tskeith committed Jan 24, 2018
    function - no need because we can directly generate the address. Normally local
    DINIT or SAVE variable gets put in static memory(.STATICS/.BSS). There are
    certain local variables that don't get put in static memory - normally it is
    done by back end  If that is so, then PARREF flag needs to be set by front end
    so that we can generate the correct address ILI when inside outlined function.
    Therefore for all local variables, always PARREF flag. mk_address() should
    always be called to get address of variable.
  7. In polymorphic object inititialization, it is necessary

    tskeith committed Jan 24, 2018
    to pass the rank of the object to f90_init_from_desc so
    that it can distinguish between the initialization of an
    array and the initialization of an array element for which
    the entire array's descriptor has been supplied.
  8. Fix incorrect ILI created for array descriptor as dummy argument when…

    tskeith committed Jan 24, 2018
    … it is not
    passed in uplevel or display struct.
Commits on Jan 23, 2018
  1. Fixes compiler crash when using -mp

    tskeith committed Jan 23, 2018
    A bind(c) function was having its return type, despite a prototype, being
    trampled over because of alternate return handling.
  2. Add FLANG_LLVM_EXTENSIONS, to be defined when flang is built

    tskeith committed Jan 23, 2018
    with the LLVM from github:flang-compiler/llvm. This permits the
    use of the Fortran debug extensions included in that version.
Commits on Jan 20, 2018
  1. Add some debug output to stg_* routines.

    tskeith committed Jan 20, 2018
  2. Fix DWARF scoping bug.

    tskeith committed Jan 20, 2018
    The scope of a "global" variable should be the subprogram it is defined within
    rather than the compilation unit. There is no true "global scope" in Fortran.
  3. Fix corrupted ag table bug.

    tskeith committed Jan 20, 2018
  4. Fix problems with size of integer arguments to runtime functions.

    tskeith committed Jan 20, 2018
    When using large array descriptors, reduce_descriptor expects the dim argument
    to be an 8-byte integer but the compiler generates code to pass in a 4-byte
    integer. When that value is interpreted as 8 bytes long, the top 4 are non-zero
    so it looks like a huge number.
    The same problem occurs with the dim parameter to spread_descriptor and the
    shift and dim parameters to the eoshift and cshift routines.
    The conversion is done with convert_int(), which was previously named
    _convert_int() and static in ast.c.
  5. If an argument is a function return derived type, make sure to store …

    tskeith committed Jan 20, 2018
    …the return
    value (which is in a temp) before passing to a routine.
Commits on Jan 19, 2018
  1. Fix two bugs with bind(C).

    tskeith committed Jan 19, 2018
    If the name is empty (i.e. "bind(C, name='')") we got an internal error.
    If no explicit name was specified, the binding name incorrectly included
    the module name. It should be the same as the simple name of the procedure.
Commits on Jan 16, 2018
  1. Rename get_vector_type() to get_vector_dtype().

    tskeith committed Jan 16, 2018
    This change to disambiguate the two possible type schemes: dtypes and ll types.
  2. Vectorization enhancements.

    tskeith committed Jan 16, 2018
    - VPERMUTE production to support mask generation where the
      predicate size is half the size of computational code.
    - Expand use of VNOT when producing the mask.
    - added ILTY_OTHER as a case for vector arguments (iliutil.c)
  3. Fix internal compiler error.

    tskeith committed Jan 16, 2018
    Need to reset SYMLKP(gbl.entries) = NOSYM once it is done
    emitting the code because gbl.entries does not get set
    until new routine to new routine is processed and outlined
    function may try to do emit entries if we don't reset it.
    Also check if master_sptr == 0, before trying to emit entries.
    Also don't check the argument number for function with
    entries when we try to emit the jump instructions because
    it can have arguments.