This works for me as well and fixes the error I was seeing--thank you for looking into this and submitting this!
Oct 18 2022
Oct 17 2022
Hi, I have also started hitting build errors with __float128 support when building flang using libc++. When I try to build using libc++ on an x86_64-unknown-linux-gnu host I see an error that there is an ambiguous call to copysign (the error I am seeing is the same as is reported here: https://github.com/llvm/llvm-project/issues/57992). Based on the comment in the issue, it seems __float128 is not supported by libc++ at the moment and I think this issue was "hidden" by the typo fixed in this patch.
Oct 13 2022
Oct 12 2022
Gah, I goofed and forgot to add the "Differential Revision" line--this has been committed at 0ec3ac9b7fbd15698af7289e1214e8ff3d82ec14.
Ping @awarzynski and @klausler --could you please let me know if the driver and runtime portions look good to you, respectively? (Apologies in advance if this isn't necessary, but as you both gave me significant feedback I wanted to make sure you are ok with the patch as it stands.) Thanks!
Oct 10 2022
Move helper function to Allocatable.h/cpp. Also add lines to pointer tests to check we are reading from the argument to match the allocatable tests.
Oct 7 2022
Oct 3 2022
The lowering part looks good to me (I only have a minor comment inlined about a header used in lowering).
Add /*overwrite=*/ comment I missed previously, move Runtime/environment-defaults.h to Lower/EnvironmentDefault.h
Sep 29 2022
Implement @jeanPerier's suggestion and update the title/summary accordingly. Also fixed "equivaleneced" -> "equivalenced" in the test comment.
Sep 28 2022
Sep 20 2022
The build still fails.
Move comment, see if build will cooperate.
Address comments from @awarzynski, @rovka, and @peixin. Also fixed the file header comments for EnvironmentDefaults.h, environment-defaults.h, and environment-default-list.h to match others in their respective folders.
Sep 19 2022
Sep 16 2022
Remove unneeded braces and unnecessary changes to NameUniquer.
Sep 2 2022
Aug 26 2022
Fixed up/simplified environment-default-list.h (and associated tests/lowering) for C/C++ compatibility. Also cleaned up a declaration and a few autos in the lowering component. Rebased.
Aug 24 2022
Aug 22 2022
@klausler Could you please take a look at this again and let me know if it is more in line with your suggestion above?
Aug 19 2022
Aug 18 2022
LGTM, thank you!
Aug 15 2022
Add IR checks to make sure that the BIG_ENDIAN string and string length are correctly set and passed into SetConvert.
Aug 12 2022
Aug 9 2022
Rebase to address conflicts, use string substitution blocks in my tests.
Aug 8 2022
Change hasMainProgram to be a local variable and update summary to reflect the new approach.
Aug 4 2022
Hopefully fix Window's build errors by using the proper Windows-specific environment utilities (_putenv_s vs setenv).
Aug 3 2022
BTW, can you continue working on the lowering of the convert argument of open statement?
Attempted to address comments suggesting a different approach for the implementation. Rather than add a call to a new set_convert() runtime function, create a list of environment variable defaults that is passed into and set by the runtime via a "known" extern data structure. Also rebased.
Jul 26 2022
Added changes to address feedback about missing braces and where I am adding options::OPT_fconvert_EQ (and removing the extra formatting change). Also removes an unnecessary include I had mistakenly added.
Jul 25 2022
Thank you for taking a look at this and thank you for the feedback!
I do have a few related lingering questions as well:
Jul 15 2022
Removing accidental whitespace change.