[flang-commits] [PATCH] D146485: Add tests from gfortran test suite [build files]

Kiran Chandramohan via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu May 11 08:37:52 PDT 2023


kiranchandramohan added a comment.

In D146485#4335063 <https://reviews.llvm.org/D146485#4335063>, @DavidTruby wrote:

> The gfortran tests don't build for me when I use the `Ninja` generator from CMake. It appears that multiple files in the `regression` directory have modules called `m` and so multiple `m.mod` files are generated by the compiler representing these modules, which causes `ninja` to error out.
>
> I think this is actually a legitimate race condition that doesn't get caught by `Make` as it doesn't check the outputs in the same way, but this still may cause issues if one of the compiles generates an `m.mod` file and then tries to use it but it has been replaced by the `m.mod` from another compile.

I see two modules `M1` and `TEST` that are repeated in `torture/execute`. One of the tests defining `TEST` is disabled so we might not be hitting the issue for this one.

  $ grep -i 'module m1' llvm-test-suite/Fortran/gfortran/torture/execute/*
  llvm-test-suite/Fortran/gfortran/torture/execute/function_module_1.f90:module M1
  llvm-test-suite/Fortran/gfortran/torture/execute/module_init_1.f90:module m1
  
  $ grep -i 'module test' llvm-test-suite/Fortran/gfortran/torture/execute/*
  llvm-test-suite/Fortran/gfortran/torture/execute/pr32140.f90:MODULE TEST
  llvm-test-suite/Fortran/gfortran/torture/execute/pr32604.f90:MODULE TEST

But there are several tests in `llvm-test-suite/Fortran/gfortran/regression` that define modules with the same name.

   55 MODULE TEST
   80 MODULE M2
   83 MODULE FOO
   95 MODULE M1
  384 MODULE M


Repository:
  rT test-suite

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146485/new/

https://reviews.llvm.org/D146485



More information about the flang-commits mailing list