Implement the ArgumentLength entry point of GET_COMMAND_ARGUMENT. Also
introduce a fixture for the tests.
Note that this also changes the interface for ArgumentLength from
returning a 4-byte integer to returning an 8-byte integer.
Differential D109227
[flang] GET_COMMAND_ARGUMENT(LENGTH) runtime implementation rovka on Sep 3 2021, 4:48 AM. Authored by
Details Implement the ArgumentLength entry point of GET_COMMAND_ARGUMENT. Also Note that this also changes the interface for ArgumentLength from
Diff Detail Event Timeline
Comment Actions Also add to the no-cpp-dep test (would be nice to have most of the runtime in there). Comment Actions Rebase and move the definitions for CountType and LengthType to the header file, as suggested in https://reviews.llvm.org/D109813
Comment Actions I'm seeing build failure with gcc 9.3.0 with this patch. ******************** TEST 'Flang :: Runtime/no-cpp-dep.c' FAILED ******************** Script: -- : 'RUN: at line 8'; /home/sw/thirdparty/gcc/gcc-9.3.0/linux86-64/bin/gcc -std=c99 llvm-project/flang/test/Runtime/no-cpp-dep.c -Illvm-project/flang/include llvm-project/build/lib/libFortranRuntime.a llvm-project/build/lib/libFortranDecimal.a -lm -o /dev/null -- Exit Code: 1 Command Output (stderr): -- In file included from /home/sw/thirdparty/gcc/gcc-9.3.0/linux86-64/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include/stdint.h:9, from llvm-project/flang/test/Runtime/no-cpp-dep.c:12: /usr/include/stdint.h:26:10: fatal error: bits/libc-header-start.h: No such file or directory 26 | #include <bits/libc-header-start.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. -- ******************** ******************** Failed Tests (1): Flang :: Runtime/no-cpp-dep.c Testing Time: 2.52s Unsupported : 3 Passed : 1012 Expectedly Failed: 3 Failed : 1 Comment Actions Hi Valentin, Thank you for the report! I've been googling that error message a bit and all I could find were posts Thanks, Comment Actions We have libc-header-start.h on the system under /usr/include/x86_64-linux-gnu/bits/libc-header-start.h. Since it's a lab machine I cannot install gcc-multilib easily. Comment Actions Hi Valentin, I tried to reproduce this in a Ubuntu Focal container with gcc 9.3.0 Cheers, Comment Actions Thanks for trying to reproduce. No worries, I'll check on my side. Interestingly it doesn't fail if I run the command by hand. Might be a llvm configuration problem |
I think that you can use std::int32_t/std::int64_t here.