aboutsummaryrefslogtreecommitdiff
path: root/flang
Commit message (Collapse)AuthorAgeFilesLines
* [flang][driver] Refactor methods for parsing options (nfc)Andrzej Warzynski2021-04-202-18/+25
| | | | | | | | | | | | | | | | | | | | | This is just a small update that makes sure that errors arising from parsing command-line options are captured more visibly. Also, all parsing methods will now consistently return either a bool ("may fail") or void ("never fails"). An instance of `InputKind` coming from `-x` is added to `FrontendOptions` rather then being returned from `ParseFrontendArgs`. It's currently not used, but we will require it shortly. In particular, once code-generation is available we will use it to differentiate between LLVM IR and Fortran input. `FrontendOptions` is a very suitable place to keep it. This changes don't affect the error reporting in the driver. In this respect these are non-functional-changes. However, it will simplify things in the forthcoming patches in which we may need a better error tracking/recovery mechanism. Differential Revision: https://reviews.llvm.org/D100556
* [flang][nfc] Port 2 tests to use the new driver when enabledAndrzej Warzynski2021-04-202-2/+2
| | | | | | | | | | | | | | | This is similar to https://reviews.llvm.org/D100309, i.e. `%f18` is replaced with `%flang_new`. resolve105.f90 wasn't in tree when D100309 was worked on, so it's updated here instead. label14.f90 requires `-fsyntax-only`. I didn't notice that when submitting D100309, hence updating it now instead. `-fsyntax-only` is required to prevent `%f18` from calling an external compiler (which then fails and returns a non-zero exit code). Differential Revision: https://reviews.llvm.org/D100655
* [flang] Define missing & needed IEEE_ARITHMETIC symbolspeter klausler2021-04-198-21/+144
| | | | | | Define IEEE_IS_NAN, IEEE_IS_FINITE, & IEEE_REM. Differential Revision: https://reviews.llvm.org/D100599
* [flang][OpenMP] Remove `OmpEndLoopDirective` handles from code.Sourabh Singh Tomar2021-04-162-11/+0
| | | | | | | | | | | This directive is currently lowered as NOP. Patch is an attempt upstream code from: PR: https://github.com/flang-compiler/f18-llvm-project/pull/573 Reviewed By: kiranchandramohan, schweitz, clementval Differential Revision: https://reviews.llvm.org/D100576
* [flang] Add list input test to GTest suiteAsher Mancinelli2021-04-156-83/+192
|
* [flang] Update the regression tests to use the new driver when enabledAndrzej Warzynski2021-04-15398-408/+409
| | | | | | | | | | | | | | | | | | | | | | | | This patch updates most of the remaining regression tests (~400) to use `flang-new` rather then `f18` when `FLANG_BUILD_NEW_DRIVER` is set. This allows us to share more Flang regression tests between `f18` and `flang-new`. A handful of tests have not been ported yet - these are currently either failing or not supported by the new driver. Summary of changes: * RUN lines in tests are updated to use `%flang_fc1` instead of `%f18` * option spellings in tests are updated to forms accepted by both `f18` and `flang-new` * variables in Bash scripts are renamed (e.g. F18 --> FLANG_FC1) The updated tests will now be run with the new driver, `flang-new`, whenever it is enabled (i.e when `FLANG_BUILD_NEW_DRIVER` is set). Although this patch touches many files, vast majority of the changes are automatic: ``` grep -IEZlr "%f18" flang/test/ | xargs -0 -l sed -i 's/%f18/%flang_fc1/g ``` Differential Revision: https://reviews.llvm.org/D100309
* [flang] Fix typo caught by clang buildpeter klausler2021-04-141-1/+1
| | | | | | | An inadvertent ! operator was (fortunately) flagged as a warning by clang; remove it. Differential Review: https://reviews.llvm.org/D100513
* [flang] Correct the interpretation of BIND(C,NAME='')peter klausler2021-04-141-10/+8
| | | | | | | | An empty NAME= should mean that there is no C binding, not the binding that would result from BIND(C) without a NAME=. See 18.10.2p2. Differential Revision: https://reviews.llvm.org/D100494
* [flang] Fix Boolean flag argumentspeter klausler2021-04-142-6/+3
| | | | | | | Two sites in io-api.cpp pass the wrong Boolean flag value to signify that a new anonymous unit is a formatted file. Differential Revision: https://reviews.llvm.org/D100419
* [flang] Handle END= situations better in runtime inputpeter klausler2021-04-148-44/+46
| | | | | | | | | | Debug the input path for READ statements with END= labels; don't emit errors when the program can handle them. BeginReadingRecord() member functions have been made "bool" for more convenient handling of error cases, and some code in IoErrorHandler has been cleaned up. Differential Revision: https://reviews.llvm.org/D100421
* [flang] More precise enforcement of runtime constraintpeter klausler2021-04-133-21/+20
| | | | | | | | | | | An OPEN statement that affects an already connected unit without changing its external file is required to have STATUS="OLD" or default STATUS=. The code was eliciting spurious runtime errors in situations where an OPEN statement pertained to an existing unit number but did not need to have STATUS="OLD'. Differential Revision: https://reviews.llvm.org/D100352
* [flang][OpenMP] Modify semantic check for nesting of `ordered` regions to ↵Arnamoy Bhattacharyya2021-04-132-2/+51
| | | | | | | | include `close` nesting check. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D100222
* [flang] Handle instantiation of procedure pointer componentsPeter Steinfeld2021-04-132-0/+91
| | | | | | | | | | | | | We were not instantiating procedure pointer components. If the instantiation contained errors, we were not reporting them. This resulted in internal errors in later processing. I fixed this by adding code in .../lib/Semantics/type.cpp in InstantiateComponent() to handle a component with ProcEntityDetails. I also added several tests for various good and bad instantiations of procedure pointer components. Differential Revision: https://reviews.llvm.org/D100341
* [flang][driver] Remove `%flang-new` from the LIT configurationAndrzej Warzynski2021-04-1328-210/+203
| | | | | | | | | | | | | | | | | | | | | | | `%flang-new` was introduced in the early days of the new driver to make a clear distinction between the tests for the current and the new driver. We have since introduced `%flang` (compiler driver) and `%flang_fc1` (frontend driver) as the long term solution. This has allowed us to share tests between `flang-new` and `f18`. This patch replaces all uses of `%flang-new` with `%flang` and `%flang_fc1`. Some tests are reformatted so that all tests look uniform and are easier to follow. Where possible, `! REQUIRES: new-flang-driver` is deleted so that more tests can be shared with `f18`. To facilitate this, `f{no-}implicit-none` are introduced in `f18` with semantics identical to `flang-new`. Two tests are deleted rather than updated: * flang/test/Frontend/print-preprocess-C-file.f90 * flang/test/Frontend/print-preprocessed-file.f90 Instead, there is plenty of preprocessor tests in flang/test/Preprocessing/. Differential Revision: https://reviews.llvm.org/D100174
* [flang] Fix a test (use %s instead of $s)Andrzej Warzynski2021-04-131-1/+1
| | | | | | | | | | | | | | | | With the typo ($S instead of %s), the driver was expecting input from stdin. In such cases, it prints: ``` Enter Fortran source Use EOF character (^D) to end file ``` This was piped to FileCheck. Together with the available `CHECK-NOT` statement, this was sufficient for the test to pass (incorrectly). This patch makes sure that the provided input file is used instead of stdin. Differential Revision: https://reviews.llvm.org/D100301
* [flang] Correct TypeCode::IsLogical()peter klausler2021-04-121-1/+1
| | | | | | | | | F18 is using the type codes for C's "least" int types to encode the various kinds of Fortran's LOGICAL intrinsic type; update the IsLogical() predicate accordingly. (This member function isn't yet used anywhere, so this patch is nearly an NFC.) Differential Revision: https://reviews.llvm.org/D100323
* [flang] Fix narrowing warning on macosTim Keith2021-04-121-1/+1
| | | | | | | | | | | | | | | | With clang 11 on macos we were getting this warning: ``` flang/runtime/random.cpp:61:30: error: non-constant-expression cannot be narrowed from type 'unsigned long long' to 'runtime::GeneratedWord' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] GeneratedWord word{(generator() - generator.min()) & rangeMask}; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ flang/runtime/random.cpp:99:5: note: in instantiation of function template specialization 'runtime::Generate<double, 53>' requested here Generate<CppTypeFor<TypeCategory::Real, 8>, 53>(harvest); ^ ``` Changing the type of `rangeMask` fixes it. Differential Revision: https://reviews.llvm.org/D100320
* [flang] Accept & fold IEEE_SELECTED_REAL_KINDpeter klausler2021-04-106-3/+76
| | | | | | | | F18 supports the standard intrinsic function SELECTED_REAL_KIND but not its synonym in the standard module IEEE_ARITHMETIC named IEEE_SELECTED_REAL_KIND until this patch. Differential Revision: https://reviews.llvm.org/D100066
* [flang] RANDOM_NUMBER, RANDOM_SEED, RANDOM_INIT in runtimepeter klausler2021-04-095-0/+288
| | | | | | | | Add APIs, initial non-coarray implementations, and unit tests for the intrinsic subroutines for pseudo-random number generation. Differential Revision: https://reviews.llvm.org/D100064
* [flang] Enforce a limit on recursive PDT instantiationspeter klausler2021-04-097-24/+38
| | | | | | | | | | | | | | | For pernicious test cases with explicit non-constant actual type parameter expressions in components, e.g.: type :: t(k) integer, kind :: k type(t(k+1)), pointer :: p end type we should detect the infinite recursion and complain rather than looping until the stack overflows. Differential Revision: https://reviews.llvm.org/D100065
* [flang] Check for conflicting BIND(C) namespeter klausler2021-04-092-0/+60
| | | | | | | Check for two or more symbols that define a data object or entry point with the same interoperable BIND(C) name. Differential Revision: https://reviews.llvm.org/D100067
* [OpenMP51] Initial support for masked directive and filter clausecchen2021-04-091-0/+1
| | | | | | | | | Adds basic parsing/sema/serialization support for the #pragma omp masked directive. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D99995
* [Flang] Changes to mangling codeEric Schweitz2021-04-094-29/+69
| | | | | | | | | | Call static functions using the class name (fir::NameUniquer). Add function for mangling derivedTypes. All the name mangling functions that are ultimately called are tested in unittests/Optimizer/InternalNamesTest.cpp. Differential Revision: https://reviews.llvm.org/D99967
* [flang][OpenMP] Add functionality to check "close nesting" of regions, which ↵Arnamoy Bhattacharyya2021-04-085-3/+157
| | | | | | | | can be used for Semantic checks. Also adding more test cases. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D99970
* [flang][nfc] Rename some test filesAndrzej Warzynski2021-04-087-0/+0
| | | | | | | | | Update test names as per Flang's coding style guide [1]: ``` File names should use dashes, not underscores. ``` [1] https://github.com/llvm/llvm-project/blob/main/flang/docs/C%2B%2Bstyle.md#files
* [flang][driver] Add debug options not requiring semantic checksAndrzej Warzynski2021-04-0810-2/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds two debugging options in the new Flang driver (flang-new): *fdebug-unparse-no-sema *fdebug-dump-parse-tree-no-sema Each of these options combines two options from the "throwaway" driver (left: f18, right: flang-new): * `-fdebug-uparse -fdebug-no-semantics` --> `-fdebug-unparse-no-sema` * `-fdebug-dump-parse-tree -fdebug-no-semantics` --> `-fdebug-dump-parse-tree-no-sema` There are no plans to implement `-fdebug-no-semantics` in the new driver. Such option would be too powerful. Also, it would only make sense when combined with specific frontend actions (`-fdebug-unparse` and `-fdebug-dump-parse-tree`). Instead, this patch adds 2 specialised options listed above. Each of these is implemented through a dedicated FrontendAction (also added). The new frontend actions are implemented in terms of a new abstract base action: `PrescanAndSemaAction`. This new base class was required so that we can have finer control over what steps within the frontend are executed: * `PrescanAction`: run the _prescanner_ * `PrescanAndSemaAction`: run the _prescanner_ and the _parser_ (new in this patch) * `PrescanAndSemaAction`: run the _prescanner_, _parser_ and run the _semantic checks_ This patch introduces `PrescanAndParseAction::BeginSourceFileAction`. Apart from the semantic checks removed at the end, it is similar to `PrescanAndSemaAction::BeginSourceFileAction`. Differential Revision: https://reviews.llvm.org/D99645
* [flang][driver] Fix `-fdebug-dump-provenance`Andrzej Warzynski2021-04-073-21/+36
| | | | | | | | | | | | | | | | | | The -fdebug-dump-provenance flag is meant to be used with needProvenanceRangeToCharBlockMappings set to true. This way, extra mapping is generated that allows e.g. IDEs to retrieve symbol's scope (offset into cooked character stream) based on symbol's source code location. This patch makes sure that this option is set when using -fdebug-dump-provenance. With this patch, the implementation of -fdebug-dump-provenance in `flang-new -fc1` becomes consistent with `f18`. The corresponding LIT test is updated so that it can be shared with `f18`. I refined it a bit so that: * it becomes a frontend-only test * it's stricter about the expected output Differential Revision: https://reviews.llvm.org/D98847
* [flang][driver] Add support for `-cpp/-nocpp`Andrzej Warzynski2021-04-0716-58/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the `-cpp` and `-nocpp` flags. The implemented semantics match f18 (i.e. the "throwaway" driver), but are different to gfortran. In Flang the preprocessor is always run. Instead, `-cpp/-nocpp` are used to control whether predefined and command-line preprocessor macro definitions are enabled or not. In practice this is sufficient to model gfortran`s `-cpp/-nocpp`. In the absence of `-cpp/-nocpp`, the driver will use the extension of the input file to decide whether to include the standard macro predefinitions. gfortran's documentation [1] was used to decide which file extension to use for this. The logic mentioned above was added in FrontendAction::BeginSourceFile. That's relatively late in the driver set-up, but this roughly where the name of the input file becomes available. The logic for deciding between fixed and free form works in a similar way and was also moved to FrontendAction::BeginSourceFile for consistency (and to reduce code-duplication). The `-cpp/-nocpp` flags are respected also when the input is read from stdin. This is different to: * gfortran (behaves as if `-cpp` was used) * f18 (behaves as if `-nocpp` was used) Starting with this patch, file extensions are significant and some test files had to be renamed to reflect that. Where possible, preprocessor tests were updated so that they can be shared between `f18` and `flang-new`. This was implemented on top of adding new test for `-cpp/-nocpp`. [1] https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D99292
* [flang] Improve constant folding for type parameter inquiriesPeter Steinfeld2021-04-066-16/+100
| | | | | | | | | | | | | | | | | | | | | | | We were not folding type parameter inquiries for the form 'var%typeParam' where 'typeParam' was a KIND or LEN type parameter of a derived type and 'var' was a designator of the derived type. I fixed this by adding code to the function 'FoldOperation()' for 'TypeParamInquiry's to handle this case. I also cleaned up the code for the case where there is no designator. In order to make the error messages correctly refer to both the points of declaration and instantiation, I needed to add an argument to the function 'InstantiateIntrinsicType()' for the location of the instantiation. I also changed the formatting of 'TypeParamInquiry' to correctly format this case. I also added tests for both KIND and LEN type parameter inquiries in resolve104.f90. Making these changes revealed an error in resolve89.f90 and caused one of the error messages in assign04.f90 to be different. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D99892
* [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag ↵Abhina Sreeskantharajan2021-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of OF_Text Problem: On SystemZ we need to open text files in text mode. On Windows, files opened in text mode adds a CRLF '\r\n' which may not be desirable. Solution: This patch adds two new flags - OF_CRLF which indicates that CRLF translation is used. - OF_TextWithCRLF = OF_Text | OF_CRLF indicates that the file is text and uses CRLF translation. Developers should now use either the OF_Text or OF_TextWithCRLF for text files and OF_None for binary files. If the developer doesn't want carriage returns on Windows, they should use OF_Text, if they do want carriage returns on Windows, they should use OF_TextWithCRLF. So this is the behaviour per platform with my patch: z/OS: OF_None: open in binary mode OF_Text : open in text mode OF_TextWithCRLF: open in text mode Windows: OF_None: open file with no carriage return OF_Text: open file with no carriage return OF_TextWithCRLF: open file with carriage return The Major change is in llvm/lib/Support/Windows/Path.inc to only set text mode if the OF_CRLF is set. ``` if (Flags & OF_CRLF) CrtOpenFlags |= _O_TEXT; ``` These following files are the ones that still use OF_Text which I left unchanged. I modified all these except raw_ostream.cpp in recent patches so I know these were previously in Binary mode on Windows. ./llvm/lib/Support/raw_ostream.cpp ./llvm/lib/TableGen/Main.cpp ./llvm/tools/dsymutil/DwarfLinkerForBinary.cpp ./llvm/unittests/Support/Path.cpp ./clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp ./clang/lib/Frontend/CompilerInstance.cpp ./clang/lib/Driver/Driver.cpp ./clang/lib/Driver/ToolChains/Clang.cpp Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D99426
* Revert "[flang] Improve constant folding for type parameter inquiries"Kiran Chandramohan2021-04-066-100/+16
| | | | This reverts commit 8c7bf2f93da9b64b07509f67552d592a86260ff5.
* [flang] Improve constant folding for type parameter inquiriesPeter Steinfeld2021-04-056-16/+100
| | | | | | | | | | | | | | | | | | | | | We were not folding type parameter inquiries for the form 'var%typeParam' where 'typeParam' was a KIND or LEN type parameter of a derived type and 'var' was a designator of the derived type. I fixed this by adding code to the function 'FoldOperation()' for 'TypeParamInquiry's to handle this case. I also cleaned up the code for the case where there is no designator. In order to make the error messages correctly refer to both the points of declaration and instantiation, I needed to add an argument to the function 'InstantiateIntrinsicType()' for the location of the instantiation. I also changed the formatting of 'TypeParamInquiry' to correctly format this case. I also added tests for both KIND and LEN type parameter inquiries in resolve104.f90. Making these changes revealed an error in resolve89.f90 and caused one of the error messages in assign04.f90 to be different. Differential Revision: https://reviews.llvm.org/D99892
* [OPENMP51]Initial support for nocontext clause.Jennifer Yu2021-04-051-0/+1
| | | | | | Added basic parsing/sema/serialization support for the 'nocontext' clause. Differential Revision: https://reviews.llvm.org/D99848
* [flang][driver] Modify the existing test cases that use -Mstandard in f18, ↵Arnamoy Bhattacharyya2021-04-0517-31/+31
| | | | | | | | to use -pedantic and %flang_fc1 to share with the new driver Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D99518
* [flang][driver] Add options for -WerrorArnamoy Bhattacharyya2021-04-0510-7/+152
| | | | | | | | With the option given, warnings are treated as error. Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D98657
* [flang] Address more MSVC build issues with reductionspeter klausler2021-04-026-1/+99
| | | | | | | | | | Move #include <complex.h> to complex-reduction.h, where it is needed in MSVC builds. Exclude code that requires a native 128-bit integer type from compilation by MSVC. Differential Revision: https://reviews.llvm.org/D99806
* [OPENMP5.1]Initial support for novariants clause.Jennifer Yu2021-04-021-0/+1
| | | | Added basic parsing/sema/serialization support for the 'novariants' clause.
* [flang] TRANSFER() intrinsic functionpeter klausler2021-04-029-32/+242
| | | | | | | API, implementation, and unit tests for the intrinsic function TRANSFER. Differential Revision: https://reviews.llvm.org/D99799
* [flang] Fix MSVC build breakagepeter klausler2021-04-021-0/+9
| | | | | | A recent patch exposed an assumption that "long double" is (at least) an 80-bit floating-point type, which of course it is not in MSVC. Also get it right for non-x87 floating-point.
* [flang] Disable some new unit tests (non-portable results)peter klausler2021-04-011-14/+0
| | | | | | | Due to architectural variation on the C++ functions std::ceil, std::floor, and std::trunc, diable some new Fortran unit tests for now that depending on specifical results for IEEE floating-point edge cases of infinities and NaNs.
* [flang] Fix unit test failure on POWERpeter klausler2021-04-011-4/+6
| | | | | A new unit test for the Fortran runtime needs to allow for some architectural variation on Infinity and NaN edge cases of NINT().
* [flang] Implement numeric intrinsic functions in runtimepeter klausler2021-04-015-0/+1272
| | | | | | | | Adds APIs, implementations, and unit tests for AINT, ANINT, CEILING, EXPONENT, FLOOR, FRACTION, MOD, MODULO, NEAREST, NINT, RRSPACING, SCALE, SET_EXPONENT, & SPACING. Differential Revision: https://reviews.llvm.org/D99764
* [flang] Fix arm clang buildpeter klausler2021-04-011-9/+50
| | | | | | | | The new source file flang/runtime/complex-reduction.c contains a portability work-around that implicitly assumed that a recent version of clang would be used; this patch changes the code and should be portable to older clangs and any other C compilers that don't support the standard CMPLXF/CMPLX/CMPLXL macros.
* [flang] Implement reductions in the runtimepeter klausler2021-04-0126-197/+2563
| | | | | | | | | | | | | | | | | | | | | | | | | | Add runtime APIs, implementations, and tests for ALL, ANY, COUNT, MAXLOC, MAXVAL, MINLOC, MINVAL, PRODUCT, and SUM reduction transformantional intrinsic functions for all relevant argument and result types and kinds, both without DIM= arguments (total reductions) and with (partial reductions). Complex-valued reductions have their APIs in C so that C's _Complex types can be used for their results. Some infrastructure work was also necessary or noticed: * Usage of "long double" in the compiler was cleaned up a bit, and host dependences on x86 / MSVC have been isolated in a new Common/long-double header. * Character comparison has been exposed via an extern template so that reductions could use it. * Mappings from Fortran type category/kind to host C++ types and vice versa have been isolated into runtime/cpp-type.h and then used throughout the runtime as appropriate. * The portable 128-bit integer package in Common/uint128.h was generalized to support signed comparisons. * Bugs in descriptor indexing code were fixed. Differential Revision: https://reviews.llvm.org/D99666
* [flang] Move .f77 to the list of fixed-form file extensionsAndrzej Warzynski2021-04-011-6/+6
| | | | | | | The free form was introduced in Fortran 90, so treating .f77 as free-form was a bug. Differential Revision: https://reviews.llvm.org/D99494
* [flang] Refine checks for pointer initialization targetspeter klausler2021-03-315-28/+82
| | | | | | | | f18 was emitting a bogus error message about the lack of a TARGET attribute when a pointer was initialized with a component of a variable that was a legitimate TARGET. Differential Revision: https://reviews.llvm.org/D99665
* [flang] Fix CHECK() calls on erroneous procedure declarationsPeter Steinfeld2021-03-292-11/+84
| | | | | | | | | | | | | | | When writing tests for a previous problem, I ran across situations where the compiler was failing calls to CHECK(). In these situations, the compiler had inconsistent semantic information because the programs were erroneous. This inconsistent information was causing the calls to CHECK(). I fixed this by avoiding the code that ended up making the failed calls to CHECK() and making sure that we were only avoiding these situations when the associated symbols were erroneous. I also added tests that would cause the calls to CHECK() without these changes. Differential Revision: https://reviews.llvm.org/D99342
* [flang] Update output format test to use GTestAsher Mancinelli2021-03-294-531/+697
| | | | | | | | | Better document each test in output formatting tests. Use GTest primitives and infrastructure in same spirit as [[ https://reviews.llvm.org/D97403 | D97403 ]]. [[ https://github.com/flang-compiler/f18/issues/995#issuecomment-790737912 | See legacy github issue linked here ]] for additional context. Reorganize long test cases to be more readable. Reviewed By: awarzynski, klausler Differential Revision: https://reviews.llvm.org/D98303
* [flang][driver] Add default intrinsic module path in f18 to make f18 behave ↵Arnamoy Bhattacharyya2021-03-294-17/+23
| | | | | | | | like flang-new (with respect to the module paths), make it possible to share more tests between the drivers and make using f18 easier (the default path means that users are no longer required to specify it) Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D99336
* [flang] fix spurious runtime crash on TRIM('')peter klausler2021-03-251-1/+15
| | | | | | | | | The standard interoperability routine CFI_establish() does not accept a zero-length CHARACTER type. Since these can be valid results of intrinsic function references, work around the design of CFI_establish() in the wrapper routine that calls it. Differential Revision: https://reviews.llvm.org/D99296