Issue 170651
Summary [Flang] Doubt on maximum file that we can pass to flang?
Labels bug, flang
Assignees
Reporter Thirumalai-Shaktivel
    I have the following lit testcase
```
# DEFINE: %{PATH} = /tmp
# DEFINE: %{TEST_FILE} = %{PATH}/test_max_files.f90
# DEFINE: %{MAX_FILES} = 8000

# RUN: mkdir -p %{PATH}/files
# RUN: rm -rf %{PATH}/files/*

# RUN: bash -c '                                                                \
# RUN: for i in $(seq 1 $0) ; do                                              \
# RUN:     echo -e " \
# RUN:     subroutine sub_$i()\n \
# RUN: print *, \"Subroutine $i\"\n \
# RUN:     end subroutine sub_$i" > $1/files/sub$i.f90;                         \
# RUN:   done' %{MAX_FILES} %{PATH}

# RUN: echo "      program test" > %{TEST_FILE}
# RUN: bash -c '                                                                \
# RUN: for i in $(seq 1 $0); do                                               \
# RUN:     echo "      call sub_$i()" >> $1; \
# RUN:   done' %{MAX_FILES} %{TEST_FILE}
# RUN: echo "      print *, \"PASS\"" >> %{TEST_FILE}
# RUN: echo "      end program test" >> %{TEST_FILE}

# RUN: cd %{PATH}/files/ && flang-new %{TEST_FILE} *.f90 -o %t && %t | FileCheck %s

# CHECK: PASS
```

This generates 8000 files with a subroutine and compiles along with the program file. This test fails as "error: unable to execute command: posix_spawn failed: Argument list too long" using flang-new

What is the maximum files or characters that we can specify to flang?
Is this an issue that we need to fix?

GFortran compiles and runs for 15,000 files
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to