llvm-project/flang/unittests/Runtime
Peter Steinfeld 9df99d8ac2 [flang] Fix MAXLOC/MINLOC when MASK is scalar .FALSE.
When passing a scalar .FALSE. as the MASK argument to MAXLOC, we were getting
bad memory references.  We were falling into the code intended when the MASK
argument was missing.

I fixed this by checking for a scalar MASK with a .FALSE. value and
setting the result to all zeroes in that case.  I also added tests for
MAXLOC and MINLOC with scalar values of .TRUE. and .FALSE. for the MASK
argument.

I also special cased situations where the MASK argument is a scalar with
a .TRUE. value and passed along a nullptr in such cases.

Along the way, I eliminated the unused "chars" argument from the constructor
for ExtremumLocAccumulator.

Differential Revision: https://reviews.llvm.org/D124484
2022-04-27 14:50:00 -07:00
..
BufferTest.cpp [flang] Allow more concurrently open NEWUNIT= values, with recycling 2022-02-28 16:13:22 -08:00
CMakeLists.txt [flang][runtime] Ensure PointerDeallocate actually deallocate pointers 2022-03-28 10:22:08 +02:00
CharacterTest.cpp [flang] Allow more concurrently open NEWUNIT= values, with recycling 2022-02-28 16:13:22 -08:00
CommandTest.cpp [flang] Add runtime support for GET_COMMAND 2022-03-14 09:35:45 +00:00
CrashHandlerFixture.cpp [flang] Allow more concurrently open NEWUNIT= values, with recycling 2022-02-28 16:13:22 -08:00
CrashHandlerFixture.h [flang] Allow more concurrently open NEWUNIT= values, with recycling 2022-02-28 16:13:22 -08:00
ExternalIOTest.cpp [flang] Add runtime API to catch unit number out of range 2022-04-06 15:38:13 +02:00
Format.cpp [flang] Allow more concurrently open NEWUNIT= values, with recycling 2022-02-28 16:13:22 -08:00
Inquiry.cpp [flang] Allow more concurrently open NEWUNIT= values, with recycling 2022-02-28 16:13:22 -08:00
ListInputTest.cpp [flang] Allow more concurrently open NEWUNIT= values, with recycling 2022-02-28 16:13:22 -08:00
Matmul.cpp [flang] Allow more concurrently open NEWUNIT= values, with recycling 2022-02-28 16:13:22 -08:00
MiscIntrinsic.cpp [flang] Allow more concurrently open NEWUNIT= values, with recycling 2022-02-28 16:13:22 -08:00
Namelist.cpp [flang] Allow more concurrently open NEWUNIT= values, with recycling 2022-02-28 16:13:22 -08:00
Numeric.cpp [flang] Allow more concurrently open NEWUNIT= values, with recycling 2022-02-28 16:13:22 -08:00
NumericalFormatTest.cpp [flang][runtime] Don't skip input spaces when they are significant 2022-04-14 21:30:43 -07:00
Pointer.cpp [flang][runtime] Ensure PointerDeallocate actually deallocate pointers 2022-03-28 10:22:08 +02:00
Ragged.cpp
Random.cpp [flang] Allow more concurrently open NEWUNIT= values, with recycling 2022-02-28 16:13:22 -08:00
Reduction.cpp [flang] Fix MAXLOC/MINLOC when MASK is scalar .FALSE. 2022-04-27 14:50:00 -07:00
RuntimeCrashTest.cpp [flang] Allow more concurrently open NEWUNIT= values, with recycling 2022-02-28 16:13:22 -08:00
Stop.cpp [flang] Rename the runtime routine that reports a fatal user error 2022-02-01 09:01:50 -08:00
Time.cpp [flang] Lower sum intrinsic 2022-03-08 18:50:34 +01:00
Transformational.cpp [flang] Allow more concurrently open NEWUNIT= values, with recycling 2022-02-28 16:13:22 -08:00
tools.h [flang] Allow more concurrently open NEWUNIT= values, with recycling 2022-02-28 16:13:22 -08:00